PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
A video of the startup.
Still a lot of checks and the BASIC will be translated to Z80.
Next read keyboard for input
Still a lot of checks and the BASIC will be translated to Z80.
Next read keyboard for input
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
ok ok...
that's amazing!
hi dr. beep
I can't wait to see it finished to try it and write something about it as I did before
with the SP2ZX81 or the VIC20 emulator too and publish it in EL Trastero!
that's amazing!
hi dr. beep
I can't wait to see it finished to try it and write something about it as I did before
with the SP2ZX81 or the VIC20 emulator too and publish it in EL Trastero!
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
Having troubles to get keyboardinput working.
I think a key has reset before I read it again.
I think a key has reset before I read it again.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
4 opcodes still had an error, now first keyboard input is read, althogh the translating is still off.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
Unlike the ZX Spectrum or the ZX81 you need to read the keyboard after setting a register with a port value.
I had keyboard reading at the intrupt but when the intrupt occurs after reading keyboardresult the key is read wrong.
I need to add a check when writing to memory is done to zeropage address 2 to activate keyboardscan.
I had keyboard reading at the intrupt but when the intrupt occurs after reading keyboardresult the key is read wrong.
I need to add a check when writing to memory is done to zeropage address 2 to activate keyboardscan.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
The line check routine alters the SP so I needed to add a DI somewhere and a EI also to keep stack unchanged while
checking the line. I did a dirty trick that seems to work.
My emulation of PUSHING and PULLING a single register was not right emulated.
Next thing is a check on registervalues when register are STORED in memory.
I already added a check when LOADING, but storing also checks on values.
The processor is really different from a Z80.
checking the line. I did a dirty trick that seems to work.
My emulation of PUSHING and PULLING a single register was not right emulated.
Next thing is a check on registervalues when register are STORED in memory.
I already added a check when LOADING, but storing also checks on values.
The processor is really different from a Z80.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
the MC10 uses a same trick with the SP as is done in rainbowgames, however….
The Z80 does dec sp and then writes a value where the mc10 first writes and then does a dec sp.
this goes wrong when input is checked with the SP-trick.
i tried a solution but in the end thought that an alteration in the SP will work.
I still need to test it…
The Z80 does dec sp and then writes a value where the mc10 first writes and then does a dec sp.
this goes wrong when input is checked with the SP-trick.
i tried a solution but in the end thought that an alteration in the SP will work.
I still need to test it…
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
Yesterday I had the idea for the SP-fix.
15 minutes after I had the idea I was passed on the highway by a german car with licenseplate SP-I 1111
This confirmed my idea, why? I needed to adjust the Stackpointer, SP on the Z80, the car came from SPeyer.
Same letters
My game SHOGUN uses a capital i as the number 1 for the value 1 for the shogun (Z=2 btw).
The I indicated a "1".
I needed to adjust the SP with 1.
And then 4x the confirmation that 1 is the right value.
So I altered the SP a bit and now the emulator makes a few more steps.
15 minutes after I had the idea I was passed on the highway by a german car with licenseplate SP-I 1111
This confirmed my idea, why? I needed to adjust the Stackpointer, SP on the Z80, the car came from SPeyer.
Same letters
My game SHOGUN uses a capital i as the number 1 for the value 1 for the shogun (Z=2 btw).
The I indicated a "1".
I needed to adjust the SP with 1.
And then 4x the confirmation that 1 is the right value.
So I altered the SP a bit and now the emulator makes a few more steps.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
The emulator executed it first command CLS gave a clearscreen.
I still have other bugs to solve.
I still have other bugs to solve.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
I had the idle hope that loading and storing registers would not need the carry-flag status.
I already needed to add a test on the zeroflag, but the carry flag is also needed to keep.
Since the test of zero/not zeo effects the carryflag I needed to split an opcode in 2 steps.
Test if carry is set and set again after zerotest or inly do zerotest.
Extra check will slow down the emulation
I already needed to add a test on the zeroflag, but the carry flag is also needed to keep.
Since the test of zero/not zeo effects the carryflag I needed to split an opcode in 2 steps.
Test if carry is set and set again after zerotest or inly do zerotest.
Extra check will slow down the emulation
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
I have a simple test
I enter this program
1CLS
and then LIST the program.
First I did not even get a list, now I get linenumber and wrong code.
Step by step getting it running
I enter this program
1CLS
and then LIST the program.
First I did not even get a list, now I get linenumber and wrong code.
Step by step getting it running
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
XOR, OR and AND do NOT reset C!
Again change in the code
Again change in the code
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
The TRS80 MC10 has an overflow flag which the Z80 has not.
I need to emulate that flag. In the ROM it is used on 3 places so I will only change the 3 opcodes before the flag is tested.
This is not perfect but it will be noted in the known issues. If a game would not work the test of the overflow flag is done.
I need to emulate that flag. In the ROM it is used on 3 places so I will only change the 3 opcodes before the flag is tested.
This is not perfect but it will be noted in the known issues. If a game would not work the test of the overflow flag is done.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
I think Z80 has overfow flag and both 6800 and Z80 V flags behave in same way, indicating overflow of signed values.
I'm suspecting you are using alternate F to track 6800 flags, are you?
I'm suspecting you are using alternate F to track 6800 flags, are you?
Proud owner of Didaktik M
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
A full day trying to find the next bug.
Some opcodes used a PUSH / POP but the program used the stack to scan input so the emulation corrupted the input.
Some opcodes used a PUSH / POP but the program used the stack to scan input so the emulation corrupted the input.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
I can help here. I tried to send a PM, but it sits in Outbox instead of sending - maybe your inbox is full?
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.
Hardware, Software, 'SAM Revival' magazine -> www.samcoupe.com
Plus hardware for the ZX Spectrum, RC2014 and other general retro peripherals.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
Inbox has 5% but I hadn't read it yet.
BTW the mc10 emulator will also run on a SAM
BTW the mc10 emulator will also run on a SAM
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
Yesterday evening I wanted to continue when my “0”-key of the laptop didn’t work anymore.
i managed to repair it although the bounce up is now less working.
I might fix that later
i managed to repair it although the bounce up is now less working.
I might fix that later
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
Another opcode fixed, but there are still other bugs……
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
Next opcode repaired, BPL
Debugging goes slow but steady.
Debugging goes slow but steady.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
I skipped a test on a register assuming 0 would be an irrelevant values. It turns out the ROM does a test on zero.
Re: PROJECT : A TRS80 MC10 emulator on the ZX Spectrum
Some opcodes do a test on zero and other allways set carry.
Again an opcode repaired.
Again an opcode repaired.