Battle Box: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(create from krzysiobal's RE notes)
 
(→‎($4017 Read): expand how to use)
Line 13: Line 13:
     +------ Data line to the two EEPROMs
     +------ Data line to the two EEPROMs


The data line toggles after each time this is read, so the actual value is the opposite of what was last read
The data line toggles after each time this is read, so the actual value is the opposite of what was last read.
You cannot directly set the data output; you must read this port until it's the opposite of what you want.


====($4016 Write)====
====($4016 Write)====

Revision as of 18:33, 15 April 2021

The Battle Box is a Famicom expansion port device holding 512 bytes of EEPROM.

The TC89102 EEPROMs used are similar to standard microwire EEPROMs, except that the address is entered before the command. These are configured for 8 bits of address and 16 bits of data.

Hardware interface

Input

($4017 Read)

7  bit  0
---- ----
xxxW Rxxx
   | |
   | +---- see below
   +------ Data line to the two EEPROMs

The data line toggles after each time this is read, so the actual value is the opposite of what was last read. You cannot directly set the data output; you must read this port until it's the opposite of what you want.

($4016 Write)

7  bit  0
---- ----
xxxx xxxS
        |
        +- Clock line to the two TC89102 EEPROMs

If "S" is high during a read from $4017, it toggles which of two EEPROMs are enabled.

Output

($4017 Read)

7  bit  0
---- ----
xxxW Rxxx
   | |
   | +---- bitwise NOT of the value read from the EEPROM
   +------ see above

See also

Krzysiobal's reverse-engineered schematic and the TC89102 datasheet