Simulating a keypress in Euphoric debugger
Posted: Thu Jul 04, 2013 11:59 pm
Ok, here's the story.
I want to upgrade my old disk transfer tool (Cloaddsk), that reads a disk on real Oric, saves it to PC using the tape save (a simple CSAVE of the read data), then building a disk image (DSK file) from it.
This works perfectly fine with Sedoric disks, I'd like to make it work with any kind of disk.
To do so, I need a routine reading a whole track, including the gaps. Nibble 2.4 does this, so I tried to disassemble it and find the routine, but after several evenings (since 2004), I'm getting nowhere. I'm lost in so much machine code.
So I thought I could locate this routine by using Euphoric's debugger (the routine crashed Oricutron 0.9). But to do so and follow the step by step execution, I have to simulate the keys that trigger the command (CTRL P, that is). Simply typing on keyboard is impossible: time to switch to the debugger, I'd miss the routine start.
So I use the debugger again, and write $9D in $0208, and $A2 in 0209, which are the values I found when I press CTRL P on the keyboard.
But nothing happens.
So my questions are:
- does anyone know how to simulate the CTRL P key combination by "poking" in RAM?
- alternatively, does anyone know where the "load track" routine starts in Nibble 2.4?
- alternatively again, does anyone have a routine (ideally in machine code, not C or ASM) that reads a whole track, with parameters Track / Side / Drive
All this to try and transfer a special protected disk (18 sectors per track and protection byte in the gaps, not Jasmin, not Sedoric, which readdsk doesn't read).
Upgrading Cloaddsk this way would be the ultimate transfer tool, reading on a real Oric any disk format.
Thanks!
I want to upgrade my old disk transfer tool (Cloaddsk), that reads a disk on real Oric, saves it to PC using the tape save (a simple CSAVE of the read data), then building a disk image (DSK file) from it.
This works perfectly fine with Sedoric disks, I'd like to make it work with any kind of disk.
To do so, I need a routine reading a whole track, including the gaps. Nibble 2.4 does this, so I tried to disassemble it and find the routine, but after several evenings (since 2004), I'm getting nowhere. I'm lost in so much machine code.
So I thought I could locate this routine by using Euphoric's debugger (the routine crashed Oricutron 0.9). But to do so and follow the step by step execution, I have to simulate the keys that trigger the command (CTRL P, that is). Simply typing on keyboard is impossible: time to switch to the debugger, I'd miss the routine start.
So I use the debugger again, and write $9D in $0208, and $A2 in 0209, which are the values I found when I press CTRL P on the keyboard.
But nothing happens.
So my questions are:
- does anyone know how to simulate the CTRL P key combination by "poking" in RAM?
- alternatively, does anyone know where the "load track" routine starts in Nibble 2.4?
- alternatively again, does anyone have a routine (ideally in machine code, not C or ASM) that reads a whole track, with parameters Track / Side / Drive
All this to try and transfer a special protected disk (18 sectors per track and protection byte in the gaps, not Jasmin, not Sedoric, which readdsk doesn't read).
Upgrading Cloaddsk this way would be the ultimate transfer tool, reading on a real Oric any disk format.
Thanks!