Prog8 language and compiler topic

All aspects of programming on the Commander X16.
User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »


So it seems that Windows needs fiddling with the PATH and/or JAVA_HOME environment variables? I would have guessed (hoped?) that the JDK installation would take care of that.  Anyway, as long as java.exe can be found in your path you can just type "java -jar prog8compiler-7.5-all.jar <options>" on the command line.

Borgar's script is handy if you frequently use the same command line arguments. Personally I'd use an alias for that (which is done with doskey on windows I believe?), but there's always more than one way to skin a cat!

Happy programming

 

yock1960
Posts: 136
Joined: Tue Nov 16, 2021 8:42 pm

Prog8 language and compiler topic

Post by yock1960 »



On 12/12/2021 at 10:14 AM, desertfish said:




So it seems that Windows needs fiddling with the PATH and/or JAVA_HOME environment variables? I would have guessed (hoped?) that the JDK installation would take care of that.  Anyway, as long as java.exe can be found in your path you can just type "java -jar prog8compiler-7.5-all.jar <options>" on the command line.



Borgar's script is handy if you frequently use the same command line arguments. Personally I'd use an alias for that (which is done with doskey on windows I believe?), but there's always more than one way to skin a cat!



Happy programming



 



Yes well, after some difficulties with multiple versions of Java, SET-ing environment variables was not quite the thing. I can compile now, but lacking an r39 emulator, I can't do what I'd like to, as it requires floating point. No, I'm not going to build my own, this 'limbo' r39 issue has caused me and likely others too, a fair bit of aggravation....but not enough to figure out how to use another tool set that I will never use again! They should post version 39, how long has it been? There are plenty more numbers after that....40,41,42.....

User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »


@yock1960 Yes this r39 limbo is really annoying, I'm sorry about that. When I made the decision to make prog8 r39 only I didn't think it would take this long for it to finalize.

Maybe this can be a solution for you though:

- use BOX16 the alternative emulator, it is built for r39 and includes a precompiled windows binary https://github.com/indigodarkwolf/box16/releases

- download ZeroByte's patched v39 kernal bin image from this topic https://www.commanderx16.com/forum/index.php?/topic/2064-r39-patched-kernal-to-fix-load-into-hiram-functionality  and install that as the rom.bin

Prog8 can launch box16 as the alternative emulator with -emu2 command line option.

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

Prog8 language and compiler topic

Post by ZeroByte »


Box16 is fantastic for debugging - it has lots of nice visualizations for various components, and imports the .sym files that ca65/cc65 generate so you can have labels in the assembly monitor.

yock1960
Posts: 136
Joined: Tue Nov 16, 2021 8:42 pm

Prog8 language and compiler topic

Post by yock1960 »


Well, I've downloaded the emulator and rom, but it must not be meant for me to use it. It opens a window....white and empty. Apparently there is something I don't understand about this.

Greg King
Posts: 162
Joined: Wed Jul 08, 2020 1:14 pm

Prog8 language and compiler topic

Post by Greg King »


Box16 uses OpenGL (Graphics Language) to speed up its display.  But, Microsoft doesn't support it.  The OpenGL driver is old, and doesn't work with some modern graphics chips.  There's no workaround.  Box16 runs, but we can't see what it does.

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

Prog8 language and compiler topic

Post by StephenHorn »



On 12/13/2021 at 11:43 AM, yock1960 said:




Well, I've downloaded the emulator and rom, but it must not be meant for me to use it. It opens a window....white and empty. Apparently there is something I don't understand about this.



Well, I don't see the white screen problem on any of my systems at home. My previous thought was that it might be a problem with the Intel drivers, not Microsoft, if you're running with an Intel graphics card (on-board with the motherboard, or certain laptops, or something like that). It's also been suggested that multi-display systems may have issues. I could see that, especially if the displays output from different video cards, but I do develop on a multi-display system (different outputs on the same RTX 2080 card) and Box16 has no trouble having the window dragged between the two displays on that system.

If there's no rom.bin, it should immediately exit after printing an error message to the console output. That console window probably closes too quickly to be read if you just double-click on box16.exe. If you're using the r38 rom.bin, instead of a build of the latest ROM source code on Github, then it should open and sit on a blue screen, but at least with the various UI elements like the menu bar at the top of the display.

With a white screen and no UI, my guess continues to be that OpenGL failed to initialize for some reason, and I have no real way to know what that reason is right now, though I suppose I should add some popups or something to indicate the failure, and log messages to a file that folks can then send me. In any event, I've tested it on as many modern-ish computers as I have (with respect, I have not tested it on my Windows 95 or 98 laptops, nor my 486 or older computers, as those are... "out of scope", please use Windows 10 or Windows 11).

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
yock1960
Posts: 136
Joined: Tue Nov 16, 2021 8:42 pm

Prog8 language and compiler topic

Post by yock1960 »


So, the laptop that I originally tried this on is an oem Windows 10, with Nvidia graphics...white screen window, with title bar, etc.. Next tried a Win7 laptop with on chip Intel graphic and then a self built desktop upgraded from Win7 to Win10 with on chip Intel graphics. Both of these machines failed to open the application, giving a 'can't proceed because VCRUNTIME140_1.dll was not found'. Guess I'll try and run this .dll down.

User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »


Don't "hunt" it down, it's dangerous to download random dlls from the internet. Instead install the Microsoft supplied runtime libraries https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170

It's a bit weird that you don't have these yet I thought they came via windows updates automatically, but hey.

yock1960
Posts: 136
Joined: Tue Nov 16, 2021 8:42 pm

Prog8 language and compiler topic

Post by yock1960 »


Well...I didn't know that! So, this 'fancy' gaming laptop that I bought years ago, that has Nvidia graphics...apparently doesn't always use it....but you can force it to...and so now the emulator looks as it should, yay! Thanks everyone!

Post Reply