-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MEGA65: PRG run option (UI/CLI) should work on all (closed) ROM versions #364
Comments
Thanks for the report! The problem is most likely because that's an experimental/development series of ROM (99xxxx), which totally changed how keyboard scanning works and Xemu has to "cheat" to "fake" keypresses to load PRGs which is not detected then by new ROMs because of the totally reworked keyboard scanner routine in the ROM. Meanwhile, to avoid auto-boot DISK images to cause problems, Xemu temporary deactivates the disk image access till the keyboard buffer is "consumed" by the ROM. Since it's never happened because of the changed kbd scanner routine in newer ROMs, it's even left in that state, thus the read error. So though it's a very annoying thing, I am aware of this and it'sthe nature of the experimental ROM: not supported in emulation, with this functionality at least. Unfortunately it's quite impossible to support both methods with current code flow, and would cause major problems. |
Though, I still "reverse the rights ;)" to figure out a better way to support all possible ROMs somehow ... |
We all appreciate your hard work creating the best possible experience for the MEGA65 through Xemu. It sure has made me feel good about programming in BASIC again! 😊👍 |
https://discord.com/channels/719326990221574164/781481205639020554/1091513603061977130 It seems even "non-developer" new ROM version(s?) can have problem here. So in general, I should fix things here to allow all (closed) ROM version to work flawlessly. |
I found the issue, I think. It's not the keyboard handling changes as I thought before. The issue, that Xemu wants to be ROM version independent (also it works ... worked ... with C64(GO64)/C65/MEGA65 KERNAL as well) thus not using address trapping or anything. It looks for the |
Xemu tries to be ROM independent, as there is no "single ROM" version, so ROM traps method is virtually impossible (especially since it must work with old C65 ROMs, GO64 C64-ROMs, and dozens of MEGA65 ROM versions). Thus, Xemu looks for the READY. text on the current screen, and searches for the blinking cursor "can be seen", this way it knows it's the right moment to inject PRG into memory directly, _and_ writing a RUN command onto the screen. After that, a single RETURN key emulation is enough. However. Newer MEGA65 ROM versions seems to use the VIC3 style hardware inverse attribute for cursor, not the C64-way+C65+older MEGA65 way. Thus Xemu could not ever see, the system is ready for injection ... I tried to come with a solution here, which works in each cases, also checking the colour RAM and inverse hardware VIC attribute from now.
Tested with MEGA65 closed ROMs versions 920377, 920383, 990004 also in C64 mode, it seems the fix works in all the cases. |
Thanks for your sterling work. ROM version 920377 works 100%. 👍ROMs 920383 and 990004 still won't run .PRG files and when you try and load a D81 disk image a read error is returned. I downloaded the newest stable version of Xemu 20230201214849 to test this. |
@MightyAxle You need version 20230402002720 available on the "next" branch. On https://github.lgb.hu/xemu/ this is the second "section" of downloadables (aka "future next stable"). The master (aka "stable") branch is something I only seldom update from the then-current next, when next seems to be stable enough in terms of the accumulated changes here since the previous "down-merge" from next to master. This is always the method, ie no direct change to master ever only through the "staging" next from time to time. |
We 100% success rate! All ROMs work on 20230402002720 next branch! 👍Thank you! 🏆 |
Drop using the two-phase ?"@" trick to release RETURN, and use a timeout instead. For C64 LOAD, let's use two normal phase though, we can save the ugly keyboard buffer trick (just introduced in the previous commit btw ...), and we can use "turbo mode" for loading too, to speed of LOADing (no need in MEGA65 mode, as it's usually 40.5MHz mode already). Also several clean-ups here and there.
When using Windows with XMEGA65.EXE on ROM build 990003 it is not possible to run PRG files. Only attaching Disk Images is possible.
If a PRG is selected to run nothing happens. If you try and load the PRG as a Disk image a read error occurs.
Reverting back to ROM build 920376 allows for the running of PRG files.
This issue only became apparent when trying to use the CBM prg Studio by Arthur Jordison when the created PRG files. Since reverting back to an older ROM build everything seems to be working correctly.
The text was updated successfully, but these errors were encountered: