For what it's worth the game I'm porting to the CX16, Another World, is a 16-bit game. And yes it is quite difficult, as the original also used 32-bit data types. There is also a port of the Sierra AGI Game engine, which was also 16-bit.
SO it's not completely unrealistic to consider it might be possible... Obviously the 32-bit DOS is probably out of the question, but an earlier version of DOS could potentially be emulated.
It definitely wouldn't be easy. DOS has a more complicated memory structure and addressing method, which allows for up to 1mb of memory (the CX16 only has 512kb base version), so that would be very tricky to navigate (it's not "banked" like the CX16, it's segmented). Not to mention it would be very slow. Probably 10 times slower. All the instructions are 16-bit. Sound and IO would be very tricky too.
It would need someone who is an expert in 65c02 assembly, and 8086 assembly, and a deep understanding of both architectures.
Basically, yes it can be done, but without any incentive there's literally no reason to undertake such a massive project.
PC/MS DOS emulator?
Re: PC/MS DOS emulator?
I've wrestled with how to explain the X16 ...
I had to explain it to my wife this weekend. She didn't understand my excitement of something that is so far from the capabilities of a modern computer. The best analogy I could come up with, was a car buff could certainly drive a modern car with all the luxuries and conveniences possible, but to find yourself in a 67 Shelby Mustang isn't even comparable. It's like back when you had to drive the car for real, shifting gears, you could feel the hardware and you needed to understand how it worked. The same thing with 8bit computers. You have to know the hardware and how to squeeze every extra byte and clock cycle you can.
I had to explain it to my wife this weekend. She didn't understand my excitement of something that is so far from the capabilities of a modern computer. The best analogy I could come up with, was a car buff could certainly drive a modern car with all the luxuries and conveniences possible, but to find yourself in a 67 Shelby Mustang isn't even comparable. It's like back when you had to drive the car for real, shifting gears, you could feel the hardware and you needed to understand how it worked. The same thing with 8bit computers. You have to know the hardware and how to squeeze every extra byte and clock cycle you can.
Re: PC/MS DOS emulator?
I wish you all the luck with that!
For myself, (as my name suggests), DOS would be a cool thing to have on the X16. But I don't like emulation as a way to do it. It should be rewritten to be like the product, and support everything that was good about it (like the commands and tools). Not just emulated as a cheap way to get old games to run at a super slow framerate. X16 is not x86!
I can't see MS-DOS as a working system for the X16 at all. It already has BASIC and KERNAL. If any games for DOS needs to run on the X16, they should be ported or rewritten (like in the good old days of the C64). They would probably look better using VERA's capabilities, and sometimes, that is enough.
DOS might not be a good fit for X16 as an operating system, but I think Microsoft Windows would (mouse cursor and all!). I am seeing a future where I would program a functional Windows or OS/2 operating system, its Kernel, GDI and User API, because it would be useful and it is fun to do (doing the multitasking, memory management, and message system). But I am working on other things X16 right now that takes priority.
- desertfish
- Posts: 1123
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: PC/MS DOS emulator?
To clarify the Another World port isn't a dos program it's a full rewrite for the X16 natively
Re: PC/MS DOS emulator?
According to Wikipedia, the game was originally developed for the Amiga. So Motorola 68000 which is different from x86 and different from 65C02. Even if the DOS version is the inspiration for the X16 port, I wouldn't link Another World to DOS unless it is a superior port with special features.desertfish wrote: ↑Tue Jan 14, 2025 5:11 pm To clarify the Another World port isn't a dos program it's a full rewrite for the X16 natively
I have programmed for all CPUs I mentioned above, and I would say Motorola 68000 (big endian) assembler would have been a better source than x86 (little endian) assembler. But I have no knowledge about the actual game Another World.
Re: PC/MS DOS emulator?
And more to the point, the X16's graphics and sound are better than an early DOS computer, so starting from the Amiga would be smarter, anyway.doslogo wrote: ↑Tue Jan 14, 2025 7:39 pmAccording to Wikipedia, the game was originally developed for the Amiga. So Motorola 68000 which is different from x86 and different from 65C02. Even if the DOS version is the inspiration for the X16 port, I wouldn't link Another World to DOS unless it is a superior port with special features.desertfish wrote: ↑Tue Jan 14, 2025 5:11 pm To clarify the Another World port isn't a dos program it's a full rewrite for the X16 natively
I have programmed for all CPUs I mentioned above, and I would say Motorola 68000 (big endian) assembler would have been a better source than x86 (little endian) assembler. But I have no knowledge about the actual game Another World.
And all that is beside the fact that every time you port a game, you transform it further away from the original. So porting the DOS version makes less sense, if Amiga code is available.
- ahenry3068
- Posts: 1190
- Joined: Tue Apr 04, 2023 9:57 pm
Re: PC/MS DOS emulator?
I would have expected cosmicr to chime in but I've been watching this project with bated breath... . Another World did originally release on the Amiga but it's written kind to it's own Engine with a custom byte code running the game. What cosmicr is doing is reverse engineering that ENGINE mostly from scratch. I don't think he is really using any of the x86 code as more than a general guideline. The game byte code files are identical for all the early versions of the game.TomXP411 wrote: ↑Wed Jan 15, 2025 12:45 amAnd more to the point, the X16's graphics and sound are better than an early DOS computer, so starting from the Amiga would be smarter, anyway.doslogo wrote: ↑Tue Jan 14, 2025 7:39 pmAccording to Wikipedia, the game was originally developed for the Amiga. So Motorola 68000 which is different from x86 and different from 65C02. Even if the DOS version is the inspiration for the X16 port, I wouldn't link Another World to DOS unless it is a superior port with special features.desertfish wrote: ↑Tue Jan 14, 2025 5:11 pm To clarify the Another World port isn't a dos program it's a full rewrite for the X16 natively
I have programmed for all CPUs I mentioned above, and I would say Motorola 68000 (big endian) assembler would have been a better source than x86 (little endian) assembler. But I have no knowledge about the actual game Another World.
And all that is beside the fact that every time you port a game, you transform it further away from the original. So porting the DOS version makes less sense, if Amiga code is available.
Re: PC/MS DOS emulator?
Hey sorry for the late reply - yes I am writing Another World from scratch in 65c02 asm. I guess the point I was making was that given it's a 16-bit game that pushed the limits of the Amiga, then it's probably possible to port any 16-bit software (including DOS) to the CX16.
The original amiga version used a bytecode interpreter. So the source code is mostly the same for every platform (including the console versions) and each system's interpreter is where the differences are. Mine is mostly faithful to the Amiga version except for a slower framerate (unless I can optimise more) and digital sound doesn't have as much fidelity. The screen res (320x200) and colour depth are (almost) identical. I've looked at all the different ports, and actually have found the dos version to be the easiest to work with in terms of assets etc so that's what I will be recommending when I release the game. I'm gonna release source too when it's done. I've got the game about 80-90% working, just having a few major issues with graphics glitches, and will be re-writing the sound routines. I'm hoping to get it released in the first half of this year. I'm also writing a Sierra AGI interpreter in 100% assembly too - much more challenging!
The original amiga version used a bytecode interpreter. So the source code is mostly the same for every platform (including the console versions) and each system's interpreter is where the differences are. Mine is mostly faithful to the Amiga version except for a slower framerate (unless I can optimise more) and digital sound doesn't have as much fidelity. The screen res (320x200) and colour depth are (almost) identical. I've looked at all the different ports, and actually have found the dos version to be the easiest to work with in terms of assets etc so that's what I will be recommending when I release the game. I'm gonna release source too when it's done. I've got the game about 80-90% working, just having a few major issues with graphics glitches, and will be re-writing the sound routines. I'm hoping to get it released in the first half of this year. I'm also writing a Sierra AGI interpreter in 100% assembly too - much more challenging!
Re: PC/MS DOS emulator?
It's really not.cosmicr wrote: ↑Tue Jan 21, 2025 5:39 am Hey sorry for the late reply - yes I am writing Another World from scratch in 65c02 asm. I guess the point I was making was that given it's a 16-bit game that pushed the limits of the Amiga, then it's probably possible to port any 16-bit software (including DOS) to the CX16.
Yes, you could write a program that looks like DOS, but it would not be DOS.
Among other things, MS-DOS relies on peculiarities of the 8086 CPU that do not exist on the 65x family of processors. DOS's memory management, alone, would be impossible to implement on a 65x CPU without major structural changes. So what you'd have in the end is a command line interpreter that may look like DOS, but it would only be something that looks a little like DOS. All the stuff that makes DOS what it is on the inside would be completely different.
All that said - if you want to build a 65x command-line OS, then several of us have been discussing that idea on and off for a long time. We were even calling this hypothetical operating system "Monarch OS" (since the X16 logo is a butterfly.)
While we had visions if it being structured vaguely like CP/M or DOS, with a separate BIOS, OS, and Command Interpreter, we also had no intention of actually trying to make said OS compatible with anything that's come before (except, maybe at the system call level, to make it easier to port KERNAL compatible Commodore and Commander software.)
Re: PC/MS DOS emulator?
I mean, isn't that any port of any software?It's really not.
Yes, you could write a program that looks like DOS, but it would not be DOS.
I reckon it could be done. CP/M was ported to commodore 64. DOS is based on CP/M. Yes dos has a different memory addressing system (I already acknowledged that) and different disk management, and many many other things you'd have to work out, but with some compromise, it could be done. I'm not saying it would be easy, I'm just saying it could be possible. And no, I'm not saying MS-DOS 5.0 or anything like that, I'm saying the original MS-DOS - it's possible. It's possible to send a man to Mars too - just extremely difficult and unlikely.