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 > Coding on a PC for the 64?
2016-01-11 05:53
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....
 
2016-01-27 08:46
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. :/
2016-01-27 08:46
Frantic

Registered: Mar 2003
Posts: 1648
@HCL: :D
2016-01-27 12:22
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.)
2016-01-27 13:44
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?
2016-01-27 15:02
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? =)
2016-01-27 15:45
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.
2016-01-27 20:27
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!
2016-01-27 20:43
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.
2016-01-27 21:37
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.
2016-01-28 06:50
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
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
Martinland
HBH.ZTH/Abnormal
iAN CooG/HVSC
MWR/Visdom
4gentE/ΤRIΛD
TheRyk/MYD!
Nordischsound/Hokuto..
Freeze/Blazon
B.A./QUANTUM
Mike
St0rmfr0nt/Quantum
Case/Padua
Airwolf/F4CG
Walt/Bonzai
Neotec/Padua
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 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (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 Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

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