Jump to content
Sign in to follow this  
kensu

Berzerk internals

Recommended Posts

A couple of questions for anyone who's spent some time looking at the Berzerk disassembly....

First off, I'm curious about how the player-missiles are allocated. I played the game for the first time since I started work on a 5200 homebrew, and it blew my mind that the player's shot is a different color!

 

Second, I'm trying to hack the rom so I can change the color of the player (to see if I can get a brighter green like in the arcade), but I've had problems finding the value to change in the rom. So just what color is the player? I assumed he was regular green, but I incrementally changed all the C4 bytes into C8 ones, and not only didn't it change the color, but made the game crash in the emulator. (Do 5200 roms have checksums?!)

 

Thanks!

Share this post


Link to post
Share on other sites

The color guy thing: Use 16k ROM, not doubled up 32k.

Search for this string:

3000: 3B 70 07 50 0D 57 02 (D8) BE

The 3000 assumes the starting line is 0000. (if not, then ignore it)

$D8 is the color

HowToFindColors.zip

Share this post


Link to post
Share on other sites

Why did it blow your mind that the shot was a different colour?

 

I was under the impression that the missile graphic would always have the same color as the associated player graphic. Though isn't the missile being a different color one of the few ways to have a multicolored player?

Share this post


Link to post
Share on other sites

I was under the impression that the missile graphic would always have the same color as the associated player graphic. Though isn't the missile being a different color one of the few ways to have a multicolored player?

 

I can't check now, but probably your guy is Player0, but he uses Missile 1,2,or 3 as his shot. Hence diff colors. You don't have to use Player0 and Missile0 together.

 

To answer the 2nd question - yes, you can combine Player0/1/2/3 with Missile0/1/2/3 in any order to create multicolored "sprites" without the need to do "multiplexing" and "Display List Interrupts" (these are also techniques which are used to yield more colors - I'm not sure how experienced with this subject you are).

Share this post


Link to post
Share on other sites

The color guy thing: Use 16k ROM, not doubled up 32k.

Search for this string:

3000: 3B 70 07 50 0D 57 02 (D8) BE

The 3000 assumes the starting line is 0000. (if not, then ignore it)

$D8 is the color

 

Hmmm, $D8 must be a memory address; when I changed it to another color code the ROM crashed. DOES the 5200 have a checksum I need to change?

Share this post


Link to post
Share on other sites

The 5200 / a8 have shadow registers of the graphics registers, too. You can play around changing these in the emulator. In Atari800win, hit F8 to bring up the window, then "C 08 04" to change memory location $0008 to a value of $04 - a dark gray, for example. or "c c 00" to make walls black (invisible!). this doesn't change the ROM code of course, but maybe will help you locate the code.

 

PCOLR0 .EQU $0008 ;COLPM0 Shadow
PCOLR1 .EQU $0009 ;COLPM1 "
PCOLR2 .EQU $000A ;COLPM2 "
PCOLR3 .EQU $000B ;COLPM3 "
COLOR0 .EQU $000C ;COLPF0 Shadow
COLOR1 .EQU $000D ;COLPF1 "
COLOR2 .EQU $000E ;COLPF2 "
COLOR3 .EQU $000F ;COLPF3 "
COLOR4 .EQU $0010 ;COLBK "

COLPM0 .EQU GTIA+$12 ;0 Player/Missile Color GTIA = $D000
COLPM1 .EQU GTIA+$13 ;1 "
COLPM2 .EQU GTIA+$14 ;2 "
COLPM3 .EQU GTIA+$15 ;3 "
COLPF0 .EQU GTIA+$16 ;0 Playfield Color
COLPF1 .EQU GTIA+$17 ;1 "
COLPF2 .EQU GTIA+$18 ;2 "
COLPF3 .EQU GTIA+$19 ;3 "
COLBK .EQU GTIA+$1A ;Background/Border Color

post-37-0-71591500-1368014042_thumb.png

post-37-0-45668800-1368014283_thumb.png

Edited by Cafeman

Share this post


Link to post
Share on other sites

Hmm, that's weird. Slappam was right about the offset, but changing it caused the rom to crash in Kat2500, but NOT atari800win. I wonder if the changed rom would work on the 5200.

Thanks Cafeman and Slappam!

Share this post


Link to post
Share on other sites

Okay, for a thread wrap up...

Go to offsets $0778 (for the lives) and (for the main character) $3007 and change the $D8 ti $CC. It isn't an exact match, but it's closer to the way the player looked in the arcade. For some reason this breaks Kat5200, but it will work on both Atari800Win and on the 5200.

I can't figure out how to change the player on the title screen though...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...