| |
Stablizer
Registered: Jan 2016 Posts: 19 |
Coding on a PC for the 64?
I've seen various editors out there, currently starting to use the C64Studio for this, but it seems like getting charsets, graphics, music, etc, is a bit problematic when going at it this way, isn't it?
Would love to get some pointers to reading material on the subject (have done some searches already, but haven't come up with anything notable really).
Thanks!
-Stab |
|
... 179 posts hidden. Click here to view all posts.... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: jackasser wins :)
It's not about winning, it's about not getting kicked out of Booze. I always use the macro assembler or code generators written in C or Java when developing for speed and ease to tweak. However, delivering a part for linking like that would kill the loading times and HCL would kick me out with my head first, down some random stair. That could very well happen anyway, since I havn't delivered a single part the last year or so. :/ |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
@HCL: :D |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Good examples, I use both methods. First the 'script-method' since (for me) its faster and I usually change my mind of how things are supposed to be done a couple of times during development and when everything is ok, the codegen-method.
When i start making a part, I setup a section for generated stuff (*=$8000 "Generated"). Then use .fill and .for-loop etc. for generating the code. When everything is ok, i declare the section virtual (*=$8000 "Generated" virtual), so it won't generate any byte output, and then make codegenerators for the stuff in the generated section.
(A little bonus of this is that the assembler calculates the memory layout so that there are no unused spaces between the generated stuff since the same, now virtual, labels are used.) |
| |
Stone
Registered: Oct 2006 Posts: 172 |
@JackAsser: Very cool! Do you have some higher level abstraction to generate the template handlers, or are they hand coded? |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:I always use the macro assembler or code generators written in C or Java when developing for speed and ease to tweak. However, delivering a part for linking like that would kill the loading times and HCL would kick me out with my head first, down some random stair.
did you read that peacemaker? =) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: @JackAsser: Very cool! Do you have some higher level abstraction to generate the template handlers, or are they hand coded?
Nah, each template is hand-written, usually extracted by locating common instances of previously generated code. The handler follows automatically and simply just passes parameters from the byte code stream into the template to be instanced. |
| |
mankeli
Registered: Oct 2010 Posts: 146 |
I'm pretty sure that these fancy "byte code streams" and "template systems" didn't exist in the 80's, and therefore shouldn't be used when coding for the C64! |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: I'm pretty sure that these fancy "byte code streams" and "template systems" didn't exist in the 80's, and therefore shouldn't be used when coding for the C64!
How exactly do you think ScummVM work with Maniac Mansion, or Z-machine with Zork for that matter? Now, their byte code certainly didn't generate code, but did other useful stuff. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
@Slammer, good point about scripting first, then switching to code gen if required/worthwhile. Nice trick about keeping the old version around for lable generation!
FWIW the example I gave above crunches down to a mere 1017 bytes, and the decompression time is way shorter than the alpha compositing precalculation that it follows.
And yes, as @JackAsser mentioned, step one is often hand coding individual fragments before spitting out longer loops, either offline or on. |
| |
Fungus
Registered: Sep 2002 Posts: 686 |
was offline for a week because moving house...
screw sines, they are always jerky looking, parabola is better. :D
routine credits to GHD/Shape
partab = somemempage
ldy #$3f
stx $fb
stx $fc
stx $fd
make inc $fb
lda $fb
asl a
asl a
adc $fc
sta $fc
lda $fd
adc #$00
sta $fd
sta partab+$80,y
sta partab+$c0,x
eor #$3f
sta partab,y
sta partab+$40,x
inx
dey
bpl make
I haven't got any of my speedcode generator sources anymore... dug around but couldn't find them.
Best thread on CSDB, lets keep this going. :D |
Previous - 1 | ... | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 - Next |