IO Registers: Difference between revisions

From MegaDrive Development Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 30: Line 30:
| $A10003
| $A10003
| REG_DATA1
| REG_DATA1
| Status of each pin (direction is controller by REG_CTRL1)
| Read the status of each pin (direction is controller by REG_CTRL1)
{{8BitRegister|PD7|1|PD6|1|PD5|1|PD4|1|PD3|1|PD2|1|PD1|1|PD0|1}}
| Set the status of each pin (ignored for input pins)
{{8BitRegister|PD7|1|PD6|1|PD5|1|PD4|1|PD3|1|PD2|1|PD1|1|PD0|1}}
{{8BitRegister|PD7|1|PD6|1|PD5|1|PD4|1|PD3|1|PD2|1|PD1|1|PD0|1}}
| ?
|-
|-
| $A10005
| $A10005
Line 38: Line 39:
| Status of each pin (direction is controller by REG_CTRL2)
| Status of each pin (direction is controller by REG_CTRL2)
{{8BitRegister|PD7|1|PD6|1|PD5|1|PD4|1|PD3|1|PD2|1|PD1|1|PD0|1}}
{{8BitRegister|PD7|1|PD6|1|PD5|1|PD4|1|PD3|1|PD2|1|PD1|1|PD0|1}}
|?
| Set the status of each pin (ignored for input pins)
{{8BitRegister|PD7|1|PD6|1|PD5|1|PD4|1|PD3|1|PD2|1|PD1|1|PD0|1}}
|-
|-
| $A10007
| $A10007
Line 44: Line 46:
| Status of each pin (direction is controller by REG_CTRL3)
| Status of each pin (direction is controller by REG_CTRL3)
{{8BitRegister|PD7|1|PD6|1|PD5|1|PD4|1|PD3|1|PD2|1|PD1|1|PD0|1}}
{{8BitRegister|PD7|1|PD6|1|PD5|1|PD4|1|PD3|1|PD2|1|PD1|1|PD0|1}}
|?
| Set the status of each pin (ignored for input pins)
{{8BitRegister|PD7|1|PD6|1|PD5|1|PD4|1|PD3|1|PD2|1|PD1|1|PD0|1}}
|-
|-
| $A10009
| $A10009
| REG_CTRL1
| REG_CTRL1
| ?
| Read the direction of the pins
| Select the direction of the pin (0 = input, 1 = output)
{{8BitRegister|INT|1|PC6|1|PC5|1|PC4|1|PC3|1|PC2|1|PC1|1|PC0|1}}
{{8BitRegister|INT|1|PC6|1|PC5|1|PC4|1|PC3|1|PC2|1|PC1|1|PC0|1}}
| Select the direction of the pins
{{8BitRegister
|INT
0 : TH-INT Prohibited
1 : TH-INT Allowed
|1
|PC6
0 : input
1 : output
|1
|PC5
0 : input
1 : output
|1
|PC4
0 : input
1 : output
|1
|PC3
0 : input
1 : output
|1
|PC2
0 : input
1 : output
|1
0 : input
1 : output
|PC1
0 : input
1 : output
|1
|PC0
0 : input
1 : output
|1
}}
|-
|-
| $A1000B
| $A1000B
| REG_CTRL2
| REG_CTRL2
| ?
| Read the direction of the pins
| Select the direction of the pin (0 = input, 1 = output)
{{8BitRegister|INT|1|PC6|1|PC5|1|PC4|1|PC3|1|PC2|1|PC1|1|PC0|1}}
{{8BitRegister|INT|1|PC6|1|PC5|1|PC4|1|PC3|1|PC2|1|PC1|1|PC0|1}}
| Select the direction of the pin
{{8BitRegister
|INT
0 : TH-INT Prohibited
1 : TH-INT Allowed
|1
|PC6
0 : input
1 : output
|1
|PC5
0 : input
1 : output
|1
|PC4
0 : input
1 : output
|1
|PC3
0 : input
1 : output
|1
|PC2
0 : input
1 : output
|1
0 : input
1 : output
|PC1
0 : input
1 : output
|1
|PC0
0 : input
1 : output
|1
}}
|-
|-
| $A1000D
| $A1000D
| REG_CTRL3
| REG_CTRL3
| ?
| Read the direction of the pins
| Select the direction of the pin (0 = input, 1 = output)
{{8BitRegister|INT|1|PC6|1|PC5|1|PC4|1|PC3|1|PC2|1|PC1|1|PC0|1}}
{{8BitRegister|INT|1|PC6|1|PC5|1|PC4|1|PC3|1|PC2|1|PC1|1|PC0|1}}
| Select the direction of the pin
{{8BitRegister
|INT
0 : TH-INT Prohibited
1 : TH-INT Allowed
|1
|PC6
0 : input
1 : output
|1
|PC5
0 : input
1 : output
|1
|PC4
0 : input
1 : output
|1
|PC3
0 : input
1 : output
|1
|PC2
0 : input
1 : output
|1
0 : input
1 : output
|PC1
0 : input
1 : output
|1
|PC0
0 : input
1 : output
|1
}}
|-
|-
| $A1000F
| $A1000F
Line 231: Line 423:
|1
|1
|?|3}}
|?|3}}
|}
|-
|$A14000
|REG_LOCK
| ?
| Writing 'SEGA' (0x53454741) unlock the VDP.
 
Writing something else lock the VDP.
|-
|$A14101
|REG_TMSS
| ?
| {{8BitRegister|?|7
|0 : Disable cartridge and enable [[TMSS|TMSS]] rom
 
1 : Disable [[TMSS|TMSS]] rom and enable cartridge
}}


[[Category:MegaDrive]]
[[Category:MegaDrive]]

Latest revision as of 18:13, 8 February 2013

Address Name Read Write
$A10001 REG_VERSION
Bit 7 6 5 4 3 2 1 0
Def 0 : Domestic (Japanese model)

1 : Oversea (US or European model)

0 : NTSC Clock (7.67Mhz)

1 : PAL Clock (7.60Mhz)

0 : Expansion unit connected

1 : Expansion unit not connected

 ? Version number
?
$A10003 REG_DATA1 Read the status of each pin (direction is controller by REG_CTRL1)
Bit 7 6 5 4 3 2 1 0
Def PD7 PD6PD5PD4PD3PD2PD1PD0
Set the status of each pin (ignored for input pins)
Bit 7 6 5 4 3 2 1 0
Def PD7 PD6PD5PD4PD3PD2PD1PD0
$A10005 REG_DATA2 Status of each pin (direction is controller by REG_CTRL2)
Bit 7 6 5 4 3 2 1 0
Def PD7 PD6PD5PD4PD3PD2PD1PD0
Set the status of each pin (ignored for input pins)
Bit 7 6 5 4 3 2 1 0
Def PD7 PD6PD5PD4PD3PD2PD1PD0
$A10007 REG_DATA3 Status of each pin (direction is controller by REG_CTRL3)
Bit 7 6 5 4 3 2 1 0
Def PD7 PD6PD5PD4PD3PD2PD1PD0
Set the status of each pin (ignored for input pins)
Bit 7 6 5 4 3 2 1 0
Def PD7 PD6PD5PD4PD3PD2PD1PD0
$A10009 REG_CTRL1 Read the direction of the pins
Bit 7 6 5 4 3 2 1 0
Def INT PC6PC5PC4PC3PC2PC1PC0
Select the direction of the pins
Bit 7 6 5 4 3 2 1 0
Def INT

0 : TH-INT Prohibited

1 : TH-INT Allowed

PC6

0 : input

1 : output

PC5

0 : input

1 : output

PC4

0 : input

1 : output

PC3

0 : input

1 : output

PC2

0 : input

1 : output

PC1

0 : input

1 : output

PC0

0 : input

1 : output

$A1000B REG_CTRL2 Read the direction of the pins
Bit 7 6 5 4 3 2 1 0
Def INT PC6PC5PC4PC3PC2PC1PC0
Select the direction of the pin
Bit 7 6 5 4 3 2 1 0
Def INT

0 : TH-INT Prohibited

1 : TH-INT Allowed

PC6

0 : input

1 : output

PC5

0 : input

1 : output

PC4

0 : input

1 : output

PC3

0 : input

1 : output

PC2

0 : input

1 : output

PC1

0 : input

1 : output

PC0

0 : input

1 : output

$A1000D REG_CTRL3 Read the direction of the pins
Bit 7 6 5 4 3 2 1 0
Def INT PC6PC5PC4PC3PC2PC1PC0
Select the direction of the pin
Bit 7 6 5 4 3 2 1 0
Def INT

0 : TH-INT Prohibited

1 : TH-INT Allowed

PC6

0 : input

1 : output

PC5

0 : input

1 : output

PC4

0 : input

1 : output

PC3

0 : input

1 : output

PC2

0 : input

1 : output

PC1

0 : input

1 : output

PC0

0 : input

1 : output

$A1000F REG_TXDATA1
$A10011 REG_RXDATA1
$A10013 REG_S_CTRL1
Bit 7 6 5 4 3 2 1 0
Def ? 0 : OK

1 : Rxd Error

0 : OK

1 : Rxd Ready

0 : OK

1 : TxdFull

Bit 7 6 5 4 3 2 1 0
Def 0: 4800 bps

1: 2400 bps

2: 1200 bps

3: 300 bps

0 : Parallel mode

1 : Serial in

0 : Parallel mode

1 : Serial out

0 : Rxd Ready - Interrupt Prohibited

1 : Rxd Ready - Interrupt Allowed

?
$A10015 REG_TXDATA2
$A10017 REG_RXDATA2
$A10019 REG_S_CTRL2
Bit 7 6 5 4 3 2 1 0
Def ? 0 : OK

1 : Rxd Error

0 : OK

1 : Rxd Ready

0 : OK

1 : TxdFull

Bit 7 6 5 4 3 2 1 0
Def 0: 4800 bps

1: 2400 bps

2: 1200 bps

3: 300 bps

0 : Parallel mode

1 : Serial in

0 : Parallel mode

1 : Serial out

0 : Rxd Ready - Interrupt Prohibited

1 : Rxd Ready - Interrupt Allowed

?
$A1001B REG_TXDATA3
$A1001D REG_RXDATA3
$A1001F REG_S_CTRL3
Bit 7 6 5 4 3 2 1 0
Def ? 0 : OK

1 : Rxd Error

0 : OK

1 : Rxd Ready

0 : OK

1 : TxdFull

Bit 7 6 5 4 3 2 1 0
Def 0: 4800 bps

1: 2400 bps

2: 1200 bps

3: 300 bps

0 : Parallel mode

1 : Serial in

0 : Parallel mode

1 : Serial out

0 : Rxd Ready - Interrupt Prohibited

1 : Rxd Ready - Interrupt Allowed

?
$A14000 REG_LOCK ? Writing 'SEGA' (0x53454741) unlock the VDP.

Writing something else lock the VDP.

$A14101 REG_TMSS ?
Bit 7 6 5 4 3 2 1 0
Def ? 0 : Disable cartridge and enable TMSS rom

1 : Disable TMSS rom and enable cartridge