Native Pi emulator?

Discussion and advice about emulating the QL on other machines.
Post Reply
User avatar
lostcarpark
ROM Dongle
Posts: 25
Joined: Thu Feb 19, 2015 6:08 pm
Contact:

Native Pi emulator?

Post 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


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Native Pi emulator?

Post 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! :o

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? :?


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Native Pi emulator?

Post 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"


Regards,

Derek
User avatar
XorA
Site Admin
Posts: 1359
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Native Pi emulator?

Post 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.


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Native Pi emulator?

Post by NormanDunbar »

NormanDunbar wrote:Broad comments chip
Of course, I did mean the Broadcom chip. Bloody spell chequer, it's my worst enema! :lol:


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
lostcarpark
ROM Dongle
Posts: 25
Joined: Thu Feb 19, 2015 6:08 pm
Contact:

Re: Native Pi emulator?

Post 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


EtchedPixels
ROM Dongle
Posts: 5
Joined: Thu Jul 16, 2015 8:08 pm

Re: Native Pi emulator?

Post 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.


Post Reply