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 »

So I altered LD opcodes but not perfect.
I might get errors further in the game but I will try this first. C-flag is altered but other flags are now OK.

I can see that SOME OUTPUT gets to the screen so it is time to write the screenupdateroutine.
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 1,5 hours spent to find 1 opcode emulated the wrong way.
catmeows
Manic Miner
Posts: 718
Joined: Tue May 28, 2019 12:02 pm
Location: Prague

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

Post by catmeows »

You are doing interesting things Dr.Beep. I like reading about it
Proud owner of Didaktik M
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 »

Next bug is a wrong SP value.
User avatar
Quazar
Drutt
Posts: 31
Joined: Tue Jun 16, 2020 2:28 pm
Contact:

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

Post by Quazar »

Dr beep wrote: Thu Aug 24, 2023 7:48 pm Because I did some emulation on the SAM too and a portal can be made???
I am just a fan of seeing an 8-bit machine emulate another, especially when there is a different CPU to be emulated as the programming and ingenuity behind the emulation engines to get best speed is very complex coding. So I applaud the work being done.

While I am chiefly focused on the SAM, I do still have my ZX Spectrums here... my 48K from 1983, +2 from 1986 and Next Dev Board from 2017.
Dr beep wrote: Thu Aug 24, 2023 7:48 pm Simon Owen used my mainprogram in his emulator on the SAM
I see there is a thanks to you for the fast opcode decoding techniques in the credits for his VIC-20 emulator. I have been patching that emulator to allow it to support some games as earlier this year I released an interface to plug VIC-20 cartridges into the SAM and run with the emulator.
Quazar - Developing for the SAM Coupé for 30+ Years!
Hardware, Software, 'SAM Revival' magazine -> www.samcoupe.com
Plus hardware for the ZX Spectrum, RC2014 and other general retro peripherals.
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 opcode repaired and working but still my COPYRIGHT message is not set.
There still is a bug 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 »

Quazar wrote: Fri Aug 25, 2023 4:05 pm I see there is a thanks to you for the fast opcode decoding techniques in the credits for his VIC-20 emulator. I have been patching that emulator to allow it to support some games as earlier this year I released an interface to plug VIC-20 cartridges into the SAM and run with the emulator.
Yeah I know he did.
Same routine is used here once again.

BTW on the SAM this emulator could be a bit faster since the original addresses can be read/written and the processor
is offcourse faster.
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

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

Post by NEO SPECTRUMAN »

Dr beep wrote: Fri Aug 25, 2023 5:03 pm BTW on the SAM this emulator could be a bit faster
Dr beep can you release completely lost SAM2_GB and SAM2_ZX81?
Binaries/sources
For historical/preservation purposes :dance
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 »

NEO SPECTRUMAN wrote: Fri Aug 25, 2023 6:58 pm Dr beep can you release completely lost SAM2_GB and SAM2_ZX81?
Binaries/sources
For historical/preservation purposes :dance
no I can’t.

i don’t have the sources anymore.
it was on a computer that is long gone.
the source of the original ZX81EMUL for the ZX Spectrum is also only on paper printed in a map.
This I still have.
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 »

NEO SPECTRUMAN wrote: Fri Aug 25, 2023 6:58 pm Dr beep can you release completely lost SAM2_GB and SAM2_ZX81?
Binaries/sources
For historical/preservation purposes :dance
The source of my second ZX81 emulator, the one with hires on the ZX Spectrum, is also gone.
it was too slow so I never released it.
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 »

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 »

NEO SPECTRUMAN wrote: Fri Aug 25, 2023 6:58 pm Dr beep can you release completely lost SAM2_GB and SAM2_ZX81?
Binaries/sources
For historical/preservation purposes :dance
SAM2_Zx81 is available here.
https://www.worldofsam.org/index.php/pr ... sam2zx81hr
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

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

Post by NEO SPECTRUMAN »

Dr beep wrote: Fri Aug 25, 2023 9:22 pm I did find this:

https://web.archive.org/web/20160324044 ... am2_gb.htm
i know about this link

also
Image
but i can't find not scans nor pdfs of this magazine...
(Sam Revival magazine issue 19 Sept 2007)
https://www.worldofsam.org/products/sam ... l-issue-19


...so what about prebuild binaries?
Last edited by NEO SPECTRUMAN on Fri Aug 25, 2023 11:34 pm, edited 2 times in total.
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

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

Post by NEO SPECTRUMAN »

Dr beep wrote: Fri Aug 25, 2023 9:28 pm SAM2_Zx81 is available here.
https://www.worldofsam.org/index.php/pr ... sam2zx81hr
there is no binaries on this page in 2020 (also in 2022 to?)
only screenshot
also in 2020 it had be called SAM2_ZX81 without HR
https://web.archive.org/web/20221126123 ... s/sam2zx81

so is it has been finded recently?
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

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

Post by NEO SPECTRUMAN »

Dr beep wrote: Fri Aug 25, 2023 9:19 pm the one with hires on the ZX Spectrum, is also gone.
it was too slow so I never released it.
so what is this? :dance
https://spectrumcomputing.co.uk/entry/3 ... /SP-2-ZX81
https://spectrumcomputing.co.uk/entry/1 ... 1-Emulator
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 2020 and the 1997 emulator.
the 2006 emulator was coded to try hires for 25th anniversary, which was too slow on the Spectrum and then I tried the SAM2_zx81.

The source for the 1997 emulator I have in a map.
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 »

CLR A was emulated as LD A,0 but it also sets Z-flag so now it s XOR A

Other opcode was wrongly coded, some extra bytes without knowing where they came from.

COPYRIGHT message is printed, but still wrong text. Next step 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 »

I have the (C) message. Todays target reached.

Next a screen display by intrupt.


Image
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 »

Well there is a check for a number needed.... that is going wrong.
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 »

Dr beep wrote: Sat Aug 26, 2023 1:15 pm Well there is a check for a number needed.... that is going wrong.
It goes right, the MC10 alters the characterorder.
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 »

First attempt to let the emulator create a screen
Image
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 »

Small bug found and border set black.

This is how the screen will be,
Image
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 »

Oh... colour green might get bright too which is closer to the original.
ANDREWRYALS
Microbot
Posts: 106
Joined: Sat Mar 24, 2018 5:02 pm

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

Post by ANDREWRYALS »

Dr beep wrote: Sat Aug 05, 2023 9:06 pm I have the same feeling as I had in 1997 and 2000 when I coded my first ZX81 emulator and the VIdeopac emulator.

Same unknown outcome, knowing that speed will be an issue.
Either way, the best of luck, I know you'll code something amazing, you always do! ;)
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 speeding up some opcodes.
I can erase some bytes when I can keep B' a fixed value. Every tstate won in the emulation is important.
Post Reply