Page 5 of 7
Emulator r39 Released
Posted: Fri Apr 01, 2022 5:42 am
by Greg King
On 3/31/2022 at 6:33 PM, desertfish said:
I'd like to try your test program but the sdcard image acts weird, I can't load the file off of it. It is in petscii symbols (uppercase) and I can't load it it keeps saying file not found. Can you post just the PRGs zipped here perhaps as well instead of on an sdcard image?
Type a control-n. Then, load the file with lower-case letters:
load"cx16*"
Emulator r39 Released
Posted: Fri Apr 01, 2022 5:48 am
by svenvandevelde
On 4/1/2022 at 12:33 AM, desertfish said:
I'd like to try your test program but the sdcard image acts weird, I can't load the file off of it. It is in petscii symbols (uppercase) and I can't load it it keeps saying file not found. Can you post just the PRGs zipped here perhaps as well instead of on an sdcard image?
Of course, please find attached. Thank you for trying it out:
cx16-mouse - problem.prg cx16-mouse - working.prg FILE
Emulator r39 Released
Posted: Fri Apr 01, 2022 5:50 am
by svenvandevelde
On 4/1/2022 at 5:42 AM, TomXP411 said:
It's an upper-lower case thing. Just mount the file in Windows and invert the case, making the filename all (I think) upper case.
Correct. In the above post I've attached the prg files and the input file for trying.
You can modify and compile using kick assembler the assembler files i attached in the above post.
For example, change the file name and then recompile ...
In parallel i'm also testing further and today i'm checking the ROM code as well ...
Emulator r39 Released
Posted: Fri Apr 01, 2022 6:06 am
by svenvandevelde
On 3/31/2022 at 8:30 PM, Greg King said:
You should call cbm_k_clrchn()
before you call cbm_k_close().
It's the opposite of when you started to use the file:
OPEN the file,
connect to the file.
When you're finished, you must:
disconnect from the file,
close the file.
This does not seem to help. Made a video demonstrating the issue.
Also the API CLRCHN is to clear all channels. I believe the CLRCHN is to refocus on the keyboard input and to clear all channels.
Should not influence the CLOSE call. But that is a discussion that already happened earlier in this forum.
Please have a look in the video, it demonstrates the problem.
This issue also occurs in my game, where i did identify the issue by eliminating all logic gradually
until i got the mouse pointer working, and then gradually i reapplied parts of the logic until i found the
exact routines that were causing the issue (i did multiple recompiles, as you can imagine :-)-.
Emulator r39 Released
Posted: Fri Apr 01, 2022 7:07 am
by svenvandevelde
Could even further narrow the issue ... Just opening a file and closing a file result in the issue without any reading of characters done.
cx16-mouse - open close.prg cx16-mouse - open close.asm cx16-mouse - open only.prg cx16-mouse - open only.asm FILE I'm going to leave it at this stage not to over pollute the forum here ... There is now sufficient information to have a look at the ROM code or emulator code (don't know), to see where the problem is.
Please try out the PRGs. I've made a very verbose explanation in the code ...
Also attached the relevant C code routines so you can see the logic on a higher level.
cx16-mouse - open close.c cx16-mouse - open only.c Would be interested
@Michael Steil what is your take on this. I've been looking at the commit history of the R39 and I
don't think the issue is due to the mouse logic itself. I think the issue is related to a combination of dos or file io updates and screen mode updates.
I've also noticed a couple of vectors being updated ... Could it be that registers are incorrectly overwritten?
Note that in this resimulation is not doing much actually, just opening a file and closing and measuring mouse IO.
The screen writing is natively on the VERA, there are no CHROUT API calls done.
Sven
Emulator r39 Released
Posted: Fri Apr 01, 2022 9:33 am
by Greg King
What happens if you open and close the command/status channel instead of a file?
Emulator r39 Released
Posted: Fri Apr 01, 2022 12:38 pm
by svenvandevelde
On 4/1/2022 at 11:33 AM, Greg King said:
What happens if you open and close the command/status channel instead of a file?
You mean 1,8,15 ? Same effect. Tried that already
?
Emulator r39 Released
Posted: Fri Apr 01, 2022 6:12 pm
by desertfish
@svenvandevelde with the "cx16-mouse open close.prg" program, I could reproduce the problem. However, I think it's
an emulator issue ; the problem only occurs when using x16emu. Using box16 to run the same program, the issue does NOT occur.
Emulator r39 Released
Posted: Fri Apr 01, 2022 6:20 pm
by svenvandevelde
On 4/1/2022 at 8:12 PM, desertfish said:
@svenvandevelde with the "cx16-mouse open close.prg" program, I could reproduce the problem. However, I think it's
an emulator issue ; the problem only occurs when using x16emu. Using box16 to run the same program, the issue does NOT occur.
now THAT is an amazing finding. Kudos
@desertfish for this!
So I need to remake the ROM and plug it into the box16. Let me try that ...
On top, please find an interesting discussion here:
Match mouse position in emulator window with host position · Issue #376 · commanderx16/x16-emulator (github.com)
Emulator r39 Released
Posted: Sat Apr 02, 2022 7:33 am
by svenvandevelde
It is working perfectly now in Box16 using rom R39 ...
Game is flowing well ... Also implemented performance improvements on the floor painter and scroller.