MAME: Tube devices

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

MAME: Tube devices

Postby Pernod » Wed Jul 05, 2017 2:17 pm

I thought it was about time MAME supported some Tube devices and so far have the 6502 2nd Processor seemingly working well. The actual Tube implementation is heavily 'borrowed' from b_em so expect that to be all good.

I know we don't have a circuit diagram for the 65C102 co-pro but would've expected it to be very similar to the 6502. Simply replacing the ROMs in the 6502 with those from the 65C102 does look promising, but needs more testing. Are there any known notable differences I should be aware of? Am surprised that selecting Master Turbo in both b-em and jsbeeb shows them using the 6502 ROMs and not the correct 65C102.

So onto the Z80, can't even get it to show the Z80 startup banner yet. Questions to follow ...
Last edited by Pernod on Thu Jul 06, 2017 5:33 pm, edited 1 time in total.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Wed Jul 05, 2017 3:21 pm

Do any of the Tube devices use the HIRQ line? From the circuit diagrams it looks like it's never connected.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

dp11
Posts: 703
Joined: Sun Aug 12, 2012 8:47 pm

Re: MAME: Tube devices

Postby dp11 » Wed Jul 05, 2017 3:28 pm

Master internal 6502 copro is 4MHz external is 3MHz

None use HIRQ

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Thu Jul 06, 2017 5:37 pm

dp11 wrote:Master internal 6502 copro is 4MHz external is 3MHz

Yep, that's the main difference I failed to mention. What's the crystal on the 65C102 board, 12Mhz or 16Mhz?

The Z80 is now showing signs of life, but failing to load CPM. I suspect it's NMI related. I can intercept the NMI line and from the service manual it sounds like I should be paging in the ROM. Anything else I need to do?
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
hoglet
Posts: 6605
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: MAME: Tube devices

Postby hoglet » Thu Jul 06, 2017 5:43 pm

Pernod wrote:The Z80 is now showing signs of life, but failing to load CPM. I suspect it's NMI related. I can intercept the NMI line and from the service manual it sounds like I should be paging in the ROM. Anything else I need to do?

A simpler test for a Co Pro is to see if *SAVE and *LOAD work, for example:

Code: Select all

*SAVE TEST1 F000 +80
*DUMP TEST1
*LOAD TEST1 2000
*SAVE TEST2 2000 +80
*DUMP TEST2

This uses the test 128 bytes of the client ROM as test data.

Dave

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: MAME: Tube devices

Postby jgharston » Thu Jul 06, 2017 10:05 pm

Pernod wrote:I know we don't have a circuit diagram for the 65C102 co-pro but would've expected it to be very similar to the 6502. Simply replacing the ROMs in the 6502 with those from the 65C102 does look promising...

6502copro.gif is what I've got so far without desoldering components.

The only difference in the ROMs is the startup banner, *HELP message and OSWORD table entry for OSWORD 4. It is otherwise identical, see source code here.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Fri Jul 07, 2017 7:57 pm

jgharston wrote:The only difference in the ROMs is the startup banner, *HELP message and OSWORD table entry for OSWORD 4. It is otherwise identical, see source code here.

Thanks for clarification, and do we know whether it has the same crystal 12MHz with different divider, or 16Mhz crystal with same divider?

I now have the Z80 running nicely, and can run CP/M and Colossal Cave.

There seems to be two sets of Acorn CP/M around, but some have incorrect file extensions so is a little confusing.
- the set distributed with B-em have DSD extension but discs cpm2-7 should obviously be SSD. Not sure about cpm1, it matches Jon Welches DSD.
- the set at JGH mdfs.net discs cpm2-7 match those with B-em but with correct SSD extension. Am not sure about cpm1.ssd, I would expect side 2 directory at offset &32000 but it's not there.
- the set hosted by Jon Welch discs cpm2-7 are definitely DSD, and cpm1 matches that distributed with B-em.

So I see good cpm2-7 in both SSD and DSD formats but not sure about cpm1. The layout of both cpm1 differs from the other discs, can anyone enlighten me?

I'm also curious about the Opus Z80 Challenger, and what is required to run the image at http://mdfs.net/Mirror/Image/Challenger/DDCPM.ZIP? I've been unable to find any adverts for anything Z80 related from Opus.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: MAME: Tube devices

Postby jgharston » Sat Jul 08, 2017 12:57 am

Pernod wrote:- the set at JGH mdfs.net discs cpm2-7 match those with B-em but with correct SSD extension. Am not sure about cpm1.ssd, I would expect side 2 directory at offset &32000 but it's not there.
(...)
So I see good cpm2-7 in both SSD and DSD formats but not sure about cpm1. The layout of both cpm1 differs from the other discs, can anyone enlighten me?
I've checked the CPM disk images at mdfs.net/Mirror/Image/AcornCPM/. I checked 1, 2 and 3, and they are correct. I mounted the images in Z80Tube, BeebEm and CPMFiler and dumped the last files on the disk, and they are all there.

The main difference between CPM1 and the other disks is:
a) CPM1 is a boot disk, some/most of the others aren't so don't have any boot code
b) CPM1 is **FULL**, really really FULL, all CPM disk blocks from 00 to C3 are used. CPM disk block C3 occupies disk sectors 1:00:0+2, 1:00:4+2, 1:00:8+2 and 1:00:2+2. A DFS catalogue on side 2 occupies sectors 1:00:0+2, so if CPM block C3 is used any DFS catalogue that may or may not have been there will not be there as the contents of CPM block C3 will be there.

On the non-full CPM disks I made sure all the disk sectors after the final used block were filled with E5 to make them as compressible as possible when zipped up.

Pernod wrote:I'm also curious about the Opus Z80 Challenger, and what is required to run the image at http://mdfs.net/Mirror/Image/Challenger/DDCPM.ZIP?
A standard Acorn Z80 CoPro plus a double-density disk interface with a DFS where you can access double-density disks through OSWORD &7F.

An Opus CPM system disk has single density boot tracks with code that, once loaded, allows access to Opus CPM floppy disks, which have the data tracks formatted as double density. I had to put a workaround in DiskToImg to cope with imaging disks where the track density/length changed partway through the disk to be able to image these.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Sat Jul 08, 2017 5:28 pm

jgharston wrote:An Opus CPM system disk has single density boot tracks with code that, once loaded, allows access to Opus CPM floppy disks, which have the data tracks formatted as double density. I had to put a workaround in DiskToImg to cope with imaging disks where the track density/length changed partway through the disk to be able to image these.

This is proving to be a pain to support in MAME. What exactly is the geometry and encoding of this disc?
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: MAME: Tube devices

Postby jgharston » Sat Jul 08, 2017 7:49 pm

Pernod wrote:
jgharston wrote:An Opus CPM system disk has single density boot tracks with code that, once loaded, allows access to Opus CPM floppy disks, which have the data tracks formatted as double density. I had to put a workaround in DiskToImg to cope with imaging disks where the track density/length changed partway through the disk to be able to image these.

This is proving to be a pain to support in MAME. What exactly is the geometry and encoding of this disc?

Surface 0, track 0,1,2: 10x256bytes single density, numbered 0-9
Surface 0, track 3-79: 10x512bytes double density, numbered 0-9
Surface 1, track 0-79: 10x512bytes double dentity, numbered 0-9

When I image them with DiskToImg I create the image file as:

Code: Select all

    0x1x2x3x4x5x6x7x8x9x
    0x1x2x3x4x5x6x7x8x9x
    0x1x2x3x4x5x6x7x8x9x
    00112233445566778899
    00112233445566778899
    00112233445566778899
so the start of each sector is a fixed multiple into the image, with short sectors having padding after them to align with the start of the next sector.

I believe the DDCPM BIOS depends on an OSWORD &7F 'read sector IDs' call to determine if track 0:03 is single or double density to decide if a disk is SD 400K or DD 800K, see here. It also allowed access to the Challenger's RAMDISK as drive C: by doing an OSWORD &7F call to drive 4.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Sat Jul 08, 2017 8:10 pm

So are all discs with the 'Slogger ' header in this mixed format? Can I use 'Slogger ' to identify this?

As MAME only handles floppies as bitstreams I'll have to make this a special case. There are plenty of helpers to create bitstreams from uniform data images where all tracks have same sectors, encoding, etc. but this'll require a new format handler.

I like ssd/dsd images for standard DFS discs where it's easy to identify the geometry from the image size and location of DFS directory, but this is so arbitrary. Would help to have some form of track/sector headers in there.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Wed Aug 09, 2017 2:59 pm

Now have the Casper 68000 running Control 'C'
0129.png


I know the 68000 is running at 8MHz, but does anyone know which crystal is used on the board? The only photo I've seen is unclear, am expecting either 8 or 16MHz.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
kieranhj
Posts: 526
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK

Re: MAME: Tube devices

Postby kieranhj » Fri Aug 11, 2017 11:44 am

Pernod wrote:I thought it was about time MAME supported some Tube devices and so far have the 6502 2nd Processor seemingly working well. The actual Tube implementation is heavily 'borrowed' from b_em so expect that to be all good.

Just FYI I had problems with the 256 byte "fast transfer" Tube protocol implementation in b-em and jsbeeb (which is based on the b-em source.) See this thread: http://stardot.org.uk/forums/viewtopic.php?f=54&t=12425. I haven't had chance to debug it in b-em yet but did log a repro on the jsbeeb GitHub: https://github.com/mattgodbolt/jsbeeb/issues/142.

Note that Elite (the usual 2nd processor test case) doesn't use this protocol so is not affected.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

User avatar
eelco
Posts: 45
Joined: Thu Jul 30, 2015 6:43 am
Location: Netherlands
Contact:

Re: MAME: Tube devices

Postby eelco » Mon Aug 14, 2017 7:22 am

Pernod wrote:Now have the Casper 68000 running Control 'C'
0129.png

I know the 68000 is running at 8MHz, but does anyone know which crystal is used on the board? The only photo I've seen is unclear, am expecting either 8 or 16MHz.

Nice job! How did you do that? The Casper firmware I use on BeebEm doesn't load any OS. It is hardcoded to return an error message.
My Acorn related files are located at:
https://acorn.huininga.nl/

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Mon Aug 14, 2017 11:04 am

eelco wrote:Nice job! How did you do that? The Casper firmware I use on BeebEm doesn't load any OS. It is hardcoded to return an error message.

I thought you had the Casper running, but not the Cumana?

This was quite simple with the help of your notes at https://acorn.huininga.nl/pub/docs/circ ... ematic.jpg

I haven't yet looked at your BeebEm implementation but did you interleave the casper roms ic9/ic10, or maybe you didn't hook up an IRQ from the VIA's?

The memory map is:

Code: Select all

AM_RANGE(0x00000, 0x03fff) AM_ROM AM_REGION("casper_rom", 0)
AM_RANGE(0x10000, 0x1001f) AM_DEVREADWRITE8("via6522_1",via6522_device, read, write, 0xff)
AM_RANGE(0x20000, 0x3ffff) AM_RAM

and the two VIA's talk to each other as;

Code: Select all

MCFG_DEVICE_ADD("via6522_0", VIA6522, 2000000)
MCFG_VIA6522_WRITEPB_HANDLER(DEVWRITE8("via6522_1", via6522_device, write_pa))
MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE("via6522_1", via6522_device, write_cb1))
MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE("via6522_1", via6522_device, write_ca1))
MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE(DEVICE_SELF_OWNER, bbc_tube_slot_device, irq_w))

MCFG_DEVICE_ADD("via6522_1", VIA6522, 2000000)
MCFG_VIA6522_WRITEPB_HANDLER(DEVWRITE8("via6522_0", via6522_device, write_pa))
MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE("via6522_0", via6522_device, write_cb1))
MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE("via6522_0", via6522_device, write_ca1))
MCFG_VIA6522_IRQ_HANDLER(INPUTLINE("maincpu", M68K_IRQ_1))

And that's about all that was required to run in MAME.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
eelco
Posts: 45
Joined: Thu Jul 30, 2015 6:43 am
Location: Netherlands
Contact:

Re: MAME: Tube devices

Postby eelco » Mon Aug 14, 2017 1:29 pm

Pernod wrote:
eelco wrote:Nice job! How did you do that? The Casper firmware I use on BeebEm doesn't load any OS. It is hardcoded to return an error message.

I thought you had the Casper running, but not the Cumana?

Correct! I have the Casper running, but after I boot into the Casper co-pro, you basically get the following menu:

Code: Select all

CASPER 68000
BBC 68000 SECOND PROCESSOR
MONITOR V 2.2
COPYRIGHT (C) DELCOMM 1986
+

Now, according to the H(elp) command, you can boot an OS with the B command:

Code: Select all

B  Boot Operating System

But the ROM I'm using hasn't got any OS loader implemented.

How do you boot into Control 'C' ?
My Acorn related files are located at:
https://acorn.huininga.nl/

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Mon Aug 14, 2017 2:22 pm

Ah, I suspect we may need different ROMs that have the other OS installed.

I ran Control C from your floppy at https://acorn.huininga.nl/pub/disks/originals/Crombie%20Anderson%20Associates/68000%20Second%20Processor%20(Casper)/. Boot the floppy to start Casper then (E)xecute COMPILE
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Mon Aug 21, 2017 1:23 pm

jgharston wrote:Surface 0, track 0,1,2: 10x256bytes single density, numbered 0-9
Surface 0, track 3-79: 10x512bytes double density, numbered 0-9
Surface 1, track 0-79: 10x512bytes double dentity, numbered 0-9

When I image them with DiskToImg I create the image file as:

Code: Select all

    0x1x2x3x4x5x6x7x8x9x
    0x1x2x3x4x5x6x7x8x9x
    0x1x2x3x4x5x6x7x8x9x
    00112233445566778899
    00112233445566778899
    00112233445566778899
so the start of each sector is a fixed multiple into the image, with short sectors having padding after them to align with the start of the next sector.

Are you sure about the padding? The image is 811520 bytes which is:
3 * 2560 = 7680
77 * 5120 = 394240
80 * 5120 = 409600

I've implemented the format with no padding and can see the Challenger is trying to read track 3 but failing :(
0132.png

Haven't tested my Challenger emulation with DD before so need to do some debugging.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Tue Aug 22, 2017 1:16 am

Now have DDCPM running with DDOS 3.46/3.35, but still fails on the Challenger. Maybe the Challenger requires the elusive 2.00 ROM.
0143.png
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: MAME: Tube devices

Postby jgharston » Thu Aug 24, 2017 12:05 am

Pernod wrote:
jgharston wrote:When I image them with DiskToImg I create the image file as:

Code: Select all

    0x1x2x3x4x5x6x7x8x9x
    0x1x2x3x4x5x6x7x8x9x
    0x1x2x3x4x5x6x7x8x9x
    00112233445566778899
    00112233445566778899
    00112233445566778899
so the start of each sector is a fixed multiple into the image, with short sectors having padding after them to align with the start of the next sector.

Are you sure about the padding? The image is 811520 bytes which is:

I'll check, but I'm fairly certain that's how I implemented it. I've just turned the A5000 off before going to bed, so I'll check tomorrow. ;)

I could well have quoted the wrong paragraph from the documentation, or my test disks could well be different to your test disks:
If the higher density tracks are
exactly twice the size of the lower density tracks, then each low density
sector is padding with &FF bytes after it to the length of the high density
sectors, otherwise the end of the whole track is padded with &FF bytes.

For example, with a disk with some tracks formatted to 10x256 FM and some
tracks formatted to 16x256 MFM, the image will contain:

0123456789xxxxxx
0123456789xxxxxx
0123456789xxxxxx
0123456789ABCDEF
0123456789ABCDEF
0123456789ABCDEF

With a disk with some tracks formatted to 10x256 FM and some tracks
formatted to 10x512 MFM (as with Slogger DDCPM disks), the image will
contain:

0x1x2x3x4x5x6x7x8x9x
0x1x2x3x4x5x6x7x8x9x
0x1x2x3x4x5x6x7x8x9x
00112233445566778899
00112233445566778899
00112233445566778899

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Thu Aug 24, 2017 12:56 am

jgharston wrote:I could well have quoted the wrong paragraph from the documentation, or my test disks could well be different to your test disks:

The only disk I'm testing with is http://mdfs.net/Mirror/Image/Challenger/DDCPM.ZIP, are there others?
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: MAME: Tube devices

Postby jgharston » Mon Aug 28, 2017 1:17 pm

Pernod wrote:
jgharston wrote:I could well have quoted the wrong paragraph from the documentation, or my test disks could well be different to your test disks:

The only disk I'm testing with is http://mdfs.net/Mirror/Image/Challenger/DDCPM.ZIP, are there others?

I've had a quick look at that, and I think it's been imaged incorrectly. I'll dig out the originals and re-image it.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Mon Aug 28, 2017 3:59 pm

jgharston wrote:I've had a quick look at that, and I think it's been imaged incorrectly. I'll dig out the originals and re-image it.

That's unfortunate, this months MAME release on Wednesday will support this incorrect image. I'll update MAME when you have new images available.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

RobC
Posts: 1820
Joined: Sat Sep 01, 2007 9:41 pm

Re: MAME: Tube devices

Postby RobC » Mon Aug 28, 2017 8:40 pm

Pernod wrote:Now have the Casper 68000 running Control 'C'...
I know the 68000 is running at 8MHz, but does anyone know which crystal is used on the board? The only photo I've seen is unclear, am expecting either 8 or 16MHz.

Just checked my Casper board and the crystal is only 4MHz. The 68000 CPU on the board is rated at 8MHz but only runs at 4MHz (as lamented in Mike Cook's Micro User review)!

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Mon Aug 28, 2017 9:55 pm

RobC wrote:Just checked my Casper board and the crystal is only 4MHz. The 68000 CPU on the board is rated at 8MHz but only runs at 4MHz (as lamented in Mike Cook's Micro User review)!

Thanks, good to know. I'll get it corrected in MAME. Apart from the review in Micro User I can only find a single advert for this in Acorn User, can't imagine many being out there.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: MAME: Tube devices

Postby jgharston » Mon Aug 28, 2017 9:58 pm

Pernod wrote:
jgharston wrote:I've had a quick look at that, and I think it's been imaged incorrectly. I'll dig out the originals and re-image it.
That's unfortunate, this months MAME release on Wednesday will support this incorrect image. I'll update MAME when you have new images available.

Done: http://mdfs.net/Mirror/Image/Challenger/

What I realise had happend was I'd used the throw-together RdDDCPM program at that link to do an initial test image, and forgotten about that when writing the general-purpose DiskToImg at http://mdfs.net/Apps/DiskTools/ and forgotten to port the updated back into RdDDCPM.

With the correct image, every sector starts at (logical_sector_number)*512 bytes into the image, regardless of sector size. 256-byte sectors contain 256 bytes of data followed by padding, 512-byte sectors contain 512 bytes of data followed by no padding. So, the image access code can do something like: PTR#image=logical_sector*512:PROCread_one_sector(address, sectorsize) regardless of actual sector size.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Sun Sep 10, 2017 11:44 am

jgharston wrote:With the correct image, every sector starts at (logical_sector_number)*512 bytes into the image, regardless of sector size. 256-byte sectors contain 256 bytes of data followed by padding, 512-byte sectors contain 512 bytes of data followed by no padding. So, the image access code can do something like: PTR#image=logical_sector*512:PROCread_one_sector(address, sectorsize) regardless of actual sector size.

Thanks, I'll amend the loading code and get the old image removed from existence.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Sun Oct 01, 2017 11:23 am

So we've established that both the 80186 and 80286 boards use the same ROMs, though they can be patched to make more RAM available with the 80186 when 1MB is fitted.

I've been told elsewhere that the 80286 board has the same memory map as the 80186 and that the ROMs are mapped at 0xf0000. I'm not convinced of this and here's what I know:
- the 80186 board with 512MB has ROMs mapped at 0xc0000 and mirrored throughout the top 256K, startup shows 512K
- the 80186 board with 1MB has ROMs mapped at 0xc0000 and mirrored throughout the top 256K, startup shows 768K
- the 80186 board with 1MB and patched ROMs has ROMs mapped at 0xf0000 and mirrored throughout the top 64K, startup shows 896K or 960K depending on patch

For the 80286 board to use the same ROMs as the 80186 the ROMs must be mapped at 0xc0000, with the whole 1MB is mirrored throughout the whole 16MB address space. With this configuration my emulation does at least give the startup banner identifying the 80286.

The ROM disassemblies at http://mdfs.net/Software/Tube/80x86/ suggest the 80186 and 80286 are handled quite differently. Specifically in http://mdfs.net/Software/Tube/80x86/Client86.src we have:

Code: Select all

; After RESET has copied the ROM at F000:0000 into RAM at 0000:0000, continue executing here
; ==========================================================================================
ORG 0A00h
;
L0A00:
IN   AL,50h      ; This switches out ROM on 286

So does the ROM get switched out when IO port 50 is read to make the whole 1MB available?

I'm also seeing writes to IO port 60, any idea what this does?
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Sun Oct 01, 2017 6:36 pm

The boot ROM DOES get switched out to reveal the whole 1MB RAM available.
0000.png
0001.png

This is running in an ABC 310 configuration.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
Pernod
Posts: 997
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Tube devices

Postby Pernod » Tue Oct 10, 2017 5:46 pm

So I've now got the Torch Z80 Communicator running nicely, but does anyone have schematics for the other Torch boards, Atlas and Neptune (68000)?
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.


Return to “emulators”

Who is online

Users browsing this forum: No registered users and 1 guest