bbc basic in unicorn
Michael Grunditz (8594) 259 posts |
Only simulating input and output swi’s, so it is a bit limited in what it can do. |
Rick Murray (539) 13850 posts |
Brilliant! You can emulate ARM and run BBC BASIC on the Brexit Unicorn. Whodathunkit? Seriously, though, what’s a unicorn? Google… shows me a lot of rainbow coloured horse-like creatures. |
Rick Murray (539) 13850 posts |
Hmmm, the magic combination that Google likes is “unicorn processor”, and that led me to https://www.unicorn-engine.org/ |
Michael Grunditz (8594) 259 posts |
Yes sorry for not explaining. Unicorn Engine is a cpu emulator that runs on many platforms. My approach is to use the cpu emulation for the main program , in this case standalone basic. All swi replies are done in host code. Just did OS_File 255 which gave med LOAD :) I don’t know how far this can go. In theory the platform will be more or less cpu agnostic with a lot of code running inside the hosts native code. |
Rick Murray (539) 13850 posts |
About as far as keeps your interest. ;)
Hmm, 32 bit RISC OS, 64 bit ARM…? |
Rick Murray (539) 13850 posts |
By the way, your screenshots indicate you are running in immediate mode and giving commands directly to BASIC. |
Michael Grunditz (8594) 259 posts |
I wonder that too … need to check , I have hacked a bit in the BASIC sources.. maybe managed to remove it. |
Michael Grunditz (8594) 259 posts |
Found it , the “>” is printed with OS_PrintI which I don’t support right now. |
Michael Grunditz (8594) 259 posts |
And there it is: |
Rick Murray (539) 13850 posts |
👍 Now that looks right. |
Michael Grunditz (8594) 259 posts |
I can also play games! |
David J. Ruck (33) 1636 posts |
How does Unicorn compare with qemu? |
Michael Grunditz (8594) 259 posts |
Well, Unicorn is a cpu only emulator (from my understanding). Also easy to use. It also have JIT , platform independent I think. |
Michael Grunditz (8594) 259 posts |
LOAD,SAVE,TEXTLOAD and TEXTSAVE are working now, was a bit of mess until I found out that I was missing a SWI. Thanks to Nemo for pointing it out. |
Michael Grunditz (8594) 259 posts |
Now with WiMP support ( very limited ) The window gets created in Wimp_Initialize , and that will change. |
Rick Murray (539) 13850 posts |
Good luck with menus. I had a half-assed crack at writing a clone of Arthur’s Wimp a couple of Christmases ago. https://heyrick.eu/blog/index.php?diary=20201227#rarthur if you’re interested. |
Michael Grunditz (8594) 259 posts |
Nice project! I am sure that I will fail sooner or later. But I think that a hosted environment is better than a completely emulated system. |
David J. Ruck (33) 1636 posts |
In !GraphTask there is program called !DEEJsys I wrote for the BBC Master in the summer of 1987 after I’d seem a picture of the Arthur desktop in the Acorn User magazine. Because I hadn’t got an Archimedes and used Arthur at that point, it doesn’t quite work the same, but I think a desktop in a 320×160 4 colour mode in 20K of BASIC isn’t too bad. |
Rick Murray (539) 13850 posts |
You undersell yourself druck. For “isn’t too bad” read “bloody good”. |
Michael Grunditz (8594) 259 posts |
First sign of ARM module support: Hijacking SWI numbers, since I do not have a prompt. Loading Draw module :) |
Michael Grunditz (8594) 259 posts |
SWI lookup , in which module is it? Using PineTools as test module. |