Page 1 of 1
Native Pi emulator?
Posted: Wed Feb 25, 2015 5:46 pm
by lostcarpark
Hi folks,
I have a thought...
I wonder how hard it would be to build a QL emulator that runs "bare metal" on a Raspberry Pi, without having to not an OS first.
I see there's a similar project for the Commodore 64, though I haven't dug into it yet.
The Pi would make a pretty powerful QL, and would be a limited set of hardware to support.
Does it sound possible, or is it too much to take on?
James
Re: Native Pi emulator?
Posted: Wed Feb 25, 2015 10:53 pm
by NormanDunbar
lostcarpark wrote:I wonder how hard it would be to build a QL emulator that runs "bare metal" on a Raspberry Pi, without having to not an OS first.
You are scaring me!
You would need to really know the ins and outs of the Broad comments chip, and ARM Assembly, which is somewhat weird when you've dealt with CISC chips for years. Then there's the Pi2, with a different version of the ARM, which I'm not sure if it uses the same instruction set, I think not as the kernel for the old Pi won't run on the new one.
This is not to say that it can't be done, of course, but who among us has the skills? The time? The inclination? No matter how much fun it might be!
I mean, how hard could it be?

Re: Native Pi emulator?
Posted: Thu Feb 26, 2015 8:32 am
by Derek_Stewart
Hi Norman,
I think M68K to ARM would very time consuming and tedious, but I doubt a QL OS that we have the source for i.e.. JS, Minerva or SMSQ/E would be able to be ported to an ARM processor.
UQLX is written in C, maybe that would be easier rewritten in ARM assembler.
I am looking at converting older BBC Micro 6502 assmbler programmes, that were embedded in the BBC Basic, to M68K for the QL, not straight forward, but maybe "do-able"
Re: Native Pi emulator?
Posted: Thu Feb 26, 2015 3:07 pm
by XorA
To do bare metal you don't actually need to convert whole thing to assembler, you only need enough assembler to setup for C stack. You could probably steal that much from startup.S in Linux or u-boot.
Seems like a lot of work though, it would be much quicker and easier to just strip down a distro and run uQlx as the only task. You would also have the advantage then of still having the PTY and TCP support to access linux drivers without having to re-implement in QL.
Re: Native Pi emulator?
Posted: Thu Feb 26, 2015 8:07 pm
by NormanDunbar
NormanDunbar wrote:Broad comments chip
Of course, I did mean the Broadcom chip. Bloody spell chequer, it's my worst enema!

Re: Native Pi emulator?
Posted: Thu Feb 26, 2015 10:51 pm
by lostcarpark
Some good points here. Some I'd already thought of, and some I hadn't.
I haven't had a chance to look at the Commodore Pi project yet, which seems to be doing something very similar (although for a simpler architecture, and with a bigger support base).
I don't think very much assembly would be required, and most of it could be no done with c code, much of which has already been written.
The second option, as suggested above, would be to do it on a minimal Linux distro. This is actually what I was thinking of when I came across the Commodore project, which got me thinking of more adventurous plans. If I went this road, I'd prefer to leave out x-windows, and have the emulator run in a full screen graphics mode. I'm not sure how hard this would be on the Pi (probably can't just fire of int10 like you could on old x86 PCs).
Thanks for the thoughts,
James
Re: Native Pi emulator?
Posted: Thu Jul 16, 2015 10:10 pm
by EtchedPixels
lostcarpark wrote:
adventurous plans. If I went this road, I'd prefer to leave out x-windows, and have the emulator run in a full screen graphics mode. I'm not sure how hard this would be on the Pi (probably can't just fire of int10 like you could on old x86 PCs).
The PI has a GPU which roughly speaking talks someting quite close to GL/ES, so you can dump X, not that in fact most GL/ES rendering really touches X in the first place. The more you can do all your video scaling and processing in GL/ES the better as the PI GPU is very powerful while the CPU is not.