PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

I am working on a loadroutine.

I did a blockload of my SHOGUN-game and I was able to play my own game, although slower than on MC10.

After the load I will release the first version of the emulator with games to play.

Next version will get more translated ROM-routines and if you have found bugs I will try to fix them.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

A programfile on the MC10 has bytes that mimic headersound.
I can't load a game like on the ZX81 emulator.

I will make a 8K+ virtual tape memory and will then load from that virtual tape
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

I rearrangent the program so I now have 8K+ for a virtual tape, room for 8K RAM in the emulator
and still 8K free to translate the ROM.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

The MC10 uses blocks to load a program, there is no 1 block of code that loads a game like the ZX Spectrum does.
This also means that each file haas a lot of overhead and a 8K program can be over 10K in size.

This means that I will be short of memory when I make a virtual tape memoryblock.
I will make a convertertool like on SP-2-ZX81 and then make a loadoption with just 1 block to load.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

The convertertool is working, a loader must be added but I did a first load with a memorydump.

Next thing was a bug in the IF with a string comparing, so that is next to solve.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

The bug was in an opcode I thought was solved, but it needed a different test.

Now the loader and then a first release?????
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

Another bug found.

rotate on the MC10 also does a test on the result, a set of Z when result is 0.

The Z80 doesn't alter z-flag
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

A new bug appears but I know that some opcodes are not complete, so maybe do that first
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

Solved a bug but found out that a fix of a bug causes a new bug in a routine that worked due to NOT getting an altered value, so next bug to find.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

Previous bug again solved. Some weird behaviour that I could only find by stepping on a pc-emulator of the MC10.

Next bug is in the RND-routine.
Problem: when seed is different my emulator and pc-version will not run the same code.

I have managed to set the rnd-seeds to a default value so the code will be the same each run.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

So yesterday I found the RND bug and a game played well. Today I was working on release of v1.00 when I added a game and that game gave another error, so back to debugging before releasing v1.00
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

Version 1.00 has the debugger active which cost some speed. I translated the routine at F160 and the program
1FORF=0TO255:PRINTF;:NEXT is 14 sec faster already.
So next routines will speed up more.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

I already translated mutliple used routines, but the next is a large one but it will definitely add a lot of speed (expectation).
The "evaluate a an expression" is used in almost every command. So up to translating that routine.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

The evaluation routine uses some FP-routines I had not translated.
So first all FP-routines and now up to the evaluationroutine.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

Changes in the latest 2 version made a game crash, so back to earlier version, but latest change gave 20% speedup in the basic.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

I have decided to stop recoding the ROM and release the emulator as it is now.

I hope to have the emulator ready before end of the week.
zx_if1
Drutt
Posts: 48
Joined: Fri Jul 16, 2021 8:53 pm
Location: Peru
Contact:

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by zx_if1 »

hi dr. beep
How about a little suggestion?
adapt the emulator so that it can recognizes the ula+
If there is ula+ orange appears then
if not only dull yellow

Another little idea: will there be a Sam version in the future?
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

zx_if1 wrote: Mon Oct 30, 2023 4:29 am hi dr. beep
How about a little suggestion?
adapt the emulator so that it can recognizes the ula+
If there is ula+ orange appears then
if not only dull yellow
How do you recognize the ULA and can it be solved with a single attribute value?
That is how the colour is set.
Another little idea: will there be a Sam version in the future?
I am thinking of such, but my SAM knowledge is really rusty.
On a SAM the memory could be used as on the MC10 so all changes in memorylocation can be skipped and it will
get some extra speed, besides the Z80B processor.
User avatar
dust hill resident
Dizzy
Posts: 52
Joined: Sat Sep 23, 2023 6:05 pm
Location: London
Contact:

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by dust hill resident »

Hello,

This is a really cool project and I have a lot of respect for your work, thank you for sharing it and the development journey with us.

Also, thank you for bringing the TRS80 MC10 to my attention, I had never heard of it before, and I've just spent the past week or so reading about it and playing with it in emulation, it's a really nice and fun little computer.

- dhr
User avatar
kokkiklhs
Dizzy
Posts: 94
Joined: Mon Jul 02, 2018 8:18 am
Location: Athens, Greece

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by kokkiklhs »

Hi Dr beep, thank you again for this new brilliant piece of software of yours!
Astonishing achievement, superb coding skills!!!
You are always full of nice surprises!!!

Well, one question:
I have downloaded and tested the 1.12 version, plays nicely and the software included loads fine! But how about converting some more .c10 files? I have tried with the assorted utility for the speccy but I got confused, couldn't figure out how to use it properly...
Do we need to fill a specific RAM area with the data, using a Spectrum emulator and then save it to .tap? I am using Spectaculator, which lacks that feature!
Can you please explain the exact procedure?
TIA
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

Here is a video how the conversion works.

User avatar
kokkiklhs
Dizzy
Posts: 94
Joined: Mon Jul 02, 2018 8:18 am
Location: Athens, Greece

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by kokkiklhs »

Oh, thank you! That's exactly what I was suspecting, so I guess I'll quit Spectaculator and download ZXSpin instead! :)
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum

Post by Dr beep »

kokkiklhs wrote: Sun Jan 28, 2024 6:08 pm Oh, thank you! That's exactly what I was suspecting, so I guess I'll quit Spectaculator and download ZXSpin instead! :)
Or find out how Spectaculator works with tap-files.

I can do the same with other emulators. In my video how 48 KRAAK works I use Z80.
Post Reply