| |
trip6 Account closed
Registered: Jan 2007 Posts: 51 |
Berzek for C64
Hello... I recently recieved assembler source code for Berzerk video game. I was told that I would have to use CCS65 to compile it. However, I am quickly realizing that I have no idea how to do this in CCS65. Can some one help me our compile this for me with CCS65 if I sent the source code? All help is appreciated, I'd love to get a port of this classic on the C64.
|
|
... 260 posts hidden. Click here to view all posts.... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: It depends. :) If interrupts are disabled and you don't want to use SID/VIC/BASIC/KERNAL then you're fine. :)
@Martin: not entierly correct since the values of $00 will affect the values of $01. F.e. if you set all lines to output in $00 any read of $01 will result in #$ff. iirc. |
| |
Martin Piper
Registered: Nov 2007 Posts: 722 |
oh yes, and that too. :)
But what I meant was that in the context of Stella locations 0 and 1 are write only so without needing to do any reads and with interrupts off (plus no ROM or IO access) writing to 0 and 1 you're fine.
Except the tape motor... :)
|
| |
Heaven Account closed
Registered: Jul 2008 Posts: 102 |
ok. we have now a DASM compileable source code with help of the guys at atariage. you have to be registered to download the file:
http://www.atariage.com/forums/index.php?showtopic=131224&st=0&..
so... now we can get into the next stage and get the stuff over to c64... ;)
|
| |
Heaven Account closed
Registered: Jul 2008 Posts: 102 |
small update made as I am able now to reassemble the source. found:
- init chipset
- digispeech playback procedere
- set soft sprite routine
- set player hardware sprite
- console key check (start,select,option)
now I am searching for the init_highres screen plus draw_maze routines. when found I can start to port over to c64...
custom font at $ac00 for the score panel, it's charmode here (2 lines).
I messed around with the gfx routine, found the lookup table for the screen calculations and as it seems, the collision detection is based on hardware check instead of software checks. Same for the shots, they are hardware sprites, when they are disabbled ("missles off") you hear the shot sound but no shots and no exploding robots...
I personally found the code not very "friendly" written... I would guess "it works as designed"... ;)
|
| |
Heaven Account closed
Registered: Jul 2008 Posts: 102 |
last comment. when you are going through the Atari800 source you will recognise that it is not really using a lot of hardware related stuff which can not be used on c64 side:
- 160x200x4 screen
- digi speech 4bit samples in $0x,$x0 order
- hardware sprites for the player plus shots
- robots are soft sprites
- sound fx could be reproduced by SID
- start/option/select --> F7,F3,F1
- no hardware scrolling used
- one screen/dlist only
- 3 DLIs which easily can be transfered to raster IRQs
- 2 graphics modes mixed (Antic E (bitmap) plus Antic 4 (font)) but can be reproduced easily via VIC
so... should be doable.
|
| |
Heaven Account closed
Registered: Jul 2008 Posts: 102 |
another morning another try...
the scrolling in y-direction is done by adding +40 to the screen adress and inserting blank scanlines into the display list.
the scrolling in x-direction is done by adding +/-1 to the LMS commands of the display list and (probably) clearing the bitmap collums.
so... the scrolling needs to be recoded. I do not like the lame blocky and flickering scrolling anyway and I found it good enough to switch the screens when leaving to new room. see like in Super Amok! on VIC.
|
| |
Heaven Account closed
Registered: Jul 2008 Posts: 102 |
ok...took few hours to find out where the damned Berzerk logo is painted on screen... it seems that it is packed as the code to copy the logo into VRAM:
LA0FE: lda #$8D
sta L00A0
lda #$B0
sta L00A1
lda #$44
sta L009D
LA10A: jsr LA0BC
ldy #$FF
LA10F: iny
tya
asl
sta L00A2
ldx #$01
lda (L00A0),Y
sta L00A3
LA11A: lda #$00
asl L00A3
bcc LA123
ora LA0AA
LA123: asl L00A3
bcc LA12A
ora LA0AB
LA12A: asl L00A3
bcc LA131
ora LA0AC
LA131: asl L00A3
bcc LA138
ora LA0AD
LA138: ldy L00A2
and L00A4
sta (L008B),Y
inc L00A2
dex
beq LA11A
tya
lsr
tay
cmp #$08
bne LA10F
lda L00A0
clc
adc #$09
sta L00A0
bcc LA155
inc L00A1
LA155: inc L009D
lda L009D
cmp #$6B
bne LA10A
rts
|
| |
Heaven Account closed
Registered: Jul 2008 Posts: 102 |
and finally the joystick routine is found, too...
so all main procederes to get started are found. so... maybe this afternoon I will transfer the code to C64 and look what happens... ;)
first task will be the mimic the bitmap screen & draw maze/logo stuff.
So question:
the game uses $0000-$3fff for RAM, where the bitmap screen is at $2028ff. display list at $1000 and lookup tables at $10d0 ff. Hardware sprite at $1400-$17ff and $1800-$1fff again game lookup tables.
So, how would you structure the c64 memory layout?
in a perfect world I would like to have bitmap at $2000 and the screen ram at $4000 but I guess that is not possible as they are different VIC banks... so what about using $4000-$7fff for bitmap screen, font and sprites?
this would leave $2000-$3fff free for custom c64 routines.
what do you think?
|
| |
Martin Piper
Registered: Nov 2007 Posts: 722 |
I've uploaded the Atari 2600 version with C64 code tweaks (along with other improvement to the multiplexor and compression code) to the large archive at http://codebase64.org/doku.php?id=projects:resurrection
|
| |
Heaven Account closed
Registered: Jul 2008 Posts: 102 |
thanks Martin, for sharing...
esp. I like the sprite multiplexor in the archive... ;)
|
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ... | 27 - Next |