Bit Magic - The [Very Unofficial] X16 Emulator
View File
Bit Magic: The X16 Emulator!
This is a very unfinished X16 Emulator I have been working on for a few months. Be warned, this is not a replacement for the official emulator, or the excellent Box 16.
The Story So Far:
When working with assembler I often got frustrated with the lack of features that the macro assemblers offered. When I found that `cl65` didn't support text index lookups that was it, I decided to make my own. The macro assembler I came up with uses C# as the 'macro language' and so has no limitations. As someone in Discord once said, Its the macro assembler turned up to 11.
I used this -- Bit Magic the Macro Assembler! -- to write /index.php?/files/file/230-x4096/" rel="">X4096 and during that process two things really became apparent; firstly that even with the excellent debugging tools in the official emulator and Box 16, having the compiler and the emulator working together would give a much nicer development solution, and secondly that the 'by line' Vera emulation isn't close enough to real hardware when the application you're writing is changing things line by line.
So obviously the only real answer was to write my own emulator! (Plus this is my first x64 assembler project, which has been a great learning experience!)
What Is This?
It is currently not a fully fledged emulator of the whole X16 system. It currently only emulates the CPU, the graphical side of Vera, and the VIA but not whats connected to it. It does try to emulate the timing of the Vera display system including the 'sprite budget', and its specifically this which could be of interest.
It includes its own compiler (but not the macro side yet) so you can run a `.bmasm` file.
What Does It Not Do?
There is no IO. So no keyboard, mouse, or file system access!
There is no sound, either Vera's PSGs or PCM -- and so no PCM interrupts. Nor is there any YM chip support.
There is no debugging, nor frame rate lock.
Boot property.
Sounds Crap!
Yep, its more of a curio right now.
I will try to update it every week or so, with the short term focus on looking at the timings and adding tests for the sprites implementation.
One thing that might be of interest is that because it has a C# wrapper, it can be used in Unit Tests. In fact there are 1600 tests for the emulator already. One of my aims is to pack it up and have it available via Nuget so the emulator could be incorporated into other applications or projects.
Further down the line I'd love to add DAP support, so we could write and debug applications in VSCode, much like Vice. This is a long way off though!!
Source?
Yep! All the source is here. Its currently GPL3.
OS Support?
Only windows currently -- sorry. The core uses x64 asm, so it will only ever work on a x64 based machine. As the core's dll doesn't contain any Windows specific code, in theory it should run on Linux or OSX x64 based machines, but as I have neither I cannot check. Maybe in the future?
How to Actually Use It?
Blimey, you've read this far, so you probably want to know how to actually do anything with it!
Firstly you'll need a R41+ rom.bin file from the official emulator. Copy that into the folder or use the `--rom` parameter to specify its location.
As you cannot type, you'll need to specify a `.prg` to run, and the entry point (the default is $810). This is the location where the CPU will be set to run at start up, as such the ROM's power on vector will not be called!!
You could also provide a `.bmasm` file to compile, whose entry point should be $810 anyway.
And that's it, all you can do then is sit and watch.
Thanks!
Submitter
Yazwho
Submitted
01/02/23
Category
Productivity Apps
New productivity upload: Bit Magic - The [Very Unofficial] X16 Emulator
Bit Magic - The [Very Unofficial] X16 Emulator
- Attachments
-
- Bit Magic - The [Very Unofficial] X16 Emulator
- Screenshot_1.png (10.06 KiB) Viewed 5535 times
-
- BitMagic-X16E-1.zip
- Bit Magic - The [Very Unofficial] X16 Emulator
- (3.2 MiB) Downloaded 366 times
Re: New productivity upload: Bit Magic - The [Very Unofficial] X16 Emulator
Version 2
Display is no longer off by one line.
A sprite's H and V flip flags are now correctly honored.
Display is no longer off by one line.
A sprite's H and V flip flags are now correctly honored.
- Attachments
-
- BitMagic-X16E-2.zip
- (3.2 MiB) Downloaded 377 times