Correct, you only need to include rom.bin. There are various symbol files generated by building the rom as well, but even though they've usually been included in the release packages, the emulator doesn't need them and can't load them besides (well, not until or unless the feature gets added).
Yeah, while the symbol tables aren't used by the emulator, they are useful. My menu program works by printing the LOAD command to the screen and stuffing CR into the keyboard buffer. So I looked that up in the symbol table... So it's super useful to know where KERNAL and BASIC variables are located. I was actually going to include them, but forgot and didn't want to spin my Linux VM back up.
I believe it's only necessary with rom.bin, but you also included basic.bin, dos.bin, and geos.bin. When packaging for Linux according to the Makefile it only includes rom.bin.
BTW I succeeded in building it for Raspberry Pi OS Buster on Raspberry Pi 4B and it works with all programs I tested with so far.
I'm in the process of updating Brixx and Invaderz to the new emulator and ROM. I want them to be compatible with R38 and R39 - but how can I detect which version the PRG is running?
I know I can detect if I'm running in the emulator:
read $9FBE/$9FBF, must read 0x31 and 0x36
This doesn't seem to be the version, just an indicator that the software is running on the emulator. Is there an official way to detect ROM/emulator version? I found different solutions, but none seemed officially supportet. Like reading $FF80 or $FFFA etc.
I'm in the process of updating Brixx and Invaderz to the new emulator and ROM. I want them to be compatible with R38 and R39 - but how can I detect which version the PRG is running?
I know I can detect if I'm running in the emulator:
read $9FBE/$9FBF, must read 0x31 and 0x36
This doesn't seem to be the version, just an indicator that the software is running on the emulator. Is there an official way to detect ROM/emulator version? I found different solutions, but none seemed officially supportet. Like reading $FF80 or $FFFA etc.
What's the best approach there?
"The KERNAL version can be read from location $FF80 in ROM. A value of $FF indicates a custom build. All other values encode the build number. Positive numbers are release versions ($02 = release version 2), two's complement negative numbers are prerelease versions ($FE = $100 - 2 = prerelease version 2)." - https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md
Ok, if I see this correctly, right now in the emulator looking at $FF80 shows -38, which means ROM version equals emulator version? Using the one posted further up (upcoming R39?) gets me $FF, so it's a custom ROM, but presumably will be -39 once the emulator and ROM is released?
It occurs to me, that what I actually need is to detect the board revision - so I know which RAM banking address to use and all the other hardware memory mappings.
Ok, if I see this correctly, right now in the emulator looking at $FF80 shows -38, which means ROM version equals emulator version?
Using the one posted further up (upcoming R39?) gets me $FF, so it's a custom ROM, but presumably will be -39 once the emulator and ROM is released?
It occurs to me, that what I actually need is to detect the board revision - so I know which RAM banking address to use and all the other hardware memory mappings.
Yes, the releases have matching ROM and emulator versions. Be careful to negate the number in case it's negative, and then compare it with e.g. 38 or 39. Future versions may use positive numbers.
Non-official builds use $FF as the version, yes.
The next ROM and emulator will be -39.
In order to detect Proto #1 vs. Proto #2, check for abs(version) >= 39. This will work for all released emulator + ROM versions. I'm aware that this check won't work for non-official builds.
In order to detect Proto #1 vs. Proto #2, check for abs(version) >= 39. This will work for all released emulator + ROM versions. I'm aware that this check won't work for non-official builds.
Super, thanks! It's anyway just needed for a few weeks until the official release and the web-emulator are updated. So I will just assume a custom ROM is indicating the latest ROM and board revision.
And maybe the releases happen before I have updated my stuff anyway ?.
If you just want to know your bank address works, you could do something like this:
Check the value at, say $BFFF, inc(bank register), check bfff - if different, your bank register value is correct. If same, inc BFFF, dec(bank). If different then bank reg. is correct. If same then bank reg is wrong. (Then optionally fix the value at BFFF)
Is it legal to bundle the official rom.bin r39 from the Windows release (when it comes) in the snapcraft version of x16emu? because then the tests of release would work on more platforms that are not officially supported: e.g. for Linux with armhf and i386.