| |
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.... |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Numpy really does make life easier.
bmpbytes=bmppixels.reshape((25,8,40,4)).swapaxes(1,2).reshape((-1,4))@[64, 16,4,1] |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Run time generators are of course neat; I've used them (the bobs in Faux Visage) but most of the time I've been able to get away with generating the code offline.
I don't get the "I'm lazy so I use KickAssembler" crowd. I'm lazy. What could be more lazy than using the most efficient tools for the task, instead of trying to build an entire house using nothing but a hammer? (Even if it's a MegaHammer 3000 with inline scripting.) |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Anyway, something I'm often coding Python generators for is the kind of analyzed optimal code generation Bitbreaker was describing (Koala fader). A similar example is the classic static tunnel effect (with scrolling texture); it's a pretty easy task to write a Python snippet that keeps track of all the locations on the screen where a specific texel will end up so the render code will end up looking something like:
lda texel
sta screen + $0009
sta screen + $000a
sta screen + $1234
lda texel + 1
sta screen + $000b
[...]
Doing the same with a run-time generator I would consider non-trivial. |
| |
Fungus
Registered: Sep 2002 Posts: 686 |
If the code follows any kind of pattern than can be done in a short algo, it's usually pretty feasable to do? Saves disk space too and is faster than decompression usually. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
radiant's example.. I'd do it realtime anyway because of disk space and loading time. estimate max possible nr of occurence of the same texel then build lists while scanning UV map once, then generate code. 2 pass, not rocket science.
scanning:
ldx uvmap
lda listselectlo,x
sta 40
lda listselecthi,x
sta 41
inc listcount,x
ldy listcount
txa
sta (40),y
inc uvmapself+1
bne +
inc uvmapfelf+2
;exit check
the whole shouldnt take more than 1-2 secs, depending on resolution. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
generating the tunnel thing in 6502 is certainly doable.... but slowish :) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: generating the tunnel thing in 6502 is certainly doable.... but slowish :)
nah.
http://codebase64.org/doku.php?id=base:8bit_atan2_8-bit_angle
http://codebase64.org/doku.php?id=base:fast_sqrt |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
still slowish, its quicker to just load it (perhaps even more so with todays loaders). and if you do it like reflex did you get a nice fade effect for free by just loading one effect over the other while it runs :) (not that you should do any of this 4x4 shit anymore, the 90s are over =P) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
interesting, I always thought they just copy the tunnel over the torus. |
| |
Maxlide
Registered: Apr 2003 Posts: 31 |
|
Previous - 1 | ... | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 - Next |