Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Berzek for C64
2008-07-30 18:07
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....
 
2008-09-03 14:37
JackAsser

Registered: Jun 2002
Posts: 1990
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.
2008-09-04 02:11
Martin Piper

Registered: Nov 2007
Posts: 645
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... :)
2008-09-06 11:15
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... ;)

2008-09-06 20:23
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"... ;)
2008-09-06 21:55
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.
2008-09-07 06:42
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.
2008-09-07 08:13
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
2008-09-07 08:29
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?


2008-09-07 11:06
Martin Piper

Registered: Nov 2007
Posts: 645
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
2008-09-07 11:53
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
t0m3000/BOOM!^ibex-c..
jmin
Paul Bearer
Dymo/G★P
iAN CooG/HVSC
FRaNKy/Smash Designs
spider-j
Sentinel/Excess/TREX
Guests online: 135
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 Layers  (9.7)
2 Party Elk 2  (9.7)
3 It's More Fun to Com..  (9.6)
4 Press any char  (9.6)
5 Cubic Dream  (9.6)
6 Copper Booze  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.051 sec.