Memory mapped registers: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 32: | Line 32: | ||
|[[68k/Z80 communication|Read Z80 reply code]] | |[[68k/Z80 communication|Read Z80 reply code]] | ||
|Send command to Z80 | |Send command to Z80 | ||
||[[NEO- | ||[[NEO-C1]] | ||
|- | |- | ||
|$320001 | |$320001 | ||
| Line 39: | Line 39: | ||
{{8BitRegister|NEC D4990 data bit|1|NEC D4990 time pulse|1|Jumper "type", 1 on 1FZ|1|1 on 1FZ|2|Service|1|Coin 2|1|Coin 1|1}} | {{8BitRegister|NEC D4990 data bit|1|NEC D4990 time pulse|1|Jumper "type", 1 on 1FZ|1|1 on 1FZ|2|Service|1|Coin 2|1|Coin 1|1}} | ||
|? | |? | ||
| | |[[NEO-F0]] | ||
|- | |- | ||
|$340000 | |$340000 | ||
| Line 73: | Line 73: | ||
|? | |? | ||
|{{8BitRegister|?|5|Slot #|3|}} | |{{8BitRegister|?|5|Slot #|3|}} | ||
|[[NEO-F0]] | |[[NEO-F0]] | ||
|- | |- | ||
|$380031 | |$380031 | ||
| Line 98: | Line 98: | ||
| | | | ||
|Chute 1 coin lockout -> High | |Chute 1 coin lockout -> High | ||
| | |[[NEO-I0]] | ||
|- | |- | ||
|$380063 | |$380063 | ||
| Line 116: | Line 116: | ||
| | | | ||
|Chute 2 coin counter -> High | |Chute 2 coin counter -> High | ||
| | |[[NEO-I0]] | ||
|- | |- | ||
|$3800D1 | |$3800D1 | ||
| Line 129: | Line 129: | ||
|? | |? | ||
|Chute 1 coin lockout -> Low | |Chute 1 coin lockout -> Low | ||
| | |[[NEO-I0]] | ||
|- | |- | ||
|$3800E3 | |$3800E3 | ||
| Line 135: | Line 135: | ||
|? | |? | ||
|Chute 2 coin lockout -> Low | |Chute 2 coin lockout -> Low | ||
| | |[[NEO-I0]] | ||
|- | |- | ||
|$3800E5 | |$3800E5 | ||
| Line 141: | Line 141: | ||
|? | |? | ||
|Chute 1 coin counter -> Low | |Chute 1 coin counter -> Low | ||
| | |[[NEO-I0]] | ||
|- | |- | ||
|$3800E7 | |$3800E7 | ||
| Line 147: | Line 147: | ||
|? | |? | ||
|Chute 2 coin counter -> Low | |Chute 2 coin counter -> Low | ||
| | |[[NEO-I0]] | ||
|} | |} | ||
Revision as of 14:50, 28 June 2012
I/O registers
Always read/written as bytes (?)
| Address | Name | Read | Write | Handled by | ||||||||||||||||||
| $300000 | REG_P1CNT | Player 1 controls (active low)
|
? | NEO-C1 | ||||||||||||||||||
| $300001 | REG_DIPSW | Hardware DIPs (active low)
|
Kick watchdog | NEO-F0 (read) | ||||||||||||||||||
| $300081 | ? | Read only | ? | ? | ||||||||||||||||||
| $320000 | REG_SOUND | Read Z80 reply code | Send command to Z80 | NEO-C1 | ||||||||||||||||||
| $320001 | REG_STATUS_A | Switch inputs are active low
|
? | NEO-F0 | ||||||||||||||||||
| $340000 | REG_P2CNT | Player 2 controls (active low)
|
? | NEO-C1 | ||||||||||||||||||
| $380000 | REG_STATUS_B | Aux inputs (active low)
|
? | NEO-C1 | ||||||||||||||||||
| $380001 | REG_POUTPUT | ? | Joypad ports outputs
MAME select_controller |
NEO-D0 | ||||||||||||||||||
| $380011 | REG_CRDBANK | ? |
|
NEO-D0 | ||||||||||||||||||
| $380021 | REG_SLOT | ? |
|
NEO-F0 | ||||||||||||||||||
| $380031 | REG_LEDLATCHES | ? | MAME set_output_latch
Data is latched on falling edge (1 to 0 transition) |
NEO-F0 | ||||||||||||||||||
| $380041 | REG_LEDDATA | ? | MAME set_output_data (for LEDs and EL panel) | NEO-F0 | ||||||||||||||||||
| $380051 | REG_RTCCTRL | ? | MAME upd4990a_control_16_w (Calendar)
|
NEO-F0? | ||||||||||||||||||
| $380061 | ? | Chute 1 coin lockout -> High | NEO-I0 | |||||||||||||||||||
| $380063 | ? | Chute 2 coin lockout -> High | NEO-I0 | |||||||||||||||||||
| $380065 | ? | Chute 1 coin counter -> High | NEO-I0 | |||||||||||||||||||
| $380067 | ? | Chute 2 coin counter -> High | NEO-I0 | |||||||||||||||||||
| $3800D1 | ? | Write to RTC
uPD4990AWrite(byteValue & 2, byteValue & 4, byteValue & 1); |
? | |||||||||||||||||||
| $3800E1 | ? | ? | Chute 1 coin lockout -> Low | NEO-I0 | ||||||||||||||||||
| $3800E3 | ? | ? | Chute 2 coin lockout -> Low | NEO-I0 | ||||||||||||||||||
| $3800E5 | ? | ? | Chute 1 coin counter -> Low | NEO-I0 | ||||||||||||||||||
| $3800E7 | ? | ? | Chute 2 coin counter -> Low | NEO-I0 | ||||||||||||||||||
System registers
Handled by a 74HC259 adressable latch on cart systems. Byte writes only.
| Address | Name | Write |
| $3A0001 | REG_NOSHADOW | Normal video output |
| $3A0011 | REG_SHADOW | Darken video output |
| $3A0003 | REG_SWPBIOS | Use the BIOS vector table |
| $3A0013 | REG_SWPROM | Use the cart's vector table |
| $3A0005 | REG_CRDUNLOCK1 | Enable writes to memory card (use REG_CRDUNLOCK2 too) |
| $3A0015 | REG_CRDLOCK1 | Disable writes to memory card |
| $3A0007 | REG_CRDLOCK2 | Disable writes to memory card |
| $3A0017 | REG_CRDUNLOCK2 | Enable writes to memory card (use REG_CRDUNLOCK1 too) |
| $3A0009 | REG_CRDREGSEL | Enable "Register select" for memory card |
| $3A0019 | REG_CRDNORMAL | Disable "Register select" for memory card |
| $3A000B | REG_BRDFIX | Use the embedded SFIX and SM1 ROM |
| $3A001B | REG_CRTFIX | Use the cart's S ROM and M1 ROM |
| $3A000D | REG_SRAMLOCK | Write-protects backup RAM (MVS) |
| $3A001D | REG_SRAMULOCK | Unprotects backup RAM (MVS) |
| $3A000F | REG_PALBANK1 | Use palette bank 1 |
| $3A001F | REG_PALBANK0 | Use palette bank 0 |
Video registers
Handled by the GPUs. Only word access.
| Address | Name | Read | Write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $3C0000 | REG_VRAMADDR | Read VRAM (address isn't changed) | Sets VRAM address | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $3C0002 | REG_VRAMRW | Read VRAM (address isn't changed) | Write VRAM | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $3C0004 | REG_VRAMMOD | Reads VRAM address modulo | Sets VRAM address modulo (signed) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $3C0006 | REG_LSPCMODE |
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $3C0008 | REG_TIMERHIGH | Invalid | MSBs of timer reload value. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $3C000A | REG_TIMERLOW | Invalid | LSBs of timer reload value. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $3C000C | REG_IRQACK | Invalid | Interrupt Acknowledge (byte !).
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $3C000E | REG_TIMERSTOP | Invalid | Bit 0=1: Stop timer counter for 32 raster lines when in PAL mode | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NeoGeo CD registers
| Address | Name | Size | Read | Write | Handled by | ||||||||||||||||||||||||||||||||||
| $FF0002 | ? | Word | ? | NeoRaine load_files | ? | ||||||||||||||||||||||||||||||||||
| $FF0004 | ? | Word | ? | CDM3-2 BIOS writes 0,1,3,7 | ? | ||||||||||||||||||||||||||||||||||
| $FF000E | ? | Byte | ? | CDM3-2 BIOS writes $3F,$3C | ? | ||||||||||||||||||||||||||||||||||
| $FF000F | ? | Byte | ? | NeoCDIRQUpdate(byteValue);
CDM3-2 BIOS writes $20,$10,$08,$04 |
? | ||||||||||||||||||||||||||||||||||
| $FF0011 | ? | Byte | ? | CDM3-2 BIOS writes $FE | ? | ||||||||||||||||||||||||||||||||||
| $FF0017 | ? | Byte | nNeoCDMode
CDM3-2 BIOS read/writes bit 0 |
? | |||||||||||||||||||||||||||||||||||
| $FF0061 | ? | Byte | ? | Bit 6: Execute DMA microcode | LC8953 | ||||||||||||||||||||||||||||||||||
| $FF0064~$FF0070 | ? | (Long)words | ? | Registers used by microcode (NeoRaine upload_param) | |||||||||||||||||||||||||||||||||||
| $FF007E~$FF008F | ? | Words | ? | Microcode (16x9bit instructions ?) | |||||||||||||||||||||||||||||||||||
| $FF0101 | ? | Byte | ? | nLC8951Register = byteValue & 0x0F
CDM3-2 BIOS writes low nibble |
LC8951 | ||||||||||||||||||||||||||||||||||
| $FF0103 | ? | Byte | CDM3-2 BIOS: sequential read/writes | LC8951 | |||||||||||||||||||||||||||||||||||
| $FF0105 | ? | Byte | ? | nActiveTransferArea = byteValue
upload_type_w |
? | ||||||||||||||||||||||||||||||||||
| $FF0108 | ? | Word | ? | CDM3-2 BIOS writes $5555 | ? | ||||||||||||||||||||||||||||||||||
| $FF010C | ? | Word | ? | CDM3-2 BIOS writes $5555 and reads | ? | ||||||||||||||||||||||||||||||||||
| $FF0111 | REG_DISBLSPR | Byte | ? | Disable/enable sprites ? | NEO-GRC/NEO-OFC | ||||||||||||||||||||||||||||||||||
| $FF0115 | REG_DISBLFIX | Byte | ? | Disable/enable fix layer | |||||||||||||||||||||||||||||||||||
| $FF0119 | REG_ENVIDEO | Byte | ? | Enable/disable video output ? (disable works) | |||||||||||||||||||||||||||||||||||
| $FF011C | REG_CDCONFIG | Word |
|
? | NEO-CDD board | ||||||||||||||||||||||||||||||||||
| $FF0121 | REG_UPMAPSPR | Byte | ? | NeoSetSpriteSlot(1);
Set upload zone to SPR DRAM |
? | ||||||||||||||||||||||||||||||||||
| $FF0123 | REG_UPMAPPCM | Set upload zone to PCM DRAM | |||||||||||||||||||||||||||||||||||||
| $FF0127 | REG_UPMAPZ80 | Set upload zone to Z80 DRAM | |||||||||||||||||||||||||||||||||||||
| $FF0129 | REG_UPMAPFIX | Set upload zone to FIX DRAM | |||||||||||||||||||||||||||||||||||||
| $FF0141 | REG_UPUNMAPSPR | Unset SPR DRAM to upload zone | |||||||||||||||||||||||||||||||||||||
| $FF0143 | REG_UPUNMAPPCM | Unset PCM DRAM to upload zone | |||||||||||||||||||||||||||||||||||||
| $FF0147 | REG_UPUNMAPZ80 | Unset Z80 DRAM to upload zone | |||||||||||||||||||||||||||||||||||||
| $FF0149 | REG_UPUNMAPFIX | Unset FIX DRAM to upload zone | |||||||||||||||||||||||||||||||||||||
| $FF0163 | ? | ? | ? | NeoCDCommsWrite(byteValue) | ? | ||||||||||||||||||||||||||||||||||
| $FF0165 | ? | ? | ? | NeoCDCommsControl(byteValue & 1, byteValue & 2); | ? | ||||||||||||||||||||||||||||||||||
| $FF016D | Byte | ? | MapVectorTable(!(byteValue == 0xFF)); | ? | |||||||||||||||||||||||||||||||||||
| $FF016F | REG_DISBLIRQ | Byte | ? | Disable/enable interrupts nTransferWriteEnable = byteValue | ? | ||||||||||||||||||||||||||||||||||
| $FF0181 | Byte | ? | Enable/disable(reset) CD assy | ? | |||||||||||||||||||||||||||||||||||
| $FF0183 | REG_ENZ80 | Byte | ? | Enable/disable(reset) Z80 | ? | ||||||||||||||||||||||||||||||||||
| $FF0188 | REG_CDDALEFTL | Word | See Reading CDDA sound levels | No effect | NEO-MGA | ||||||||||||||||||||||||||||||||||
| $FF018A | REG_CDDARIGHTL | ||||||||||||||||||||||||||||||||||||||
| $FF01A1 | ? | Byte | ? | Upload zone 1MiB SPR DRAM bank selection | ? | ||||||||||||||||||||||||||||||||||
| $FF01A3 | ? | Byte | ? | Upload zone 1MiB PCM DRAM bank selection | ? | ||||||||||||||||||||||||||||||||||
| $FF01A7 | ? | Byte | ? | CDM3-2 BIOS writes | ? | ||||||||||||||||||||||||||||||||||
| $FF01FC | ? | Word | ? | CDDA control ? | ? | ||||||||||||||||||||||||||||||||||
| $FF01FE | ? | Word | ? | CD DA/data switch ? | ? | ||||||||||||||||||||||||||||||||||