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-08-31 10:39
Oswald

Registered: Apr 2002
Posts: 5094
you would do this by making 2 lookup tables. one for y, to adress the leftmost byte "column" of the bitmap, and one for x, for adressing horizontally.

ldy y
ldx x
lda ytablow,y
clc
adc xtablow,x
sta $fc

lda ytabhi,y
adc xtabhi,x
sta $fd

lda $fc
clc
adc #$08
sta $fe

lda $fd
adc #$00
sta $ff

lda spritesource1,x
sta $f0

lda spritesource2,x
sta $f2

ldy #$07
lda ($f0),y
ora ($fc),y
sta ($fc),y

lda ($f2),y
ora ($fe),y
sta ($fe),y

dey
bpl -

somehow like this.. to give you an idea..
2008-08-31 11:13
Heaven
Account closed

Registered: Jul 2008
Posts: 102
koesz.

2008-08-31 13:12
Heaven
Account closed

Registered: Jul 2008
Posts: 102
ok... got it... I wrote my first c64 basic code ever:

0 for i=1024 to 1024+999:poke i,1:next i
1 poke 53265,peek(53265) or 32
2 poke 53272,peek(53272) or 8
3 for i=8192 to 8192+8191
4 poke i,0
5 next i
10 x=rnd(0)*320
20 y=rnd(0)*200
30 c=int(x/8)
40 r=int(y/8)
50 poke 8192+c*8+r*320,255
60 goto 10

so thanks Oswald, now I know how to prepare my lookup tables... I thought it is same trickery like the weird Apple II screenlayout...

Yes, I know...this is for high res but should be no problem to adapt to MCM.
2008-08-31 14:06
Heaven
Account closed

Registered: Jul 2008
Posts: 102
of course Oswald, your code fragment does not care about "clipping" across different cells.

Can you remember our conversation regarding my sprite routines in Beyond Evil?

I guess here I have to deal with "split draw" as well as f.e. an 8x16 sprite occupies different cells which are not align together like the

ADG
BEH
CFI

"font modes"...
2008-08-31 15:22
Oswald

Registered: Apr 2002
Posts: 5094
splitting across rows:

tya
tax

ldy specytable1,x

lda ($f0),y
ora ($fc),y
sta ($fc),y

lda ($f2),y
ora ($fe),y
sta ($fe),y

dey
bpl -

$fe=$fe+$140
$fc=$fc+$140

ldy specytable2,x

lda ($f0),y
ora ($fc),y
sta ($fc),y

lda ($f2),y
ora ($fe),y
sta ($fe),y

dey
bpl -

from the top of my head again... sprite data should be indexed with abs,x and the code adjusted to that tho..
2008-08-31 16:43
Fungus

Registered: Sep 2002
Posts: 686
First off, there is no need to use bitmap mode... char mode is fine, and hi-res too. The game doesn't use any multicolor graphics.

You can even use built in char set to make the walls.

Use sprites, they are there, use them. There is plenty of easy to understand/use multiplexers which can have 24 sprites on screen quite easy.

The only problem I encountered was the collision detection, so that the bullet can still pass through the players "neck".
2008-08-31 18:03
Heaven
Account closed

Registered: Jul 2008
Posts: 102
if the goal is to reuse 90% of the Atari code... then why should I use sprite multiplexor? c64 has mcm, atari has...only difference is the organisation.

so imho could be easy task.
2008-09-01 06:33
Martin Piper

Registered: Nov 2007
Posts: 722
My God, the Atari 2600 version takes nearly a whole C64 frame to execute one frame.
2008-09-01 10:08
Heaven
Account closed

Registered: Jul 2008
Posts: 102
hehehe...why not... are the c64 and the 2600 not nearly the same cpu speed?
2008-09-01 12:59
MagerValp

Registered: Dec 2001
Posts: 1078
Umm, the 2600 generates the display manually, so everything takes a whole frame regardless of complexity.
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ... | 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
lotus_skylight
REBEL 1/HF
hedning/G★P
Acidchild/Padua
MWR/Visdom
MightyAxle
MAT64
Razdee
.jetan/AI-supported ..
Guests online: 104
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Party Elk 2  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

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