[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 8 bit 3-d game
>The source is in the zip archive, labeled "Raycaster.a"
ok, found it. wow, full of macros! very short short though
this could turn into a cool game..
I don't know enough about macros or your code to see
where you are updating the screen...
here is lo-res lookup code (1/2 resolution... it is actually text
screen lookup.)
you can change it a bit to use LoRes (there was a thread I started in
CSA2P
recently that talked about how to access to GR screen from Assembly)
just set Xlocation and Ylocation to the coordinates you want a dot at,
then set Character to the "color" of the dot. The GR screen actually
treats
each byte as two pixels, one on top of the other. The lowbyte
determines
one pixels color, the high byte determines the other color. all
explained in
csa2p... but this will work for fast access to 1/2 resolution on the
GR screen:
ORG $4800
JMP START
LOOKLO DFB #$00,#$80,#$00,#$80
DFB #$00,#$80,#$00,#$80
DFB #$28,#$A8,#$28,#$A8
DFB #$28,#$A8,#$28,#$A8
DFB #$50,#$D0,#$50,#$D0
LOOKHI DFB #$04,#$04,#$05,#$05
DFB #$06,#$06,#$07,#$07
DFB #$04,#$04,#$05,#$05
DFB #$06,#$06,#$07,#$07
DFB #$04,#$04,#$05,#$05
XLOCATION DFB #00 ;HORIZONTAL COORDINATE
YLOCATION DFB #00 ;VERTICAL COORDINATE
CHARACTER DFB #00 ;VALUE OF CHARACTER TO DISPLAY
START LDY YLOCATION
LDX XLOCATION
LDA LOOKLO,Y ;GET TEXT SCREEN
STA STOR+1 ;VERTICAL LINE ADDRESS
LDA LOOKHI,Y ;AND MODIFY CODE BELOW
STA STOR+2
LDA CHARACTER ;LOAD A WITH CHARACTER TO DISPLAY
STOR STA $0400,X ;STORE IT TO SCREEN WITH HORIZ
RTS ;VALUE AS OFFSET