summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-12-07 21:52:47 +1100
committer Vas Crabb <vas@vastheman.com>2019-12-07 21:56:03 +1100
commit1d4c9a886185b12bda91b0cdd4f562e29d6ba6fe (patch)
treef6e488fd135a85630fe8ba47d6fdcf57d10bd1c0 /src
parentb1de88f51dd07d55b0f8835e2a5a8957ad7690a1 (diff)
dec0.cpp: restore comment that was removed (nw)
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/dec0.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mame/drivers/dec0.cpp b/src/mame/drivers/dec0.cpp
index 8c7050aa4e3..5d21ca1f196 100644
--- a/src/mame/drivers/dec0.cpp
+++ b/src/mame/drivers/dec0.cpp
@@ -56,6 +56,30 @@ ToDo:
- background pen in Birdie Try is presumably wrong.
- Pixel clock frequency isn't verified
+Bad Dudes MCU implements a command to calculate a program ROM checksum and
+compare the low byte of the result to a value supplied by the host CPU, but it
+doesn't work. Here's the code in question:
+
+0AB0: 51 50 acall $0A50
+0AB2: C3 clr c
+0AB3: 48 orl a,r0
+0AB4: 70 02 jnz $0AB8
+0AB6: 80 89 sjmp $0A41
+0AB8: 21 F0 ajmp $09F0
+
+The function at $0A50 reads the expected value from the host, $0A41 is the
+normal command response, and $09F0 is the error response. The orl instruction
+doesn't make sense here. However, changing it from 48 to 60 makes it an xrl
+instruction which would work as expected. The game doesn't issue this command.
+The checksum function can't be used to verify that the program is good because
+the expected value mod 256 has to be supplied by the host.
+
+Bad Dudes only seems to use commands $0B (sync), $01 (reset if parameter is not
+$3B), $07 (return table index if parameter matches table, otherwise reset), and
+$09 (set table index to zero). Dragonninja only seems to use commands $03 (on
+startup), $07 (same function as Bad Dudes) and $09 (same function as Bad Dudes).
+Most of the MCU program isn't utilised.
+
Guru-Readme for Data East 16 bit games (Updated 7-Feb-2017)