I have made the Git project public (https://github.com/cyborgar/Petaxian) in case anyone want to look at a bit larger Prog8 code example compared to the mostly smaller examples coming with the compiler. I have organized code in multiple files/modules. Though there is no code protection this does require explicit references when crossing modules and that helps a lot with visibility.
I have (slowly) started on another clone game (this one is going to copy liberally from Llamasoft's Gridrunner) but I've just gotten started. I'm going to focus on getting it to work on C64 before I'll probably port it to CX16.
More improvements in generated code efficiency, resulting in smaller code that runs faster. (see the post above this one for an indication of savings you might see)
Also added a few small new quality of life features.
fixed operator not priority: it is now higher prio than and/or/xor !
fixed division of signed bytes by 2
added new cos and sin builtin functions cosr8 sinr8 cosr16 sinr16, and also their unsigned valued siblings. These make it easier to deal with arcs of degrees 0-359 rather than 0-255 of the existing trig functions.
added signed versions of the cx16 virtual registers: r0s - r15s including the L and H byte variants of them.
less temporary variables generated and used
more optimizations to expression evaluations
compiler no longer uses cx16 R15 virtual register as tempvar
While I was boasting about the reduced code size of the compiled Petaxian game, I now discovered that a bug has crept in in 7.3 that now makes the sound glitch out on the C64 build of Petaxian. I will investigate and fix this soon, hopefully.
Weirdly enough the game still works fine with sound on the X16 build.
update: found the bug and fixed it for 7.4, there was a new optimizer added that was too aggressive in removing double-stores
Is anyone using this on a Windows machine? I've tried two different systems now, Win10 & Win7, started with Java 11, moved to the open source Java and all I get are can't access jar file errors. The entire reason that I like working with 'old' 8bit systems is simplicity!
Sure. I use this on WIndows 7 (old stationary pc) and Windows 10 (laptop). Never had any problems getting this to work.
BTW, I have just set up a few small bat scripts to compile and/or run stuff. This on I use just to build the Petaxian code, I have variants that can take program name as argument, build for C64 instead for XC16 etc.
SET PATH=%PATH%;..
SET jar=..\prog8compiler-7.5-all.jar
IF %computername%==BIFROST (
SET javap="C:\Program Files\OpenJDK\jdk-11.0.9.1-hotspot\bin\java.exe"
) ELSE (
SET javap="C:\Program Files\OpenJDK\jdk-11.0.8.10-hotspot\bin\java.exe"
Sure. I use this on WIndows 7 (old stationary pc) and Windows 10 (laptop). Never had any problems getting this to work.
BTW, I have just set up a few small bat scripts to compile and/or run stuff. This on I use just to build the Petaxian code, I have variants that can take program name as argument, build for C64 instead for XC16 etc.
SET PATH=%PATH%;..
SET jar=..\prog8compiler-7.5-all.jar
IF %computername%==BIFROST (
SET javap="C:\Program Files\OpenJDK\jdk-11.0.9.1-hotspot\bin\java.exe"
) ELSE (
SET javap="C:\Program Files\OpenJDK\jdk-11.0.8.10-hotspot\bin\java.exe"
Thanks Borgar! I thought about this, but I thought that after 60+ years of computing, we shouldn't have to do this type of thing anymore! But I guess that's just grumpy old me! ?