Site Map | Contact Info | Home  
  
 Home
 Products
 ROMHACK Toolbox
 Ordering Info
 Code Disassembly
  Bega's Battle
  Cliffhanger
  Thayer's Quest
 My Gameroom
 Links

 

 
   

Commented code   view | download (86KB)   

Overview
Bega's Battle has a couple of unique things that I had never seen before.
This was my first 6502 disassembly. Remarkably similar to Z80 code. Overall the code was mildly straight forward. It was well written and semi-challenging to decode.

The code controls both the on-screen graphics and gameplay, and it also controls the codes sent to the Laserdisc player.

Pseudo-random Number Generator
Bega's code has a very interesting Pseudo-random Number Generator routine at L40FA. The random number routine is used to determine the position and movement of the enemies/foes, like LUNA. When I first stumbled across this routine I remembered how odd it seemed. I would have NEVER guessed that it was a random number generator. It wasn't until after I realized that the output of this routine was being used to position the enemies/foes that I realized what it must have been doing. I did a quick search on the internet for random number routines written in Z80 assembly and viola! The search revealed almost the exact same routine that I had found.

Pinball?
The tilt button input was another odd thing. It was very interesting to find a routine that monitored the tilt button and would actually reset the game if the machine was tilted. Can you say, "pinball"?

Hidden Routine
I also found a hidden routine that actually runs the game in a DEMO mode at L7C06. In the demo mode, the game plays itself by reading from a list of predetermined moves. I understand that this was never used in the game, so it was quite a surprise when I uncovered it. Finding cool secrets like these are what makes ROM hacking so exciting! It surprising how much ROM space was devoted to the DEMO mode considering that it was never used. What a waste.


Bega's Battle devotes a large amount of ROM to Diagnostics as well. 


How are your hacking skills? Here's your chance to find out:
What is this data for? 

        .BYTE $39,$CD,$1A,$16,$0B,$23,$0F,$1C,$00,$02,$FF

Answer: See label L4385 in the Bega's Code to find out

 

HOME  

  ROMHACK 2009