Battle Box - another save-state utility

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

Post Reply
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Battle Box - another save-state utility

Post by krzysiobal »

Thanks to our russian friends
https://translate.google.com/translate? ... 068.0.html
we are able to see how this rare accessory, uses by only the following games looks like:
* Battle Stadium: Senbatsu Pro Yakyuu
* Armadillo
* J-League Fighting Soccer - The King of Ace Strikers
* Seiryaku Simulation - Inbou no Wakusei - Shancara

Image Image Image Image Image Image Image

Battle Box consists of two serial 128 x 16bit EEPROM memories (TC89102) and two JK flip-flops to control them. While the logical layout of memory content seems to resemble some kind of simple "file system", so that it can be shared among different games, i'm still trying to understand how the communication physically looks like.

Image

* OUT0 ($4016.D0) is directly to memories' clock
* memories' DO is connected to $4017.D4, so CPU gets inversion of the line (after passing thru 74368)
* flip flop's Q, wired to memories DI, toggles every time $4017 is read (and its inversion can be read back by $4017.D4) so CPU sees the same is on DI but looking how the 4017 read cycle looks like it turns out that CPU will see what was at the memory DI but at the end of this cycle, the value will be toggled (so in fact value read by $4017.D4 will be opposite of what will be at memory DI)

Code: Select all

M2        ______------_________
4017_CLK  ------______---------
DI--------------[ B  ][  not B  ]
                  |
                  +-- CPU will read this
* every time $4017 is read when $4016.D0 is 1, the active memory will be switched from one to another (there is no reset signal so in fact, nobody knows which memory is active)
Attachments
89102p.pdf
(408.88 KiB) Downloaded 79 times
4027.pdf
(269.21 KiB) Downloaded 66 times
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: Battle Box - another save-state utility

Post by NewRisingSun »

I am afraid I understand nothing, neither this description, nor what is on the wiki. How can a read cause both an input and an output?

Edit: A normal microwire serial EEPROM with two chips that I can understand works like this: I have a CLK bit that I write 0 or 1 to, I have two Chip Select bits, one for each chip, and I have either a DAT bit and a direction bit, or a DAT bit for reading and a DAT bit for writing, for example like mapper 164. How does the BattleBox' flip-flop thing correspond to such a more conventional setup?
Last edited by NewRisingSun on Thu Apr 15, 2021 4:39 am, edited 1 time in total.
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Battle Box - another save-state utility

Post by krzysiobal »

Reads from $4017 returns
* $4017.3 - negation of the memory Data-Out
* $4017.4 - negation of the internal latch that will go to memory Data-In when CLK (=$4016.0) changes from 0 to 1
There is no direct way to set or clear the value of internal latch. But it can be changed 0->1 and 1->0 each time read from $4017 occurs
Last edited by krzysiobal on Thu Apr 15, 2021 4:40 am, edited 1 time in total.
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: Battle Box - another save-state utility

Post by NewRisingSun »

Okay, so the difference to a conventional setup is that instead of writing the desired DAT value into a register then pulling the clock high, I read a register once or twice until it has the DAT value (or its opposite) I want and then pull the clock high?
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Battle Box - another save-state utility

Post by krzysiobal »

Exactly.
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Battle Box - another save-state utility

Post by nocash »

I've examined the games that support that thing some years ago, https://problemkaputt.de/everynes.htm#storagebattlebox
homepage - patreon - you can think of a bit as a bottle that is either half full or half empty
Post Reply