ajbowen249 / dungeon-delver-engine

A Tandy Model 100 and ZX Spectrum implementation of OGL 5.1 in Assembly
4 stars 1 forks source link

Feasibility of ports to other retro computer platforms? (e.g. BBC Micro, ZX Spectrum, C64 etc) #19

Closed danj2k closed 2 months ago

danj2k commented 2 months ago

How feasible would it be for this project to be ported to other retro computers, such as the BBC Micro, ZX Spectrum or C64? The code is commented, but is there any additional documentation that would help people unfamiliar with the TRS-80 platform understand what the code is doing?

The other platforms I've mentioned have "roguelikes" (e.g. https://www.iconbar.com/articles/How_to_fit_a_roguelike_in_32k/index1132.html) but I don't think any of them have anything with updated DND 5e rules like this project.

ajbowen249 commented 2 months ago

In general, I don't see this specific project reaching beyond anything in the 80 CPU family, so that does, unfortunately, leave the C64 and BBC Micro behind. That said, there isn't actually a whole lot here that's specific to the Model 100. ~rom_api.asm is where the main Model 100-specific stuff lives. I do plan on eventually revisiting this to support other TRS-80 models, as, naïvely, I would just have to make a different version of that file (plus a little indirection layer, since the register args probably won't be the same), and compile with a different origin location.~ Update: The project has since been reorganized to begin support for additional platforms. More info on how the platform-specific code works is now here.

The ZX Spectrum could work out, but would take a little more work. It only supports 32 columns, but since it has more rows, I could rearrange the screens a little and still show everything.

~Edit: It also occurs to me that the character mappings currently held in constants.asm would need to be split out as well, and many of them won't have exact matches~ 🤔 Exact match doesn't matter, at least for the Spectrum, since I can write custom characters anyway.

ajbowen249 commented 2 months ago

Update: My curiosity has gotten the better of me, and a ZX Spectrum version is well under way 😅

It still has a long way to go, but the zx_spectrum branch has the progress so far and some reorganization to make it a little more clear how things all fit together. Still pretty messy at the moment; I'll update on this issue when it's cleaned up and merged to some extent.

For now, here's a preview 😎 dde_for_zx_spectrum

Update with some of the Tandy's custom characters ported over dde_for_zx_spectrum

Update 2 mol_for_zx_spectrum

danj2k commented 2 months ago

I'm glad I managed to pique your curiosity with the idea of porting to other platforms! Thank you for looking into this and even starting up a Spectrum port!

ajbowen249 commented 2 months ago

Alright, initial Spectrum support (which, in the process vastly clarifies requirements for porting to additional platforms) is complete as of #22! For anyone interested, you can find a spectrum .tap file for the test campaign in the latest release of DDE here, and a .tap for the BG3 Demake here!