“Firing in the corner” glitch

The patched blue rom set is available from Sean Riddle’s site:

For persons attempting to use this in MAME,

  • patrobotron.zip needs to be renamed to robotron.zip and stored in the Roms folder of the MAME program
  • you have to edit with notepad and change the ….src\mame\drivers\williams.c entries to this below. then recompile your mame.exe

ROM_LOAD( “robotron.sbb”, 0x0e000, 0x1000, CRC(e83a2eda) SHA1(4A62FCD2F91DFB609C3D2C300BD9E6CB60EDF52E) )

ROM_LOAD( “robotron.sb5”, 0x14000, 0x1000, CRC(827cb5c9) SHA1(1732D16CD88E0662F1CFFCE1AEDA5C8AA8C31338) )

For persons attempting to burn fixed Roms for a real Williams arcade machine.

  •  Each ROM file corresponds to an EPROM on the game- numbers 1-9 are the same
  •  The MAME files A, B and C correspond to EPROMs 10, 11 and 12.
  •  If you already have the blue ROMs, then only EPROMs 5 and 11 have to be replaced
  • 2732 Roms are available from- http://www.epromman.com/
  • You can obtain Rom burning services from various online locations, or seeking out members on the KLOV forums
  • OK. I have analyzed this crash and found the cause. I’m still working on the patch … I’ve got one that works, but I haven’t gotten around to fixing the checksums yet.
  • Basically, when enforcers (and possibly other enemies) are killed by diagonal shots at certain screen locations, it is possible for a subroutine which handles the explosion, to jump to an unexpected location in the game’s code. When this happens, the game’s watchdog eventually kicks in and reboots the program.
  • In more detail: [I use the # to denote numbers in hexadecimal.]
  • The subroutine which handles the explosion is fairly complex. One of the things that it does is compute a number that should be between #0 and #10 (16 decimal). [Actually, if it result is 0, this is checked for and the routine is aborted]. This result is then subtracted from #10 to produce a new number which is then multiplied by #D (13 decimal). This result is added to #478C to produce a jump vector which handles the explosion.
  • Normally, this all works. However, on rare occasions, it is possible for the first computation to result in a number larger than #10. In the .INP file supplied, this first result is #29. When subtracted from #10, a the result is #E7 which is then multiplied by #D and gives an offset of #BBB. When added to #478C, the result is #5347, which is the address the program eventually jumps to a few instructions later.
  • Well, #5347 is not even program code, it is data code. But the program tries to execute from here anyway, and before long the watchdog kicks in and resets the game.
  • I have written a patch which hooks into the game right after the first result is computed. It jumps to a new subroutine which checks if this result is over #10, and if it is, to set it to #10, and then return to the program. It seems to work. However, this game has some complex checksum routines which must also be tricked, in order for this patch to really work properly. (Jump ahead to knowledge learned after this was written- this code issue was actually found by Christian Gingras and fixed by Larry DeMar in 1987 for PC releases of Robotron)

Here’s the patch (from http://seanriddle.com/robpatch.txt).  This patchfile patches the Blue Robotron ROM image to fix the ‘shot-in-the-corner’ bug

Offset $4990: From $0A To $7E Offset $4991: From $C2 To $4A Offset $4992: From $0A To $97 Offset $49B7: From $0A To $7E Offset $49B8: From $C2 To $4A Offset $49B9: From $0C To $A0 Offset $49E2: From $0A To $7E Offset $49E3: From $C2 To $4A Offset $49E4: From $0C To $A9 Offset $4A97: From $FF To $0A Offset $4A98: From $FF To $C2 Offset $4A99: From $FF To $27 Offset $4A9A: From $FF To $BE Offset $4A9B: From $FF To $0A Offset $4A9C: From $FF To $B9 Offset $4A9D: From $FF To $7E Offset $4A9E: From $FF To $49 Offset $4A9F: From $FF To $94 Offset $4AA0: From $FF To $0A Offset $4AA1: From $FF To $C2 Offset $4AA2: From $FF To $27 Offset $4AA3: From $FF To $B5 Offset $4AA4: From $FF To $0C Offset $4AA5: From $FF To $B8 Offset $4AA6: From $FF To $7E Offset $4AA7: From $FF To $49 Offset $4AA8: From $FF To $BB Offset $4AA9: From $FF To $0A Offset $4AAA: From $FF To $C2 Offset $4AAB: From $FF To $27 Offset $4AAC: From $FF To $AC Offset $4AAD: From $FF To $0C Offset $4AAE: From $FF To $B8 Offset $4AAF: From $FF To $7E Offset $4AB0: From $FF To $49 Offset $4AB1: From $FF To $E6 Offset $4AB2: From $FF To $30 Offset $4AB3: From $FF To $35 Offset $4AB4: From $FF To $2F Offset $4AB5: From $FF To $31 Offset $4AB6: From $FF To $39 Offset $4AB7: From $FF To $38 Offset $4AB8: From $FF To $37 Offset $4AB9: From $FF To $20 Offset $4ABA: From $FF To $43 Offset $4ABB: From $FF To $48 Offset $4ABC: From $FF To $52 Offset $4ABD: From $FF To $2E Offset $4ABE: From $FF To $47 Offset $4ABF: From $FF To $2E Offset $4AD7: From $FF To $FD Offset $4AD8: From $FF To $4C Offset $E398: From $FF To $A6 Offset $E3B0: From $FF To $26 Offset $E3B1: From $FF To $26 Offset $E3B2: From $FF To $26 Offset $E3B3: From $FF To $26 Offset $E3B4: From $FF To $26 Offset $E3B5: From $FF To $26 Offset $E3B6: From $FF To $26 Offset $E3B7: From $FF To $26 Offset $E3B8: From $FF To $26 Offset $E7B4: From $71 To $77 Offset $E8C3: From $71 To $77 Offset $E955: From $C6 To $E6 Offset $E956: From $04 To $A4 Offset $E957: From $BD To $C4 Offset $E958: From $D0 To $0F Offset $E959: From $A2 To $E7 Offset $E95A: From $C1 To $A4 Offset $E95B: From $04 To $C6 Offset $E95C: From $26 To $04 Offset $E95D: From $02 To $BD Offset $E95E: From $84 To $D0 Offset $E95F: From $0F To $A2 Offset $E960: From $A1 To $C1 Offset $E961: From $A0 To $04 Offset $E962: From $22 To $26 Offset $E963: From $05 To $02 Offset $E964: From $25 To $84 Offset $E965: From $07 To $0F Offset $E966: From $5A To $A1 Offset $E967: From $26 To $A0 Offset $E968: From $EE To $22 Offset $E969: From $1C To $05 Offset $E96A: From $FE To $25 Offset $E96B: From $35 To $07 Offset $E96C: From $B6 To $5A Offset $E96D: From $1A To $26 Offset $E96E: From $01 To $EE Offset $E96F: From $35 To $1C Offset $E970: From $B6 To $FE Offset $E971: From $0F To $35 Offset $E972: From $56 To $B6 Offset $E973: From $7E To $1A Offset $E974: From $D0 To $01 Offset $E975: From $4B To $35 Offset $E976: From $FF To $B6 Offset $E977: From $FF To $0F Offset $E978: From $FF To $56 Offset $E979: From $FF To $7E Offset $E97A: From $FF To $D0 Offset $E97B: From $FF To $4B

Click HERE to return to Technical-Main page


Copyright © 2012. All Rights Reserved.