Page 7 of 7
Re: I would donate - Porting SymbOS
Posted: Mon Dec 16, 2024 2:40 am
by Popopo
bwinkel67 wrote: Sun Dec 15, 2024 6:58 pm
I just tried it on Q-emuLator 3.5.1 (the latest version) with 128K and ROMs: QL_ROM_JS & TK2_rom it works. I usually do it in F2, but also tried it to F1. Note it doesn't need TK2_rom since I soft-load it as well. With my stock QL, I use JSU ROM and have the ICE ROM in the back with only 128K.
Now if you look at the BASIC program, there is no reason it shouldn't work. All it does is:
- Soft-load TK2 (17K of memory) - not needed if you have the TK2 ROM
- Start a Supercharged program: WBLines_exe (<5K of memory)
- Start a Digital 'C' SE program: WBBasic_exe (37K of memory)
- Resizes windows #0, #1, #2 to overlap at bottom of screen making it appear to be single Workbench shell (no memory)
- Loads Workbench screen to give final appearance of being an Amiga: QLWB21_scr (32K of memory)
That's it, so 74 of 128K of RAM is all this needs. As I said, it's just a BASIC script that runs two programs and loads a screen, all done in a particular order to make it appear it's a Amiga Workbench-like GUI -- though it's not, it's just simulation...there is really nothing to it.
In your video, on real hardware, it crashes on the Supercharged program (Baton.exe but renamed to WBLines.exe for this simulation). You can just reboot your actual QL, insert the cartridge and type EXEC MDV1_WBLines.exe to see if it runs (no reason it shouldn't that I can see)
I just tried it now and you are compleately right. I don't understand why ... for sure I must mixed up something and it is my mistake.
Sorry for inconvenience.
Tomorrow I will check a little deeper what is happening.
And thank you

Re: I would donate - Porting SymbOS
Posted: Mon Dec 16, 2024 3:30 am
by bwinkel67
Popopo wrote: Mon Dec 16, 2024 2:40 am
I just tried it now and you are compleately right. I don't understand why ... for sure I must mixed up something and it is my mistake.
Sorry for inconvenience.
Tomorrow I will check a little deeper what is happening.
And thank you
Watching your video again, I think the "bad or changed medium" error was the culprit. The MDV emulator you are using behaves like a real MDV where sometime a timing issue yields that error. I get these on vDrive occasionally too.
Btw, here's a little BASIC program that gives you a pseudo Unix look on the QL. Just like with my Amiga simulation, I combine the three basic channels into a single one (very similar to how UNIX has stdin/stdout/stderr):
Code: Select all
10 REMark Unix on QL
15 PRINT #0,"Device? ";:INPUT #0,_mdv$
20 REMark LET adr=RESPR(17396): LBYTES _mdv$&"tk2_bin",adr: CALL adr+1380
25 WINDOW #0,480,256,16,0: PAPER #0,0: INK #0,7
30 WINDOW #1,480,256,16,0: PAPER #1,0: INK #1,7
35 WINDOW #2,480,256,16,0: PAPER #2,0: INK #2,7
40 MODE 4: FOR i=1 TO 25: PRINT #0: PRINT #1: PRINT #2
45 DEFine PROCedure ls
50 DIR _mdv$
55 END DEFine ls
60 DEFine PROCedure echo(arg$)
65 PRINT arg$
70 END DEFine echo
[Edit: I remarked out the Toolkit 2 load since the program will halt there if you don't have tk2_bin in a microdrive/floppy. It's out of habit for me since I soft-load it for things where I want the jobs command]
Re: I would donate - Porting SymbOS
Posted: Mon Dec 16, 2024 12:05 pm
by Martin_Head
Popopo wrote: Sun Dec 15, 2024 6:02 pm
Martin_Head wrote: Sun Dec 15, 2024 2:25 pm
bwinkel67 wrote: Sun Dec 15, 2024 5:48 am
But what's confusing is that's it is compiled code. I'm not quite sure how Supercharge compiles its code...does it keep track of each chunk of code and what line number it is?
SuperCharge stores the start of each line with a code word, then a word with the line number.
So in your program you would get
.
.
code word,$0087 For an empty line 135
code word,$008C For an empty line 140
code word,$0091 For an empty line 145
.
.
Non empty lines would have code after the line number.
If you think something's gone wrong with the copy, you could try decompiling it
How could I see those codes? I get what I have shown in the video, just that.
I will try again ASAP
If your still interested. Disassemble, or do a Hex dump of the executable SuperCharged program, or load it into a machine code monitor program. Then do a search for the Hex string '0087'.
When you find the right one, There will be a Hex word in front of it. This is the 'code word' I mentioned. It's different for every program you compile.
Then whenever a new SuperBASIC program line starts in the compiled program, you get this code word, then the line number. In the above example lines 135,140,145 are all REMarks. So no compiled code is generated for them, you just get the code word and the line number.
Note that some other SuperBASIC commands do not produce any compiled code, like a REMark does. REPeat and SELect ON for example.