Memory mapped registers

From NeoGeo Development Wiki
Revision as of 19:19, 10 February 2011 by Furrtek (talk | contribs) (Created page with "{| border="1" |Address |Name |Size |Read |Write |- |$300000 |REG_P1CNT |Byte |Player 1 controls (active low) {{8BitRegister|D|1|C|1|B|1|A|1|Right|1|Left|1|Down|1|Up|1}} |? |- |$3…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Address Name Size Read Write
$300000 REG_P1CNT Byte Player 1 controls (active low)
Bit 7 6 5 4 3 2 1 0
Def D CBARightLeftDownUp
?
$300001 REG_DIPSW Byte Dipswitches (active low)
Bit 7 6 5 4 3 2 1 0
Def Freeze FreeplayCoin meters ?Autofire?Test mode
Kick watchdog
$300081 ? Byte? ? ?
$320000 REG_SOUND Byte Out to Z80 In from Z80
$320001 REG_STATUS_A Byte
Bit 7 6 5 4 3 2 1 0
Def ?
?
$340000 REG_P2CNT Byte Player 2 controls (active low)
Bit 7 6 5 4 3 2 1 0
Def D CBARightLeftDownUp
?
$380000 REG_STATUS_B Byte
Bit 7 6 5 4 3 2 1 0
Def ? Memory card write protectMemory card insertedSelect P2Start P2Select P1Start P1
?
$380000 ? Byte ? MAME select_controller
$380030 ? Byte ? MAME set_output_latch
$380040 ? Byte ? MAME set_output_data
$380050 ? Byte ? MAME upd4990a_control_16_w
$380001 ? Byte ? Joypad ports outputs
Bit 7 6 5 4 3 2 1 0
Def ? P2 outputsP1 outputs


Address Name Size Read Write
$3A0001 REG_DISPENABL Byte Invalid Normal video output
$3A0011 REG_DISPDSABL Byte Invalid Darken video output
$3A0003 ? Byte Invalid Use the BIOS vector table
$3A0013 REG_SWPROM Byte Invalid Use the cart's vector table
See ASM Defines.
$3A000B REG_BRDFIX Byte Invalid Use the embeded fix tileset (SFIX)
$3A001B REG_CRTFIX Byte Invalid Use the cart's fix tileset
$3A000D REG_SRAMLOCK Byte Invalid Write-protects the SRAM (MVS)
$3A001D REG_SRAMULOCK Byte Invalid Unprotects SRAM (MVS)
$3A000F REG_PALBANK1 Byte Invalid Use palette bank 1
$3A001F REG_PALBANK0 Byte Invalid Use palette bank 0

Needs translation:

Address Name Size Read Write
$3C0000 REG_VRAMADDR Word Read VRAM (address isn't changed) Sets VRAM address
$3C0002 REG_VRAMRW Word Read VRAM (address isn't changed) Write VRAM
$3C0004 Word REG_VRAMINC Reads VRAM address modulo Sets VRAM address modulo (signed)
$3C0006 Word REG_HBLANKCNT 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Compteur de ligne vidéo (format ?) ? 1:50Hz 0:60Hz Compteur d'animation auto $00F8-$00FF : Vertical sync $0100-$010F : Top border $0110-$01EF : Active display $01F0-$01FF : Bottom border Voir ce diagramme.

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Vitesse de l'animation auto Recharger à chaque HBlank

Recharger à chaque VBlank

Prochaine interruption HBlank dans x lignes

Int.HBlank activée Désactiver l'animation automatique ?

$3C0008 Word REG_HBLANKPOS Invalid Position (pixels) à laquelle l'interruption HBlank sera déclenchée (MSB)
$3C000A ? Word Invalid Position (pixels) à laquelle l'interruption HBlank sera déclenchée (LSB)
$3C000C REG_IRQACK Byte Invalid Interrupt Acknowledge.

Obligatoire, sert de prévention anti-nesting. Toujours répondre correctement à la fin d'un interruption.

7 6 5 4 3 2 1 0

 	ACK VBlank 	ACK HBlank 	ACK IRQ3
$3C000E

$3C000F

? ? Certains émulateurs traitent cette adresse de la même façon que $3C000A.

MAME ne s'en occupe pas. Aucun jeu n'en dépend.

La même chose.

NeoGeo CD only (from NeoCD's source):

$FF011C (word): read: return 0xff | (region_code << 8); $FF0002 (word) $FF007E,$FF008f (word) dma_mode $FF0105 (byte) upload_type_w $FF0111 (byte) spr_disable $FF0115 (byte) fix_disable $FF0119 (byte) video_enable $FF016F (byte) disable_irq_w $FF0183 (byte) z80_enable