Can DE10-Nano Kit hardware emulate Commander X16?

Chat about anything CX16 related that doesn't fit elsewhere
CX16UserSteveC
Posts: 37
Joined: Thu Jul 23, 2020 4:29 pm

Can DE10-Nano Kit hardware emulate Commander X16?

Post by CX16UserSteveC »


I'm wondering if it'd be possible to perform hardware emulation of a Commander X16 with something like a DE10-Nano Kit (see https://www.retrorgb.com/mister.html). Just curious.

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

Can DE10-Nano Kit hardware emulate Commander X16?

Post by StephenHorn »


In a strictly hypothetical sense, sure. The device has more than enough memory.

In a practical sense, there are significant challenges. The current emulator depends on SDL2, so you would need to first figure out how to build SDL2 for that device, or else to build or install Linux onto the device, and from there to build or install SDL2 and then compiler the emulator. Also, in any circumstance, it is highly unlikely that you would be able to run the emulator at full speed. An RPi4 can run the emulator at a little less than half speed, and this is a less powerful device.

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
CX16UserSteveC
Posts: 37
Joined: Thu Jul 23, 2020 4:29 pm

Can DE10-Nano Kit hardware emulate Commander X16?

Post by CX16UserSteveC »



23 minutes ago, StephenHorn said:




In a strictly hypothetical sense, sure. The device has more than enough memory.



In a practical sense, there are significant challenges. The current emulator depends on SDL2, so you would need to first figure out how to build SDL2 for that device, or else to build or install Linux onto the device, and from there to build or install SDL2 and then compiler the emulator. Also, in any circumstance, it is highly unlikely that you would be able to run the emulator at full speed. An RPi4 can run the emulator at a little less than half speed, and this is a less powerful device.



I don't understand the comparison to RPI4 which would be software emulation. I don't know much about the MiSTer FPGA project but my understanding is the DE10-Nano Kit can perform hardware emulation of more powerful machines than the Commodore 64 or Commander X16 using the onboard FPGA resources of the DE10-Nano Kit (see https://www.retrorgb.com/systems.html).

I'm not talking about running a version of the Commander X16 SW emulator on the DE10-Nano Kit, rather I'm talking about running a “hardware emulation core” of the Commander X16 hardware itself similar to the way the other more powerful machines are emulated.

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

Can DE10-Nano Kit hardware emulate Commander X16?

Post by StephenHorn »


Well, you could always rewrite the emulator specifically for the DE10-Nano. That's the "strictly hypothetical" case, because that's more effort than most would consider practical, because of the audio and video output, and input and controller handling, which is currently provided by SDL2 in the emulator implementation. I mean, seriously, rewriting the whole X16 for one of these. It'd be a big project, and you're unlikely to get much help from too many folks, in particular because one of the rules on this forum is "no clones machines". (It's literally rule #5 at the top of the Forums page.)

The FPGA will probably buy you some substantial wins for the CPU, YM2151, and some other components. I'm less confident that it will solve the VERA, mostly because I don't know if that's enough PLEs (and I'm not familiar enough with FPGAs in general to know where that device stands in terms of PLEs). I don't remember what FPGA the VERA is being developed on to compare directly, either.

And of course, if the DE10-Nano has enough PLEs to encompass the entirety of the 65C02, YM2151, VERA, etc., then sure, you'll have an X16 running at whatever crazy clock speed the system can manage. But if you can't swing, say, the VERA (which is a beast unto itself), then you're going to slow down very substantially as you try to make up the difference in software emulation.

So yes, it's totally possible. It's just going to be a lot of effort because you won't strongly benefit from any of the emulator's existing source code, except as an implementation reference. Nor are you likely to receive much assistance from the X16 team, they're interested in, you know, building the X16.

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
CX16UserSteveC
Posts: 37
Joined: Thu Jul 23, 2020 4:29 pm

Can DE10-Nano Kit hardware emulate Commander X16?

Post by CX16UserSteveC »



25 minutes ago, StephenHorn said:




Well, you could always rewrite the emulator specifically for the DE10-Nano. That's the "strictly hypothetical" case, because that's more effort than most would consider practical, because of the audio and video output, and input and controller handling, which is currently provided by SDL2 in the emulator implementation. I mean, seriously, rewriting the whole X16 for one of these. It'd be a big project, and you're unlikely to get much help from too many folks, in particular because one of the rules on this forum is "no clones machines". (It's literally rule #5 at the top of the Forums page.)



The FPGA will probably buy you some substantial wins for the CPU, YM2151, and some other components. I'm less confident that it will solve the VERA, mostly because I don't know if that's enough PLEs (and I'm not familiar enough with FPGAs in general to know where that device stands in terms of PLEs). I don't remember what FPGA the VERA is being developed on to compare directly, either.



And of course, if the DE10-Nano has enough PLEs to encompass the entirety of the 65C02, YM2151, VERA, etc., then sure, you'll have an X16 running at whatever crazy clock speed the system can manage. But if you can't swing, say, the VERA (which is a beast unto itself), then you're going to slow down very substantially as you try to make up the difference in software emulation.



So yes, it's totally possible. It's just going to be a lot of effort because you won't strongly benefit from any of the emulator's existing source code, except as an implementation reference. Nor are you likely to receive much assistance from the X16 team, they're interested in, you know, building the X16.



I'm wondering if in hindsight it would have made more sense to develop the X16 on something like the DE10-Nano instead of developing a new hardware platform. I understand there was an initial resistance to using FPGAs in the Commander X16, but that resistance was eventually abandoned for the VERA. And there 's a Commodore 64 “hardware emulation core” that could have been used as a starting point.

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

Can DE10-Nano Kit hardware emulate Commander X16?

Post by StephenHorn »



7 minutes ago, CX16UserSteveC said:




I'm wondering if in hindsight it would have made more sense to develop the X16 on something like the DE10-Nano instead of developing a new hardware platform. I understand there was an initial resistance to using FPGAs in the Commander X16, but that resistance was eventually abandoned for the VERA. And there 's a Commodore 64 “hardware emulation core” that could have been used as a starting point.



It's Dave's dream computer, and it was a design goal from the start to avoid FPGAs. He eventually settled on an FPGA for the VERA, but only because none of the other video chip/card solutions were viable for his vision.

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
Fnord42
Posts: 74
Joined: Fri Aug 14, 2020 8:56 am

Can DE10-Nano Kit hardware emulate Commander X16?

Post by Fnord42 »


Plus, I want a real 65*02 CPU.

I know that's not really rational, but I also know that I'm not alone with this. ?

TomXP411
Posts: 1783
Joined: Tue May 19, 2020 8:49 pm

Can DE10-Nano Kit hardware emulate Commander X16?

Post by TomXP411 »


The FPGA on a DE-10 Nano is more than capable of handling VERA and an 8MHz 65C02. It emulates the Amiga very well, and there are at least half a dozen cores that implement 6502 CPUs. 



However, the discussion of a CX16 FPGA clone is currently not allowed here, since their license deal with Cloanto prohibits it. 

Having said that...it's certainly possible to build a generic 6502 computer using the MiSTer framework. I'd even love to contribute to an open source BIOS for such a machine. 

 



 

 

TomXP411
Posts: 1783
Joined: Tue May 19, 2020 8:49 pm

Can DE10-Nano Kit hardware emulate Commander X16?

Post by TomXP411 »



5 minutes ago, Fnord42 said:




Plus, I want a real 65*02 CPU.

I know that's not really rational, but I also know that I'm not alone with this. ?



There's nothing wrong with that, for those that want "real" hardware. 

Personally, I see FPGA hardware as being just as 'real" as discrete chips, with the added benefit that they can be improved much more quickly. The MiSTer is nearly the perfect computing platform, except that it has maddening holes when it comes to connectivity. (The networking relies on a PPP shim going through a fake serial port, and there's no actual serial port connectivity for people who want to connect up RS-232 devices.)  And since much of the hardware work is already done, the MiSTer is a great developent platform for fantasy computers, precisely because you don't need to worry about things like "I wired the video connector backward, and now I have to wait 8 weeks for the PCB manufacturer to run off a new version. of the board."

In fact, I have a real Commodore 64 (three, if you count my 128), but the machine I prefer and use the most is my Ultimate 64, which is just a big FPGA board stuck inside a 64C chassis.

 

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

Can DE10-Nano Kit hardware emulate Commander X16?

Post by StephenHorn »



3 minutes ago, TomXP411 said:




precisely because you don't need to worry about things like "I wired the video connector backward, and now I have to wait 8 weeks for the PCB manufacturer to run off a new version. of the board."



And let's not forget the PS/2 port. ? I still call it the X-16 "Australia" prototype, because of the components that are "down under".

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
Post Reply