Astrocade BIOS Changes Between the On-Board ROMs ------------------------------------------------ By Richard Degler Jan 18, 2010 This article covers what was changed between the three Bally / Astrocade System ROMS. The source code for these ROMs can be found here: http://www.ballyalley.com/ml/ml_source/ml_source.html I) Time Line ------------ Here's a timeline of the mis-alignment at the end of system code (where '.' is really a NULL or 0 byte and 'f's are $FFs or -1's) : BALLY [3164] ==> (C) BALLY MFG 1977. (in earliest Bally H.L.C.'s) WHITE [3159] ==> BALLY MFG 1977.977. (branded from Motgomery Ward) ASTRO [3159] ==> BALLY MFG 1978.ffff (in most BPAs and Astrocades) Starting at $0E06 going up to $0E18 (or in decimal 3590 thru 3608) after which SCRIBBLE aligns. I wish we had accurate dates for these. II) Major Differences Between the On-Board ROMs ----------------------------------------------- Here are six major differences between the On-Board ROMs: 1. The label addresses in the original REVERSION 0 (BALLY) match those of REVERSION 1 (WHITE or ASTRO) up until the TKEYS: label, where these differences were if BALLY ; ### conditional assembly ### LD H,(IY+CBD) ; # v.# LD L,(IY+CBE) ; # 0 # else ; WHITE or ASTRO ##### cond ###### else... CALL DELOAD ; # v.# EX DE,HL ; # 1 # endif ; ##### end conditional ######### which replaced the read of HL from the Context Block DE - with the shorter use of existing code to read in into DE and swap that into HL - same result, two bytes shorter. 2. Then before painting a RECTANgle with MPAINT: the HLC code flushed a 0 out through the SHIFTER if BALLY ; ### conditional assembly ### XOR A ; fl- # extra code in ver. 0 only LD (WASTE),A ; ush # endif ; ##### end conditional ######### which must have not been necessary since it was dropped - saving four more bytes. 3. One of those saved bytes was wasted in MINCSC: to INCrement the SCoRe with if BALLY ; ### conditional assembly ### INC A ; # ! # in version 0 else ; WHITE or ASTRO ##### cond ###### else... ADD A,1 ; # ? # in version 1 endif ; ##### end conditional ######### both of which set the flags up for the DAA following it, so again no difference. 4. Now everything after that is skewed by 5 bytes, including the "GAME",6,"OVER",0 string used to identify the REVERSION. One change that was needed but didn't affect the length was in PWRUP: where they used an UPI FILL to Clear SYSTEM RAM if BALLY ; ### conditional assembly ### DW NORMEM ; # v.# ... Memory Address ($4000) DW $0040 ; # 0 # ... Byte Count = 64 [why ??] else ; WHITE or ASTRO ##### cond ###### else... DW BEGRAM ; # v.# ... Memory Address ($4FCE) DW $0032 ; # 1 # ... Byte Count = 50 (to $4FFF) endif ; ##### end conditional ######### which only cleared the top line-and-a-half of the screen instead! Also swapped the "NORMEM" and "$4000" around from the uploaded source code (same values.) 5. Another byte added at CLRNUM: to CLEAR NUMBER was definitely needed to divide the number of BCD digits by 2 to get the number of bytes with if WHITE or ASTRO ; ###### cond ####### added code to ver. 1 to convert the RRA ; # 1 # number of digits to number of bytes endif ; ##### end conditional ######### otherwise too much was being erased! Changed the comment from just "??" (meaning something to look into later.) 6. At the end of the operating system was the copyright string, followed by four bytes of padding in the WHITE and ASTRO BIOS's to align the game code which followed after that. DB '(','C',')',$20,'B','A','L','L','Y' DB $20,'M','F','G',$20 if BALLY ; ### conditional assembly ### DB '1','9','7','7' ; # - # (C) 1977 DB $00 ; # = # ; NO FILLER BYTES in BALLY HLC 3164 ROMs, code is aligned now endif ; ##### end conditional ######### or... if WHITE ; ### conditional assembly ### DB '1','9','7','7' ; # - # (C) 1977 DB $00 ; # = # ; FOUR FILLER BYTES BETWEEN ROM AND SCRIBBLING TO MATCH 3159 ROMs DB '9','7','7',$00 ; # # # leftovers endif ; ##### end conditional ######### or... if ASTRO ; ### conditional assembly ### DB '1','9','7','8' ; # + # (C) 1978 DB $00 ; # = # ; FOUR FILLER BYTES BETWEEN ROM AND SCRIBBLING TO MATCH 3159 ROMs DB $FF,$FF,$FF,$FF ; #-1s# erased endif ; ##### end conditional ######### Again, changed this in the listing - think this is clearer than having two conditional assembly blocks so close together. All the other changes are to colors used, Checksums and minor stuff not affecting the code size. END OF DOCUMENT