From 1d4c9a886185b12bda91b0cdd4f562e29d6ba6fe Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 7 Dec 2019 21:52:47 +1100 Subject: dec0.cpp: restore comment that was removed (nw) --- src/mame/drivers/dec0.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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) -- cgit v1.2.3