Tursi Posted August 30 Share Posted August 30 Over in the Coleco forums, @nanochess released a basic compiler for Z80-based machines, and then added a 6502 target. Not to be left out, I added a TI-99/4A target. it took a bit more than I expected, but it's finally working for the most part. Even has some optimizations (though more are possible, I think.) Right now it just outputs EA#3 programs, but it does work. Next update I'll get it building bank switched cartridges, since that's supported in there. But I've kind of blown my time budget on getting this far. That said! If anyone would like to take a peek at it, it has a small unpack function in it called Pletter. It's completely undocumented as far as I've found, and exists solely in assembly language source code for the Z80 (and now 6502 as well). I took a stab at porting it over but getting the ROLs, ASLs and carry bits right feels really tricky, and my code doesn't work. Still, people are using it to make their graphics fit, so if we want it to run the games other people are starting to make, we'll need it. Anyway, here's a link to the thread and I'll crosspost the video here too... 16 5 Quote Link to comment Share on other sites More sharing options...
Gary from OPA Posted August 30 Share Posted August 30 Amazing work @Tursi I been following this project and was hoping there would be a TI99 option added. As always you have outdone yourself! Thanks. 1 Quote Link to comment Share on other sites More sharing options...
nuxi Posted August 31 Share Posted August 31 This should help: https://github.com/nanochess/Pletter 1 Quote Link to comment Share on other sites More sharing options...
Cheung Posted August 31 Share Posted August 31 Does this mean we can expect performance to be better than compiled XB? Quote Link to comment Share on other sites More sharing options...
+nanochess Posted August 31 Share Posted August 31 (edited) Hey @Tursi Not exacty sure what I'm doing wrong, but cannot run any of the examples with js99er. ./cvbasic --ti994a $1.bas $1.a99 ../../xdt99/xas99.py -R $1.a99 -L $1.lst ../../xdt99/xdm99.py -X sssd work.dsk -a $1.obj -f df80 I load the disk into js99er, put the Editor/Assembler cartridge, use 3 LOAD/RUN, enter the program name, press Enter, and type START, and the screen becomes green. Any ideas? Edited August 31 by nanochess Quote Link to comment Share on other sites More sharing options...
+nanochess Posted August 31 Share Posted August 31 Nevermind, it was a bug in the variable initialization code. I just corrected it, glad I tried Classic99 and the debugger. 1 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted August 31 Share Posted August 31 I just made Viboritas to work 5 1 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted August 31 Share Posted August 31 10 minutes ago, nanochess said: I just made Viboritas to work "Windito." I love it. So, if I understand this correctly, this is a BASIC programming environment from which you can take the same source and build for ColecoVision and TI-99/4A, yeah? 3 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted August 31 Share Posted August 31 (edited) 23 minutes ago, OLD CS1 said: "Windito." I love it. So, if I understand this correctly, this is a BASIC programming environment from which you can take the same source and build for ColecoVision and TI-99/4A, yeah? That's right, and also another nine platforms * MSX * Sega SG-1000/SC-3000. * Spectravideo SVI-318/328. * Creativision. * Sord M5. * Memotech MTX. * Tatung Einstein. * Casio PV-2000. * Hanimex/Soundic Pencil II. Edited August 31 by nanochess 7 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted August 31 Share Posted August 31 I can find documentation on the compiler, but I can't seem to find documentation on the language it compiles? Is CVBasic bespoke to this compiler, or is a spec borrowed from another project? Quote Link to comment Share on other sites More sharing options...
+nanochess Posted August 31 Share Posted August 31 (edited) 2 minutes ago, jedimatt42 said: I can find documentation on the compiler, but I can't seem to find documentation on the language it compiles? Is CVBasic bespoke to this compiler, or is a spec borrowed from another project? The CVBasic language is specified in the file manual.txt and technically is derived from my previous IntyBASIC. The syntax is Qbasic-alike Edited August 31 by nanochess 1 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted August 31 Share Posted August 31 https://github.com/nanochess/CVBasic/blob/master/manual.txt 1 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted August 31 Share Posted August 31 16 hours ago, Cheung said: Does this mean we can expect performance to be better than compiled XB? I sure hope so. 1 Quote Link to comment Share on other sites More sharing options...
Tursi Posted August 31 Author Share Posted August 31 20 hours ago, nuxi said: This should help: https://github.com/nanochess/Pletter Thanks, yes, that's the same code I already have. There's no additional information in there. Quote Link to comment Share on other sites More sharing options...
Tursi Posted August 31 Author Share Posted August 31 5 hours ago, nanochess said: I just made Viboritas to work ooh... does that mean you got pletter to work? Quote Link to comment Share on other sites More sharing options...
nuxi Posted August 31 Share Posted August 31 3 minutes ago, Tursi said: Thanks, yes, that's the same code I already have. There's no additional information in there. Oh, sorry. Thought you were trying to work off the embedded assembly decoder in the cvbasic code rather than the c encoder. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted August 31 Share Posted August 31 31 minutes ago, Tursi said: ooh... does that mean you got pletter to work? Viboritas doesn't use Pletter. It was generating a BNE instruction (changed to JNE) and a small bug in constant 8-bit multiply where SLA moved trash bits into the high 8-bit value. So far I've revised half of your Pletter translation, forgot that TMS9900 doesn't have rotation through carry. 2 Quote Link to comment Share on other sites More sharing options...
Tursi Posted August 31 Author Share Posted August 31 28 minutes ago, nanochess said: Viboritas doesn't use Pletter. It was generating a BNE instruction (changed to JNE) and a small bug in constant 8-bit multiply where SLA moved trash bits into the high 8-bit value. So far I've revised half of your Pletter translation, forgot that TMS9900 doesn't have rotation through carry. Oh, my bad... I don't know why I thought it did. Nice work on the fixes so far! Yeah, not carrying rotate through carry, and the fact that most of the flags are set by most 9900 instructions - those two things make raw ports tricky. It's really cool of you to just dive into it 3 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted August 31 Share Posted August 31 32 minutes ago, nanochess said: Viboritas doesn't use Pletter. It was generating a BNE instruction (changed to JNE) and a small bug in constant 8-bit multiply where SLA moved trash bits into the high 8-bit value. So far I've revised half of your Pletter translation, forgot that TMS9900 doesn't have rotation through carry. I was perusing the source code a bit this afternoon. I sit in awe. Really really cool. One question, How does the sub-routine linkage work. Is see BL @JSR following by a data label with the name. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted September 1 Share Posted September 1 2 hours ago, TheBF said: I was perusing the source code a bit this afternoon. I sit in awe. Really really cool. One question, How does the sub-routine linkage work. Is see BL @JSR following by a data label with the name. It is a subroutine that saves the return address into the stack, jumps to the subroutine (the data label with the name), and then returns back using the stack. 1 1 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted September 1 Share Posted September 1 Pletter decompressor is now working. Still some testing has to be done. 7 2 Quote Link to comment Share on other sites More sharing options...
JasonACT Posted September 1 Share Posted September 1 43 minutes ago, nanochess said: Pletter decompressor is now working. No need for a C version then Try.zip 2 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted September 1 Share Posted September 1 1 hour ago, nanochess said: It is a subroutine that saves the return address into the stack, jumps to the subroutine (the data label with the name), and then returns back using the stack. Cool, would you ever consider reserving a register to hold "JSR". Quote Link to comment Share on other sites More sharing options...
Tursi Posted September 1 Author Share Posted September 1 (edited) 48 minutes ago, TheBF said: Cool, would you ever consider reserving a register to hold "JSR". You could, I think there are one or two that the code doesn't touch. But you don't really need to - it's not used often enough that you'd see a benefit. As a for instance - you'd get bigger bang-for-the-buck shoving the VDP write address address into a register, as that IS used a lot. But I think the performance is pretty decent as it stands. Edited September 1 by Tursi 2 Quote Link to comment Share on other sites More sharing options...
Tursi Posted September 1 Author Share Posted September 1 1 hour ago, JasonACT said: No need for a C version then Try.zip 1.09 kB · 2 downloads I appreciate the effort though, thanks! I went all over the internet, even deep into the MSX forums, hunting for something like that. But seems @nanochess knows the algorithm well enough to even fix the port on an unfamiliar architecture! 3 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.