Jump to content
IGNORED

Quick Draw


Out_of_Gas

Recommended Posts

Here's a rough Berzerk disassembly that has the color locations indicated, as well as the robot color table, and the copyright/score digits labelled (so you can compact the data and save some memory to add in your own routines).  See the Centipede thread for an example of compacting bitmap data...http://atariage.com/forums/viewtopic.php?p=567987#567987

 

:thumbsup: I am still trying to figure these things out. At least a few things make sense. :D

Link to comment
Share on other sites

It's really pretty simple. The lookup table holds the low byte of the address that the 7 bytes for the score digit are grabbed from. Since those can be located anywhere (as long as you stay within page $FC), you can reorganize them to share data...like the 7 digit is almost the same as a 1. There is a seperate routine that grabs the extra men and places those on the screen...I think I've got that figured out...

 


      LDX    #$0A   ;2 # of chr. x 2

      LDA    #<DigitSpace;2 space character

LF527: STA    $EA,X  ;4

      DEX           ;2 lower X to do...

      DEX           ;2 ...the next character

      BPL    LF527  ;2 branch up if some left

      LDA    $81    ;3 screen finished?

      BPL    LF543  ;2 branch if not

      LDX    #$0A   ;2 # of chr. x 2

      LDY    $DA    ;3 load # of extra lives

LF535: DEY           ;2 do not display current life

      BMI    LF540  ;2 branch if none left to display

      LDA    #<DigitXtra;2 extra life gfx pointer

      STA    $EA,X  ;4

      DEX           ;2 lower X to do...

      DEX           ;2 ...the next character

      BPL    LF535  ;2 loop if more left to do 

 

Then when the program wants to display the characters, if just loads the bitmaps via (indirect),y to get the bitmap data from the table it made at $EA-$F5...

 

LF196: LDY    $E8    ;3

      LDA    ($EA),Y;5

      STA    GRP0   ;3

      STA    WSYNC  ;3

      LDA    ($EC),Y;5

      STA    GRP1   ;3

      LDA    ($EE),Y;5

      STA    GRP0   ;3

      LDA    ($F0),Y;5

      STA    $E9    ;3

      LDA    ($F2),Y;5

      TAX           ;2

      LDA    ($F4),Y;5

Link to comment
Share on other sites

Only by changing those # values that pertain to addresses are you able to make the program relocatable...so you can modify or add routines at will without messing up the rest of the program. Here's a couple more constants:

 


LF543: LDA    $DA         ;3

      BMI    LF55B       ;2

      LDA    $B8         ;3

      CMP    #$7F        ;2

      BNE    LF55B       ;2
;display bonus points

      LDA    #<Digit0    ;2 2nd char. = 0

      STA    $EC         ;3

      LDX    $DB         ;3 load bonus value

      LDA    LFC0B,X     ;4 fetch offset

      STA    $EA         ;3 and save as first char.

      JMP    LF59A       ;3

 

and

 

;change leading zeros to spaces

LF58A: LDA    $EA,X       ;4

      CMP    #<Digit0    ;2 is it equal to zero's offset?

      BNE    LF59A       ;2 branch if not

      LDA    #<DigitSpace;2

      STA    $EA,X       ;4 change it to a space

      INX                ;2

      INX                ;2

      CPX    #$0A        ;2 skip the rest when...

      BCC    LF58A       ;2 ...a non-zero chr. is reached

Link to comment
Share on other sites

You can freely move things around below address $FB00 (because the screens are set up to operate between page breaks). You can easily reclaim 7 bytes by moving the "space" character a bit higher to a spot where 7 consecutive zeros exist...like the sound data...and then move the data table used for the copyright offsets into that hole. This will allow you to change the background color to anything you want, as well as free up 7 bytes that you can use anywhere in the program area :)

 

Try this one...the screen colors can be set to anything (look near label LF9B4). I dunno what the CLD instruction was at that point for (just to waste 2 cycles AFAIK), so I just eliminated it and used a free byte to change the instruction to an LDA# instruction instead.

berzerk.zip

Link to comment
Share on other sites

Some player sprite modifications. Like'em?

 

westworld_mod.gif

 

Can someone help me? I need for my (adult) berzerk hack the change, that the shot comes from a deeper offset ;) in relation of the player sprite. Is there a chance to change that without much work?

 

The only problem is that the stand still animation is also part of the walking animation. If you don't do it right it looks pretty freaky. :)

 

How many pixels did you need to move the shot down??

Link to comment
Share on other sites

I like this game! Another great Berzerk hack!

 

Damn. I need to use Hack O Matic again. I got lots of free time to play around with it.

 

I was referring to Version A. However, Version C is much improved. I've never cared much for Berzerk because I liked the Vectrex version over the Atari version but these hacks make it so much more fun!

Link to comment
Share on other sites

Hi there!

 

The shot starting position is calculated relative to the sprite position. There exist tables with additive values for both X and Y:

 

LFCDF: .byte $00,$02,$07,$00,$05,$05,$07,$00,$05,$05,$07

LFCEA: .byte $00,$07,$08,$00,$00,$00,$00,$00,$06,$06,$06

 

Read these as in:

Dummy, Up, Down, Dummy, Left, Left-Up, Left-Down, Dummy, Right, Right-Up, Right-Down

 

With some experimentation you should get it right.

 

Greetings,

Manuel

Link to comment
Share on other sites

Hi there!

 

The shot starting position is calculated relative to the sprite position. There exist tables with additive values for both X and Y:

 

LFCDF: .byte $00,$02,$07,$00,$05,$05,$07,$00,$05,$05,$07

LFCEA: .byte $00,$07,$08,$00,$00,$00,$00,$00,$06,$06,$06

 

Read these as in:

Dummy, Up, Down, Dummy, Left, Left-Up, Left-Down, Dummy, Right, Right-Up, Right-Down

 

With some experimentation you should get it right.

 

Greetings,

Manuel

 

Very helpful. With your info I managed to figure it out in Hack-o-Matic. Took about 5 mins.

to change it. :)

 

Now I can make that Tank (Combat) version of Berzerk. :evil:

 

Looks like Berzerk will be the new Hack Workhorse replacing Space Invaders...

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...