Originally Posted by Luigi30
Yeah, I don’t have bus arbitration yet but I have /DTACK and a couple other signals. The ‘320 and ‘120 are both capable of bus mastering under my vme.cpp. A card can assert a signal line which gets distributed to all attached cards on the backplane as a callback for them to override (or ignore if they don’t care).

Cool, I think the challenge with DTACK is how to suspend the CPU board until you'll get the DTACK in a good way, especially as the M68000 core didn't have DTACK support last time I checked at least, so emulate that by eating cycles. Also it is a good thing to put common stuff in the VME device and just parameterize it. Often DTACK has different timing for each device on a board so the DTACK value should really be property on the memory map but I am unsure if any VME boards had split DTACK values or just had one for its entire VME window.

The way I have it set up is using install_device to insert handlers into the VME A24 address space,

As long as it is possible to use either the maincpu address map or the VME bus device address map through the use_owner_spaces() I am good with that as it ensures simpler driver code for the SBC case, without a "physical" VME chassi, or just one slot, mainly supplying DC power and GND, I have done something similar but if you have wrapped your head around a good way to do it I can adapt.

then having a memory handler on each card to perform read/write operations to A24 when they call out to VME. I don’t have all the signal logic going yet for that but it works well enough to let 120bug interact with the 320 via its standard monitor commands and for the 120 to detect the 050 during boot. Being able to overlay memory regions and handlers is very helpful.

Sounds useful, will read up on that.

The 120 does fail its self test and I’m not sure why, it seems to be something with the 68000 core I haven’t worked out. I added a two-byte ROM hack to the driver to get it to pass where it locks up so I can at least get to a console.

Many MAME systems do have problems with self tests and it can be for various reasons but timing is a difficult one when not having proper DTACK support in the CPU core. ROM hacks are not ok to submit I believe unless you do it live, that is having a proper ROM and patch it during startup, many systems seems to do that.

Because I can