Building a Modern C64 Assembly AI Toolchain
Posted by 094459 6 days ago
Comments
Comment by afro88 21 hours ago
Comment by noobermin 18 hours ago
Comment by 094459 6 days ago
Comment by tom_ 16 hours ago
This sort of thing is written out three times in the code: https://github.com/dexmac221/C64AIToolChain/blob/a7bbc568c0e..., https://github.com/dexmac221/C64AIToolChain/blob/a7bbc568c0e..., https://github.com/dexmac221/C64AIToolChain/blob/a7bbc568c0e...
I'm not going to spend any time doing the computer's job for it by carefully checking every single one against the other, something it can do with perfect accuracy and no mistakes. Nor am I going to double check whether I missed any, which I probably did, because, ditto.
But, looking at the one at line 541, I might be inclined to suggest the following instead. Please step through this in the debugger or whatever though, rather rather than just taking my word for it.
(to save line count, I've put multiple instructions on a line, separated by ':')
lda tmp_hi:asl:asl:asl:sta ptr_lo ; y*8, an 8-bit quantity
asl:rol ptr_hi ; y*16, a 9-bit quantity
asl:rol ptr_hi ; y*32, a 10-bit quantity
clc:adc ptr_lo:sta ptr_lo ; <(y*32)+y*8=<(y*40)
lda ptr_hi:and #3:adc #0:sta ptr_hi ; >(y*32)+carry out=>(y*40)Comment by erwincoumans 19 hours ago
Comment by linsomniac 20 hours ago
Don't get me wrong, I loved the process of programming, but these days I have so many things going on that I rarely have the time either during or after work to learn assembly or do any significant low level programming.
I like what they are doing with the C64 now, but for me to get any joy out of getting an Ultimate I'd really need something that would let me play with it at a higher level than assembly or basic. I could see that being a lot of fun for both my 16yo son and myself.
Comment by aduty 17 hours ago
I haven't tried the support for the C or C++ compilers targeting the C64, but that would set you up for developing with the C64 as a target in a modern environment.
If you're wanting it to be on the C64 Ultimate itself, maybe we'll all be in luck in a year or two.
Comment by logsr 20 hours ago