PRM: NV1 Real Mode engine

Introduction

Todo

figure out what the fuck this engine does

The MMIO registers

8-bit space nv1-prm [0x8000]
nv1-mmio 0x6c0000: PRM

Todo

write me

Address Name Description
0x80 UNK0080 ???
0x100 INTR Interrupt status
0x140 INTR_ENABLE Interrupt enable
0x200 VGA_CONFIG VGA emulation config
0x400 MPU_STATE MPU state
0x1f00 ALOG_CONFIG Access log configuration
0x1f10 ALOG_POS Access log current position
0x1f20 ALOG_IGNORE_A Access log ignore mask A
0x1f24 ALOG_IGNORE_B Access log ignore mask B
reg32 nv1-prm-unk0080
nv1-prm 0x80: UNK0080

Todo

write me

The IO ports

8-bit space nv1-prmio [0x1000]
nv1-mmio 0x6d0000: PRMIO

Todo

write me

Address Name Description
0x201 GAME_PORT Game port
0x3c6 PAL_MASK Palette index mask
0x3c7 PAL_READ Palette read index
0x3c8 PAL_WRITE Palette write index
0x3c9 PAL_DATA Palette data

VGA configuration

reg32 nv1-prm-vga-config
nv1-prm 0x200: VGA_CONFIG
  • bit 0: TEXT_RENDER_ENABLE, if set to 1 enables the text rendering process
  • bit 4: PAL_WIDTH, selects palette data port mode:
    • 0: VGA, data is converted to/from 6-bit format
    • 1: FULL, data is passed through unmodified

VGA registers

Todo

write me

SR 0x02: PLANE_WRITE_MASK
  • bits 0-3: enable writes to corresponding planes
SR 0x03: FONT_SELECT
  • bits 0-1: bits 0-1 of font A select
  • bits 2-3: bits 0-1 of font B select
  • bit 4: bit 2 of font A select
  • bit 5: bit 2 of font B select
SR 0x04: MEMORY_CONTROL
  • bit 1: 1 if >64kiB memory on card [unused by hw]
  • bit 2: - 0: odd/even - 1: planar or chained mode
  • bit 3: - 0: planar or odd/even mode - 1: chained mode

Palette registers

VGA palette registers provided by PRM are simply aliases of DAC registers, except data port that also performs conversion.

reg8 nv1-io-pal-mask
nv1-prmio 0x3c6: PAL_MASK

All accesses forwarded to nv1-pdac-pal-mask.

reg8 nv1-io-pal-read
nv1-prmio 0x3c7: PAL_READ

All accesses forwarded to nv1-pdac-pal-read.

reg8 nv1-io-pal-write
nv1-prmio 0x3c8: PAL_WRITE

All accesses forwarded to nv1-pdac-pal-write.

reg8 nv1-io-pal-data
nv1-prmio 0x3c9: PAL_DATA

All accesses forwarded to nv1-pdac-pal-data. If nv1-prm-vga-config.DAC_WIDTH field is set to FULL, data is passed through unchanged. Otherwise, data is shifted left by 2 bits on writes, and 2 bits right on reads.

The VGA memory window

8-bit space nv1-prmfb [0x20000]
nv1-mmio 0x6e0000: PRMFB

Todo

write me

Interrupts

reg32 nv1-prm-intr
nv1-prm 0x100: INTR

Todo

write me

reg32 nv1-prm-intr-enable
nv1-prm 0x140: INTR_ENABLE

Todo

write me

Game port

PRM provides ISA-style game port access:

reg8 nv1-io-game-port
nv1-prmio 0x201: GAME_PORT

All accesses forwarded to nv1-pdac-game-port.

MPU

reg32 nv1-prm-mpu-state
nv1-prm 0x400: MPU_STATE

Todo

write me

Access log

reg32 nv1-prm-alog-config
nv1-prm 0x1f00: ALOG_CONFIG

Todo

write me

reg32 nv1-prm-alog-pos
nv1-prm 0x1f10: ALOG_POS

Todo

write me

reg32 nv1-prm-alog-ignore-a
nv1-prm 0x1f20: ALOG_IGNORE_A

Todo

write me

reg32 nv1-prm-alog-ignore-b
nv1-prm 0x1f24: ALOG_IGNORE_B

Todo

write me