Simulating the MECB

User avatar
epaell
Posts: 159
Joined: Mon Jan 08, 2024 10:06 pm
Location: Sydney

Re: Simulating the MECB

Post by epaell »

That's cool - I've never seen an LCD being emulated before!
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: Simulating the MECB

Post by djrm »

If you search the mame sources.for hd44780 you will see example codes. D
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: Simulating the MECB

Post by djrm »

The MAME simulation is getting better, I have the hardware configured and serial console working. I've called it Angel6809 after the angel hair wiring on the back of the board.

The Forth system is not running yet. The code is from dumps of the old roms, one was a bit dodgy to read, there could be an error. Similarly the monitor code has been read, disassembled, and rebuilt.

The plan is to eventually enhance the system by updating the monitor to be smon with hardware single stepping. and I have a new working Forth implementation ready to go if I cant get this one going. I'll change the 6551 code with a workaround for the chip bug.

A picture of the monitor running and some notes here:
https://github.com/DavidJRichards/Angel ... /README.md

Not being an avid games player I've never used MAME in earnest before but learning how to do all this as I play along.
Best regards, David.
User avatar
epaell
Posts: 159
Joined: Mon Jan 08, 2024 10:06 pm
Location: Sydney

Re: Simulating the MECB

Post by epaell »

That's great progress David!

BTW, I finally fixed my compilation woes on the new laptop (problem was between chair and keyboard - sigh; I forgot to do a "make clean" before compiling and so it had left-over binaries from the old system). At least I am back and running again.
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: Simulating the MECB

Post by djrm »

Hi Emil,
A couple of points ...

First, I notice your mecb6809 emulation doesn't have NMI enabled for the PTM6840 device, I think it can be changed from IRQ to NMI using this alteration on line 79 of mecb6809.cpp

Code: Select all

//	m_ptm->irq_callback().set_inputline("maincpu", M6809_IRQ_LINE);
	m_ptm->irq_callback().set_inputline("maincpu", INPUT_LINE_NMI);
The other thing is that I tried some Assist09 commands today without full success, the single stepping with the '.' command did not work, the code ran to completion without a break. Also the 'S' stack command returned with '?'

I tried running the stock Assis09 2k rom from Digicoolthings github but it dint run properly at all on main mecb6809 for some reason. perhaps terminal related.

Can you shed any light on these problems please?
Best regards, David.
User avatar
epaell
Posts: 159
Joined: Mon Jan 08, 2024 10:06 pm
Location: Sydney

Re: Simulating the MECB

Post by epaell »

I'd have to admit that I didn't really look at the tracing part of it as I assumed that it would be easier to use the MAME functionality for debugging rather than the ASSIST09 functionality (plus I'm not that familiar with the tracing commands). I don't think there is anything different with respect to my implementation of ASSIST09 compared to the MECB one. The default MECB card is set up to have the I/O at $E000 whereas I changed this to $C000 to allow the addition of basic and the disassembler - so you'd either have to change the mapping of the I/O in the MAME code for mecb6809 or recompile ASSIST09 with the following lines updated to reflect the I/O address expected by MAME:

Code: Select all

ACIA    EQU     $E008           ; DEFAULT ACIA ADDRESS
PTM     EQU     $E000           ; DEFAULT PTM ADDRESS
User avatar
epaell
Posts: 159
Joined: Mon Jan 08, 2024 10:06 pm
Location: Sydney

Re: Simulating the MECB

Post by epaell »

Ah wait a minute, I just looked at the ASSIST09 monitor I used (which is a modified version by Jeff Tranter) and noticed the following:

Code: Select all

;       FCB     4
;       FCC     /S/             ; 'STLEVEL' COMMAND - NOT SUPPORTED IN THIS VERSION
;       FDB     CSTLEV-*
;       FCB     4
;       FCC     /T/             ; 'TRACE' COMMAND - NOT SUPPORTED IN THIS VERSION
;       FDB     CTRACE-*
But there is an additional command table that has:

Code: Select all

CMDTB2  FCB     4               ; TABLE ENTRY LENGTH
        FCC     'U'             ; 'UNASSEMBLE' COMMAND
        FDB     CUNAS-*         ; POINTER TO COMMAND (RELATIVE TO HERE)
        FCB     4               ; TABLE ENTRY LENGTH
        FCC     'T'             ; 'TRACE' COMMAND
        FDB     TRACE-*         ; POINTER TO COMMAND (RELATIVE TO HERE)
        FCB     -2              ; -2 INDICATES END OF TABLE
Again, I haven't actually tried tracing so I'm not sure how it works but it looks like the "S" command is no longer supported.
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: Simulating the MECB

Post by djrm »

Thanks, I'll try rebuilding maim with updated I/o addresses so I can try the stock assist09 again. Having a working single step feature is quite desirable. I hope to try porting the timer to the 6522 eventually. D
User avatar
epaell
Posts: 159
Joined: Mon Jan 08, 2024 10:06 pm
Location: Sydney

Re: Simulating the MECB

Post by epaell »

Did you know you can single step in MAME as well (with full disassembly and register information ... and memory monitors)?
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: Simulating the MECB

Post by djrm »

Yes, and I've been using those features, but I'm trying to build something I can eventually transfer to run on a hardware platform. Also, I'm hoping to buy a set of mecb boards in the coming months so the mame work is an introduction to having them as well as my old system.
Best regards, David.
Post Reply