MAMEWorld >> Programming
View all threads Index   Threaded Mode Threaded  

Pages: 1

SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


"Interfacing" the model1 comm board
#333324 - 10/17/14 12:30 AM


Hi again This may get a little off-topic and even more techie at some parts.

This is a "spin off" thread from this thread.



The idea is to build an interface for the model1 comm board to do some "blackbox" testing.

For the sake of simplicity, I choose the IBM PC's ISA-bus, as it features a lot of control logic that we need.

The basic idea is to use a (rather) small I/O area to access the model1 comm boards "host" port.



Logic - Ideas
The model1 comm board features an 21 bit address bus (A0 to A20) and 16 bit data bus (D0 to D15), there are several other control signals, as IOW-, IOR-, VINT-, EX1- and EXWAIT-.
And of course there is a 32M pin for the 32MHz OSC on the model1 cpu board.

I came up with a rather simple "glue" logic.


(please note - this image is neither correct nor complete )



Hardware

The model1 comm board features an 21 bit address bus (A0 to A20) and 16 bit data bus (D0 to D15).

These 21 address bits are grouped:
- A0 to A12
- A16 to A20

A1 to A11 are connected to the shared memory chips - nothing special about it.

A1, A12, (A0 or A16), (A17 or A18), A19, A20, EX1-, IOR- and IOW- are connected to IC6 - a PAL18 which serves as address decoder.

So the idea was to read out the PAL and check what it does... I don't get that JEDEC stuff, so I used a rather "hacky" approach - with breadboard and some wires



As it turns out - A16 to A19 need to be "low", A20 and EX1 need to be "high" - to select the comm board in any way.

The comm board is "mapped" in the model1 address space at 0xB00000 so we can guess which address bits would be used.

Code:

HEX     BIT
B00000 1011 0000 0000 0000 0000 0000
...
B01000 1011 0000 0001 0000 0000 0000
...

2222 1111 1111 1100 0000 0000
3210 9876 5432 1098 7654 3210
+ ---- x xxxx xxxx xxxx



That leads to this:


Code:

Read  @ B00000 = MEMR
Write @ B00000 = MEMW
...
Read @ B00FFF = MEMR
Write @ B00FFF = MEMW
Read @ B01000 = CNRD (Bit0)
Write @ B01000 = CNWR (Bit0)
Read @ B01002 = FGRD (Bit0 & Bit7 [ZFGWR])
Write @ B01002 = FGWR (Bit0)





Bridgeboard - ISA side
The bridgeboard is rather simple.

For the 32MHz signal I used a 32MHz OSC... quite simple huh?

I use a 74682 as "chip select" decoder for the ISA-bus.
P-Signal use A3 to A9 and AEN signals.
Q-Signal uses 7 Jumpers and GND.
If P equals Q we know our bridge is accessed - IOCS- goes "low".

I also use two 74138 as read- and write-address decoder.
ABC-Inputs are connected with A0 to A2.
G2A- is connected to CS-.
G2B- is connected to IOR- / IOW-.
I only use the Y0- and Y2- outputs - W0-/W2- and R0-/R2-.

As this is a 16 bit capable card, I need to pull down IOCS16-.
Also, if the comm boards memory is "busy", I need to pull down IOCHRDY.

For that, I use a 74125 and a 7432.
CS- is used to connect IOCS16- to GND.
(CS- or EXWAIT-) is used to connect IOCHRDY to GND.

This works because both signals CS- and EXWAIT- need are "active low", and the OR-gate output gets "low" only if both inputs are "low" too.

As for some other control signals.
The ISA-bus has a RESET signal, and the model1 comm board uses a RES- signal.
I simply invert the signal using an 7404.

To latch the address, I use two 74273.
W2- signal is used to "update" the latched address.
the outputs are connected to the comm boards address lines A0 to A15

As I don't have any VSYNC signal on the ISA bus I choose to use R2- as VINT- signal. More on this one later.

W0- is connected to the comm boards IOW- line.
R0- is connected to the comm boards IOR- line.

I planed to generate a valid EX1- signal like this:
W0- and R0- get inverted by the 7404, both signals are then fed to the 7432 - the ORed result is then inverted again (7404) and thus used as EX1-.

However, in the end I became lazy and simply connected EX1- to GND

The data lines are connected to both the 74273 inputs as well as the comm boards data lines D0 to D15.
At first I used two 74645 bus gates - however I removed them later as they are not needed.



At last... nothing blew up after plugin it in for the first time




Bridgeboard - model1 comm board side
The "other" side of the bridge is a simple (still messy) wire adapter.



It simply plugs into the comm board
(Phew... nothing blew up )





Software side
As for the PC side, the bridgeboard is located at IO 0x300 to 0x307:
Writes to 0x302 update the address latches (16 bit).
Reads from 0x302 trigger a VINT-. (theoretical - should be about 58hz?)
Reads/Writes to 0x300 are processed by the comm board.

So if I want to read data located at 0x0123 from the comm boards shared memory...
I write 0x0123 to 0x302 and then read from 0x300.

One thing I didn't actually pay attention to, is the endianess. My Intel CPU (as well as the comm boards Z80) use little-endian. However I don't know what the NEC V60 used on the model1 cpu board does.

I did some simple tests routines (in Visual Basic ^^) to check the bridgeboard.
I can access both CN (0x1000) and FG (0x1002) "registers" without problems.
My SRAM test (reads and writes from/to 0x0000 to 0x0FFF) indicates that this is working too - however the memory at 0x0000 always returns 0xFF.. which I suppose gets writen there by the comm boards Z80.

No further tests have been done yet.



I do all that stuff even without a Joystick
Soft-15kHz, cabMAME, For Amusement Only e.V.



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#333328 - 10/17/14 12:46 AM


(intentionally spam post)
The same bridgeboard ISA-wise should work with the model2 comm board too!


Code:


A B C
01 GND GND GND
02 GND GND GND
03 5V 5V 5V
04 5V 5V 5V
05 - - -
06 - - -
07 DOP - 32M
08 D0 D1 D2
09 D3 D4 D5
10 D6 D7 D8
11 D9 D10 D11
12 D12 D13 D14
13 D15 - -
14 - A1 A2
15 A3 A4 A5
16 A6 A7 A8
17 A9 A10 A11
18 A12 A13 A14
19 A15 A16 A17
20 A18 A19 A20
21 - - -
22 HOE- - -
23 LWE- - -
24 UWE- - -
25 - EX1- -
26 - - -
27 - - -
28 VINT- RES- -
29 5V 5V 5V
30 5V 5V 5V
31 GND GND GND
32 GND GND GND




I do all that stuff even without a Joystick
Soft-15kHz, cabMAME, For Amusement Only e.V.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9711
Loc: ECV-197 The Orville
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#333381 - 10/17/14 05:32 PM


Thanks for the separate post. This is definitely super-cool, and I'm glad it's showing signs of working already (Maybe pull the Z80 and see if location 0 still gets overwritten?)



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: R. Belmont]
#333389 - 10/17/14 07:40 PM


> Thanks for the separate post. This is definitely super-cool, and I'm glad it's
> showing signs of working already (Maybe pull the Z80 and see if location 0 still gets
> overwritten?)

I actually had the same idea
Guess I have to build another interface (for a seconds comm board)...

Figured out, the first two bytes are overwriten by the Z80.

It seems to work as that the 0x0101 I write to 0x0000 (master, "begin connect") gets instantly replaced by a 0x0105 (master, "linking phase").
but it won't change after that... maybe the real boards cannot link to themselves

And I figured out my brand new china cheapo logic analyzer does NOT support 5V I/O... bah... (sniffing the Z80)



I do all that stuff even without a Joystick
Soft-15kHz, cabMAME, For Amusement Only e.V.



any
Lead on, adventurer. Your quest awaits!
Reged: 03/21/06
Posts: 23
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#333418 - 10/18/14 03:33 AM


> It seems to work as that the 0x0101 I write to 0x0000 (master, "begin connect") gets
> instantly replaced by a 0x0105 (master, "linking phase").
> but it won't change after that... maybe the real boards cannot link to themselves

If you want to link only one game (setting it in master mode), you will need a "loopback" cable.



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: any]
#333465 - 10/19/14 12:06 AM


> If you want to link only one game (setting it in master mode), you will need a
> "loopback" cable.

got a cable loopback attached.

figured out the problem is actually my VINT- IRQ (too short)



I do all that stuff even without a Joystick
Soft-15kHz, cabMAME, For Amusement Only e.V.



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#333477 - 10/19/14 05:09 AM


> got a cable loopback attached.
>
> figured out the problem is actually my VINT- IRQ (too short)

so I modified my model1-connector and added a jumper to select VINT- src.

The "IOR-" signal of the ISA-bus actually is too short for the Z80 to recognize.
I used the A15 line to "control" the VINT- line. every 17ms I write 'address && 0x7FFF' follow by a write 'address || 0x8000'.

these are long enough for the z80 (yeah), but as it turns out, to "slow" to keep the connection alive. (i can see the TOSLINK turning on and off with each irq)

As for now I'll try to find other (reliable) signals - most likely the VGAs (negative!) VSYNC.

*EDIT*
just tried the VGA VSYNC and it seems to work well enough.

*EDIT2*
Consider it "working". 8MHz Host-Clock (32M / 4), 2MHz Serial-Clock (8/4)

Shared Memory "setup" with EPR-15112 (Model1 - Virtua Racing / WingWar)
0x000 to 0x00F - status area
0x010 to 0x1D3 - local tx area
0x1D4 to 0x397 - rx area (node 1)
0x398 to 0x55B - rx area (node 2)
0x55C to 0x71F - rx area (node 3)
0x720 to 0x8E3 - rx area (node 4)
0x8E4 to 0xAA7 - rx area (node 5)
0xAA8 to 0xC6B - rx area (node 6)
0xC6C to 0xE2F - rx area (node 7)
0xE30 to 0xFF3 - rx area (node
0xFF4 to 0xFFF - unused

this means 452 bytes "per node", up to 8 nodes.
(relay mode does NOT count a node).

Edited by SailorSat (10/19/14 03:39 PM)



I do all that stuff even without a Joystick
Soft-15kHz, cabMAME, For Amusement Only e.V.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9711
Loc: ECV-197 The Orville
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#333770 - 10/24/14 07:37 PM


> Shared Memory "setup" with EPR-15112 (Model1 - Virtua Racing / WingWar)
> 0x000 to 0x00F - status area
> 0x010 to 0x1D3 - local tx area

Nice progress!



uman
MAME Fan
Reged: 04/15/12
Posts: 455
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#333894 - 10/28/14 12:48 PM


Auch wenn ich keinen blassen schimmer habe, was genau du da machst... I believe in you... Du rockst die Hütte fett .



Naoki
Reged: 11/10/09
Posts: 1998
Loc: United Kingdom
Send PM


Re: "Interfacing" the model1 comm board new [Re: uman]
#333897 - 10/28/14 01:39 PM


> Auch wenn ich keinen blassen schimmer habe, was genau du da machst... I believe in
> you... Du rockst die Hütte fett .

"Even though I haven't got the faintest idea of what exactly you're doing, I believe in you. You rock this fat hut(?)"

In future, please use English even if it's Google translate. We could understand bad English better than most other languages!



----
On a quest for Digital 573 and Dancing Stage EuroMix 2

By gods I've found it!



uman
MAME Fan
Reged: 04/15/12
Posts: 455
Send PM


Re: "Interfacing" the model1 comm board new [Re: Naoki]
#333899 - 10/28/14 02:07 PM



> In future, please use English even if it's Google translate. We could understand bad
> English better than most other languages!

As he is somehow nearly a neighbour, I just wanted to say him hello and that I respect his work for the whole RetroScene. He is a awesome person and helped me out even with the strangest questions I had.

I dont want to spam this thread, with pointless comments. Please lets get back to topic. I just wanted to shout approval to him... nothing more.

Now to the "We could understand bad English better than most other languages!"... maybe thats true, but i often get no nice comments to it , even on this forum... to all the grammar-nazis outthere... F U



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: uman]
#333909 - 10/28/14 05:46 PM


> > In future, please use English even if it's Google translate. We could understand
> bad
> > English better than most other languages!
>
> As he is somehow nearly a neighbour, I just wanted to say him hello and that I
> respect his work for the whole RetroScene. He is a awesome person and helped me out
> even with the strangest questions I had.
>
> I dont want to spam this thread, with pointless comments. Please lets get back to
> topic. I just wanted to shout approval to him... nothing more.
>
> Now to the "We could understand bad English better than most other languages!"...
> maybe thats true, but i often get no nice comments to it , even on this forum... to
> all the grammar-nazis outthere... F U

Das mit den Personalpronomen üben wir aber noch einmal Andernfalls müsste ich mich persönlich angegriffen fühlen

Back to topic...
Next step will be either an "alternate" Interface to the comm board (Arduino maybe?) or a model2 version ^^

Can't wait to link up MAME/M2EM to a real virtua racing/daytona



I do all that stuff even without a Joystick
Soft-15kHz, cabMAME, For Amusement Only e.V.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9711
Loc: ECV-197 The Orville
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#333963 - 10/29/14 06:34 PM


> Can't wait to link up MAME/M2EM to a real virtua racing/daytona

Linking MAME with a real Virtua Racing would be epic. Please do that



coltonmameworld
MAME Fan
Reged: 12/31/14
Posts: 3
Send PM


Re: "Interfacing" the model1 comm board new [Re: R. Belmont]
#335551 - 12/31/14 01:13 AM


I agree. Let's do this thang!



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: coltonmameworld]
#340111 - 05/17/15 07:00 PM


> I agree. Let's do this thang!

ISA-2-SEGA Adapter (rev 1)


SEGA-2-MODEL1 Adapter (rev 1)


Running both the "proto" and the "rev 1" side by side.


---

Watching the serial stream on the scope... don't understand a thing though xD


---

Finaly... both boards tested AND linked up to each other


Need to come up with some serious testing scenarios now



I do all that stuff even without a Joystick
Soft-15kHz, cabMAME, For Amusement Only e.V.



gregf
Ramtek's Trivia promoter
Reged: 09/21/03
Posts: 8588
Loc: southern CA, US
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#341226 - 06/08/15 02:31 AM



--
Merge pull request #205 from SailorSat/masterModel1 Communication Board [Ariane Fugmann]
- add emulator options required for comm boards
- add the model 1 communication board as a device
- add an optional simulation for the model 1 communication (enabled atm.)
- allows to play Virtua Racing, Virtua Formula and WingWar in "link mode".

--

Good work. I am guessing some users will eventually be posting similar screen snaps that were displayed in the old thread from a few years earlier.


It now reminds me about the Japanese language region version of Power Drift Communication / Link version still needing work to get player link system up and runnning.



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: gregf]
#341236 - 06/08/15 10:38 AM


> Good work. I am guessing some users will eventually be posting similar screen snaps
> that were displayed in the old thread from a few years earlier.
>
>
> It now reminds me about the Japanese language region version of Power Drift
> Communication / Link version still needing work to get player link system up and
> runnning.

Still have to finish some stuff on the m1comm though. Virtua Racing and WingWar used the "older" 15112 ROMs - Virtua Formula used newer ROMs.
I have some "issues" with Virtua Formula, like the V.F. flashing only on the first machine (and no blinkin insert coins etc.) that may be related.
Gonna fit my comm boards with the newer roms someday.

System32/Multi32/Model2 and others need some love too.
Rad Rally, F1 Super Lap, OutRunners, Daytona .)
Most of them should be rather simple, as the basic framework is there now, and at least Model2/2A/2B are working in M2EM to some degree.

The all feature the same setup - Z80 CPU, some dual-port/shared memory, 2 PALs (internal/external address decoder) and some serial DLC (older boards used Fujitsu DLCs, newer ones used NEC DLCs)
The main difference seems to be the size and arrangement of the shared memory.


Y-Board - PowerDrift Link


System32 - F1 Super Lap

-no picture yet-
Multi32 - OutRunners


Model1 - WingWar (water boarded)


Model2(O) - Daytona USA


Model2B - Indy 500

As ElSemi seems to be out of reach for the time being, maybe "the one that shall not be mentioned here" can share parts of the m2em source (if there is an actual emulation happening)...

Real deal here is to get the ROMs and PALs dumped and those comm boards.

And there are those "direct link" games too. F1 Exhaust Note, GP Rider, Air Rescue... Someone needs to come up with a smart solution - I used shared file on the harddisk, which did work for attract mode, but not gameplay itself.

But first... gonna build a Model2 plug for my ISA-2-SEGA
Have some Daytona USA and Sega Rally Boardsets here to toy with

I only hope they did not change the pinout of CN1 from Model2 to Model2A .)



gregf
Ramtek's Trivia promoter
Reged: 09/21/03
Posts: 8588
Loc: southern CA, US
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#341390 - 06/12/15 07:25 PM



>> It now reminds me about the Japanese language region version of Power Drift
>> Communication / Link version still needing work to get player link system up and
>> runnning.


>Still have to finish some stuff on the m1comm though. Virtua Racing and WingWar used >the "older" 15112 ROMs - Virtua Formula used newer ROMs.
>I have some "issues" with Virtua Formula, like the V.F. flashing only on the first
>machine (and no blinkin insert coins etc.) that may be related.
>Gonna fit my comm boards with the newer roms someday.

>System32/Multi32/Model2 and others need some love too.
>Rad Rally, F1 Super Lap, OutRunners, Daytona .)
>Most of them should be rather simple, as the basic framework is there now, and at least >Model2/2A/2B are working in M2EM to some degree.

I didn't know there was still a sizeable to-do list remaining, but I can see why the
Power Drift Communication / Link version will have to wait for some time. Look forward to reading any future progress regarding the various 'games linking work' project.



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: gregf]
#341604 - 06/18/15 11:34 AM


> I didn't know there was still a sizeable to-do list remaining, but I can see why the
>
> Power Drift Communication / Link version will have to wait for some time. Look
> forward to reading any future progress regarding the various 'games linking work'
> project.

consider f1 super lap working to some degree. turns out the s32 comm boards work differently for each game

and still waiting for my outrunners pcb stuck in the mail "somewhere")



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#341609 - 06/18/15 01:19 PM


> > I didn't know there was still a sizeable to-do list remaining, but I can see why
> the
> >
> > Power Drift Communication / Link version will have to wait for some time. Look
> > forward to reading any future progress regarding the various 'games linking work'
> > project.
>
> consider f1 super lap working to some degree. turns out the s32 comm boards work
> differently for each game
>
> and still waiting for my outrunners pcb stuck in the mail "somewhere")


I'll try a 4p link once I get home from work.

F1 Super Lap works almost the same way as Virtua Racing

*EDIT*


Edited by SailorSat (06/18/15 08:10 PM)



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#341634 - 06/19/15 12:09 AM







SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#341637 - 06/19/15 02:10 AM






Edited by SailorSat (06/19/15 02:13 AM)



SailorSat
MAME Fan
Reged: 03/04/07
Posts: 169
Loc: Germany
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#341713 - 06/21/15 09:48 PM


OutRunners - same setup as a model1, but half the shared memory



gregf
Ramtek's Trivia promoter
Reged: 09/21/03
Posts: 8588
Loc: southern CA, US
Send PM


Re: "Interfacing" the model1 comm board new [Re: SailorSat]
#341718 - 06/22/15 03:27 AM


Very good work there regarding the cabs linking capability for the various Sega games.


Pages: 1

MAMEWorld >> Programming
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 5 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 7855