Jump to content
CX16UserSteveC

Can DE10-Nano Kit hardware emulate Commander X16?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Posted (edited)
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.

Edited by CX16UserSteveC
Added clarification on “hardware emulation core”.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

  • Like 2

Share this post


Link to post
Share on other sites

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

  • Like 3

Share this post


Link to post
Share on other sites
Posted (edited)

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. 

 


 

 

Edited by TomXP411
  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)
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.

 

Edited by TomXP411
  • Like 3

Share this post


Link to post
Share on other sites
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".

  • Haha 1

Share this post


Link to post
Share on other sites
2 minutes ago, TomXP411 said:

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.

 

That's a valid point. Oddly enough, I don't mind at all that Vera is FPGA-based - probably because it is a completely new thing anyway.
I think having every major component of the system as a discrete part adds to the feeling of being able to understand how everything works together. (Again, not really rational - I'm aware that a well documented FPGA design doesn't have to be worse in that regard.)

Share this post


Link to post
Share on other sites

Now I wonder how Google's doing with their Skywater PDK stuff.

I mean, why slave yourself to an FPGA if you can apply an open-source design to an actual nib of silicon?

Share this post


Link to post
Share on other sites

Yeah, the point of the MiSTer is that you would have to reimplement the entire machine in a FPGA, but it would work as on a RetroArch machine, as I understand. It's definitely possible, but whether it would be legal, I'd advise talking about it with the X16 dev team first. Of course, you won't have to reimplement the ROM, which is where the Cloanto IP would be, so at least that.

Now, adding a generic 6502 core would be pretty cool 🙂

Edit: I did a bit of research, the emulator is under a BSD 2-Clause (unless it's an error), so you can steal its code however you want as long as the licence is retained, so I imagine a software reimplementation would be okay, the thing is that the X16 design and IP would probably be copyrighted so you couldn't do an exact clone of it, at least in hardware. Thing is, we're talking about an FPGA, but I would think it would be more considered of the software side if it's just a core to a larger machine. In any case, still best to consult someone like @Perifractic about it first.

Share this post


Link to post
Share on other sites

Maybe I should have posted this to the "Off-topic Lounge" instead of the "X16 Discussion Lounge" since it's a bit off-topic to the mainstream development. I'm not really seriously proposing to emulate the Commander X16 with the DE10-Nano Kit at this point (this is more of a hypothetical question), but I was curious if something like the DE10-Nano Kit is powerful enough to fully "hardware" emulate the Commander X16. I was also wondering how hard it would be since I believe there are existing FPGA cores for the 6502 and the Commodore 64, and the VERA FPGA code could also perhaps be ported to the DE10-Nano Kit FPGA.

Share this post


Link to post
Share on other sites

Yeah, I do believe you're in the right sub-forum since you're talking about the X16 and how feasible (and possibly legal) it is to port a simulation of it to the DE10-Nano Kit, but if you're going to go off-topic from the question I'd suggest to make another thread in the Off-topic Lounge 🙂

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, Juju said:

Yeah, the point of the MiSTer is that you would have to reimplement the entire machine in a FPGA, but it would work as on a RetroArch machine, as I understand. It's definitely possible, but whether it would be legal, I'd advise talking about it with the X16 dev team first. Of course, you won't have to reimplement the ROM, which is where the Cloanto IP would be, so at least that.

Now, adding a generic 6502 core would be pretty cool 🙂

Edit: I did a bit of research, the emulator is under a BSD 2-Clause (unless it's an error), so you can steal its code however you want as long as the licence is retained, so I imagine a software reimplementation would be okay, the thing is that the X16 design and IP would probably be copyrighted so you couldn't do an exact clone of it, at least in hardware. Thing is, we're talking about an FPGA, but I would think it would be more considered of the software side if it's just a core to a larger machine. In any case, still best to consult someone like @Perifractic about it first.

This has been discussed in other threads, but since this thread is explicitly about this topic, it's good to hash it out here. 

Yes - the emulator is BSD-2, but the KERNAL ROM is licensed by Cloanto, with All Rights Reserved. 

So while someone can fork the emulator without needing to ask permission, they cannot fork the ROMs, because those are under license. This would affect the making of an FPGA device, as well, since the FPGA computer still needs the ROM code. 

So what CAN we do? 

We can extend or enhance the emulator - and submit those enhancements back to the official emulator. 

We cannot extend or enhance the emulator and distribute the emulator with the ROMs to other people. 

We can build our own 65C02 computer for our own use, potentially using ideas from the Commander X16 project.

We can't use any Commander X16 firmware (ie: the BASIC or KERNAL ROMs) in our hobby computers. We can't call our hobby computer a Commander X16 or anything that sounds like that. 

 

And to answer the OP's question - again, YES - the MiSTer is powerful enough to emulate the components in the Commander. But until we're given the green light, we should not actually undertake any work-alike projects like that.

In the meantime, check out the existing 6502 cores and see if you can make one of those run at 8MHz. Hint: The Commodore 64 is the wrong core to use as a base, because the system clock is tightly coupled to the VIC chip. The Apple I or Multicomp cores might be a better place to start. 

 

 

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Without getting too lengthy, basically @TomXP411 is correct. There is actually a rule about it pinned to the top of the main forum on this site. It's also in the FAQ.

Currently, full reimplementations are at best frowned upon, and at worst copyright theft. Please see FAQ for any more questions on this. Thank you. http://commanderx16.com/faq

Discussing what is theoretically possible is of course fine, up to a point 😉

 

 

 

 

 

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)
On 8/26/2020 at 12:24 AM, 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 would not be possible, I think. 

You could make more use of the FPGA, and make the X16 cheaper by having less discrete components and move more logic to the FPGA (including the CPU). This is how other projects like the C256 Foenix, the Spectrum Next (I posted a link to the ongoing Kickstarter 2 in another part of this forum) and the Mega 65 works. No problem for X16 to take that path in the future (if it so wishes). Would probably lower the cost of producing the unit.

That said, even if I am a great fan of the MiSTer project (will buy and build one myself in time), it could not replace either of those FPGA projects above (Foenix, Next, M65), or the X16 project. The DE10-nano dev kit have too limited I/O to support those projects. The expansion slots in the X16 for example would not be possible. And I think the expansion slots in the X16 is a neat idea and great feature (that was what made the Apple II and the IBM PC so successful in being relevant and gradually upgraded over time).

Short answer;

From a software stand point it is perhaps possible to build FPGA cores of those machines (with more or less difficulty, depending on different memory architectures), for the MiSTer/DE10-nano.

From a hardware and IO stand point it is not possible in the same way to replace those projects, including the X16, with a MiSTer. So be happy that we have the X16 project! 🙂

Edited by martinot
  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, martinot said:

It would not be possible, I think. 

You could make more use of the FPGA, and make the X16 cheaper by having less discrete components and move more logic to the FPGA (including the CPU). This is how other projects like C256 Foenix, Spectrum Next (I posted link to the ongoing KS in another part of this forum) and the Mega 65 works. No problem for X16 to take that path in the future (if it so wishes). Would probably lower the cost of the producing the unit.

That said, even if I am a great than of the MiSTer project (will buy and build one myself in time), it could not replace either of those FPGA projects above (Foenix, Next, M65), or the X16 project. The DE10-nano dev kit have too limited I/O to support those projects. The expansion slots in the X16 for example would not be possible. And I think the expansion slots in the X16 is a neat idea and great feature (that was what made the Apple II and IBM PC so successful in being relevant and gradually upgraded over time).

Short answer;

From a software stand point it is possible to build FPGA cores of those machines (with more or less difficulty, depending on different memory architectures), for the MiSTer/DE10-nano.

From a hardware and IO stand point it is not possible in the same way to replace those projects, including the X16, with a MiSTer. So be happy that we have the X16 project! 🙂

The MiSTer doesn't replace any other platform's hardware interfaces, either... there are no expansion ports on ao486, Amiga, Apple ][, or any other of the other cores that have expansion ports on the real hardware. Instead, expansion devices are emulated directly on the FPGA and, where appropriate, their signals are brought to the outside world through USB-attached hardware or software emulation on the ARM CPU. 

Having said that... have you actually looked at a DE10-nano board? There are a total of 72 GPIO pins connected directly to the FPGA. It would be relatively simple to connect those to an external backplane board to drive an expansion bus, if someone felt they needed one. 

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

 

On 8/27/2020 at 1:40 AM, martinot said:
You could make more use of the FPGA, and make the X16 cheaper by having less discrete components and move more logic to the FPGA (including the CPU).

That's exactly what X16 team is planning to do at stage 3. So just wait patiently. )

 

Edited by Cyber
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
On 8/27/2020 at 6:40 AM, martinot said:

You could make more use of the FPGA, and make the X16 cheaper by having less discrete components and move more logic to the FPGA (including the CPU).

 

Thing is, whether a kit is ever provided, the through hole kit buildable system is the system reference design.

Tinkering with and tweaking the hardware can easily become a slippery slope, which leaves people scattered all along the slope depending on where they personally dug in their heels, and no sustainable community developing for the platforms because every system is incompatible in some way with every other system.

The challenge of getting a board made of mostly ASIC through hole parts including a real 8bit microprocessor is what keeps the temptation to endless hardware tweaking in check. Now, that is "to the extent that that is practical", and with no suitable VGA tile/sprite chip, an FPGA equivalent had to be created. But "to the extent practical" still disciplines the system reference design, and then the system reference design gives the implementation target for the systems that rely on a larger FPGA or additional CPLD (as the case may be).

Then, hypothetically, people who huy a Vera and are able to organize a clean room ROM alike that doesn't use CX16 originated or licensed code might be ready to go ... except good luck finding enthusiastic 65C02 programmers who haven't had a look at either C64 ROMs or the CX16 code, and without those enthusiastic but provably "never seen that code" set of people, you don't have a clean room and really should be working on something else. Of course, the way the original PC BIOS clone clean rooms were populated was by finding competent minicomputer programmers who had never worked on x86 chips before and PAYING THEM to learn how to program 8086s and then write the clean room code. So unless some nostalgic high tech millionaire wanted to fund the whole thing, that specific strategy is not available.

 

  • Like 1

Share this post


Link to post
Share on other sites

There is another potential. You just do. It provide ready to use ROMs but just Diffs to the cloanto ROMs . That way every one need to purchase a copy of the cloanto ROMs and then patch them. 
 

That should be possible. 
 

and yes you can put the complete X16 on a DE10 Nano. Also the DE10 Nano comes with quite a few GPIO pins. You do not need any of the expansions and can use them as expansion port. Still I do not see any point in doing so. If you want hardware you go for certain reasons the X16 way. If you do. It need the hardware ... why then bother with an FPGA? Run vice with a C128 or Frodo for a CPC or even Amiga or ST in an Emulator. You get everything you need there. X16 does not give you anything better or more. 

Share this post


Link to post
Share on other sites
45 minutes ago, SerErris said:

Run vice with a C128 or Frodo for a CPC or even Amiga or ST in an Emulator. You get everything you need there. X16 does not give you anything better or more. 

There is NO BASIC computer on the market, now or ever, that's quite like the CX16. The 128 is much, much slower, and the Amiga and ST are not BASIC computers. 

The closest thing might be the MSX computer running one of the faster CPUs... but it's awkward and hard to use in emulation, and setting up and running it properly in MiSTer has proven to be a bit of a challenge. I've done so, but it's... complex. 

 

  • Like 3

Share this post


Link to post
Share on other sites
On 8/26/2020 at 6:47 AM, 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. 🙂

Rationality is not about what you want, it's about how you go about getting it -- including accepting you can't always get EVERYTHING you want.

Now "reasonable"? Obviously since I also want a real 65xx processor., I'll accept it as PERFECTLY reasonable.

 

Share this post


Link to post
Share on other sites
23 hours ago, TomXP411 said:

There is NO BASIC computer on the market, now or ever, that's quite like the CX16. The 128 is much, much slower, and the Amiga and ST are not BASIC computers. 

The closest thing might be the MSX computer running one of the faster CPUs... but it's awkward and hard to use in emulation, and setting up and running it properly in MiSTer has proven to be a bit of a challenge. I've done so, but it's... complex. 

 

That was not the point ... and even there you already have an emulator. It is there is no need to run it on an FPGA. Simply cannot see any reason to do this. Either you want hardware - go with X16 - you do not want hardware - take the emu or any other available option.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please review our Terms of Use