| |
Dr.j
Registered: Feb 2003 Posts: 277 |
looking for a tool to split $d010 table
Hey there everybody. i want to create old effect which is
sprite scoller with different horizontal and vertical values. seacrh for a tool to generate x,y and MSB table.
the code is quite simple look like that :
ldy index
ldx #$00
A: lda xtable,y
sta $d000,x
lda ytable,y
sta $d001,x
lda $d000,x
bne !+
//check if we need to plot a new char to screen
!:
tya
adc #$20
tay
inx
inx
cpx #$10
bne A
ldy index
lda msbtable,y
sta $d010
|
|
| |
Glasnost Account closed
Registered: Aug 2011 Posts: 26 |
Use Kick Assembler, and you have a script language that can easily create these tables (and much more complex tables as well)
http://www.theweb.dk/KickAssembler/Main.php
I use it with Relaunch as editor, and Vice as emulator, its rather easy to set up.
Alternatively use the good old basic to create tables :)
Good Luck!
/Glasnost |
| |
Dr.j
Registered: Feb 2003 Posts: 277 |
10x Glasnost but i am using Kick Asm. (great tool!) anyhow
don't really know to generate $d010 table which based
on the X-axis table (means on $d000,$d002..etc')
fop ex:lets say i generate this table for X sprites vals.
.for (var i = 0 ; i < 256;i++) {
.var val = [floor([80 + [80 * sin(toRadians(360/256*i))]])]
.byte val
}
i want a smooth sprite scroller and i don't want
to use the Rol $XXX method.
|
| |
Danzig
Registered: Jun 2002 Posts: 440 |
so you just use a bigger radius (>256), store the value with and255 in the low table and shifted by 8 bit to the right in the high table.
low :fc fe ff ff 00 00 00 01 01 01 01 00 00 00 ff ff fe fc
high:00 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 00 00
that low is your sprite position / high is your msb table
for $d010
|