MAME: Acorn System

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

MAME: Acorn System

Post by Pernod » Fri May 18, 2018 10:40 am

As there are no other System emulators out there I thought it was time MAME supported them. The System 3 with 6809 CPU has been in MAME for many years so I've added the 6502 and 6502A CPU boards for the System 3, 4, and 5. The System 2 is not working as the COS ROM is MIA.

Support for the following boards is included:
- 32K Dynamic RAM Board
- 16K Dynamic RAM Board (half populated 32K board)
- 8K Static RAM Board
- Cassette Interface Board
- Econet Board
- Floppy Disc Controller Board
- 40 Column VDU Board
- 80x25 VDU Board
- Versatile Interface Board

System 5 running New BASIC from floppy:
0000.png
Each Acorn Bus slot is configurable:
asys5_slots.JPG
Last edited by Pernod on Fri Jun 22, 2018 12:12 pm, edited 1 time in total.
- Nigel

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

User avatar
oss003
Posts: 2750
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: MAME: Acorn System

Post by oss003 » Fri May 18, 2018 12:37 pm

Nice job Nigel....

What does the econet emulation do, can you connect emulators through internet?

Greetings
Kees

Prime
Posts: 2499
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: MAME: Acorn System

Post by Prime » Fri May 18, 2018 1:37 pm

Excellent, I'll have to give you details of the 1770 based floppy BIOS that I have developed for it then maybe that can be added as well.

Cheers.

Phill.

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

Re: MAME: Acorn System

Post by Pernod » Fri May 18, 2018 3:28 pm

oss003 wrote:What does the econet emulation do, can you connect emulators through internet?
Not very useful, just connects to an emulated Fileserver like the BBC machines do. Never used or understood econet so it's never worked afaik, may be a MC6854 emulation issue or just needs a clock.
Prime wrote:Excellent, I'll have to give you details of the 1770 based floppy BIOS that I have developed for it then maybe that can be added as well.
Sure, if it's intended for use with actual hardware then I'll add it.
- Nigel

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

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

Re: MAME: Acorn System

Post by Pernod » Tue Jun 19, 2018 1:43 pm

Does anyone have a working System 3/5 machine? I need to clarify some behaviour.

In Acorn DOS without a disc in the drive and I press RETURN the machine will wait for the floppy READY line to be asserted, loops indefinitely. Is this expected? With a disc in the drive it will respond with 'Command?' which makes sense.
I guess Acorn DOS is useless without a disc in drive so is probably valid behaviour, but would like confirmation.

Similarly at power up does the Acorn DOS prompt appear without a disc in drive?
- Nigel

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

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

Re: MAME: Acorn System

Post by jgharston » Tue Jun 19, 2018 4:28 pm

Pernod wrote:
Tue Jun 19, 2018 1:43 pm
Similarly at power up does the Acorn DOS prompt appear without a disc in drive?
Checking the code I believe it does. On Reset if no key is pressed it goes to the DOS prompt. If SPACE is pressed the disk in drive 0 is examined for the boot option and a BOOT file.
Pernod wrote:
Fri May 18, 2018 10:40 am
The System 2 is not working as the COS ROM is MIA.
Will this do?
Last edited by jgharston on Tue Jun 19, 2018 4:29 pm, edited 1 time in total.

Code: Select all

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

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

Re: MAME: Acorn System

Post by Pernod » Tue Jun 19, 2018 5:06 pm

jgharston wrote:
Tue Jun 19, 2018 4:28 pm
Checking the code I believe it does. On Reset if no key is pressed it goes to the DOS prompt. If SPACE is pressed the disk in drive 0 is examined for the boot option and a BOOT file.
I'll take a closer look at your source. If I place &FF in the keyboard buffer at reset then I get the prompt, otherwise it tries to BOOT. Maybe my keyboard is inverted.
jgharston wrote:
Tue Jun 19, 2018 4:28 pm
Pernod wrote:
Fri May 18, 2018 10:40 am
The System 2 is not working as the COS ROM is MIA.
Will this do?
Thanks, I'd since found this and do use it. It'll do for now until a known good dump is found. Where did the source come from that allowed you to build this?
- Nigel

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

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

Re: MAME: Acorn System

Post by Pernod » Tue Jun 19, 2018 7:04 pm

From your disassembly:

Code: Select all

BIT &0E21:BVS LFF6D      :\ If key>='@' or no key pressed, skip past boot
LDX #&04                 :\ Normally SPACE-BREAK to boot
Does this mean that if no key is pressed then &0E21 is &FF?
- Nigel

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

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

Re: MAME: Acorn System

Post by jgharston » Tue Jun 19, 2018 7:30 pm

Pernod wrote:
Tue Jun 19, 2018 7:04 pm
From your disassembly:

Code: Select all

BIT &0E21:BVS LFF6D      :\ If key>='@' or no key pressed, skip past boot
LDX #&04                 :\ Normally SPACE-BREAK to boot
Does this mean that if no key is pressed then &0E21 is &FF?
Near enough. Documentation says: if bit 7 is set no key is pressed. If bit 7 is clear it is the keypress. That code depends on the hardware implementation giving %11xxxxxx for no keypress. If all implementations do give &FF for no keypress, that would be useful as it would allow code to be extended to allow additional keys (eg functions, cursors, etc) returning &80+x.

Code: Select all

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

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

Re: MAME: Acorn System

Post by Pernod » Tue Jun 19, 2018 8:34 pm

The keyboard implementations slightly differ between the System 3 and 5.
The System 3 uses the 6502 board with keyboard connected to PA of the 6522. PA0-PA6 are ASCII of key presses and PA7 is STROBE indicating when pressed/released.
The System 5 uses the 6502A board with keyboard again connected to PA of the 6522. PA0-PA6 are ASCII of key presses, but STROBE is on CA1 (though maybe LK10 puts the STROBE on PA7 too).

The above explains bit 7 but BVS is checking bit 6 which is set if key>='@', how can this also detect no key pressed?

I can believe at startup the keyboard returns &FF on PA to produce the prompt, but there's nothing in the keyboard circuit to reset this even on BREAK, though any key >='@' and BREAK will return to prompt.

Am hoping someone with an actual machine can chime in here to confirm things. Are the machines at CCH operational?
Last edited by Pernod on Tue Jun 19, 2018 9:01 pm, edited 1 time in total.
- Nigel

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

IanB
Posts: 179
Joined: Sun Sep 04, 2011 7:28 pm
Contact:

Re: MAME: Acorn System

Post by IanB » Tue Jun 19, 2018 9:01 pm

Pernod wrote:
Tue Jun 19, 2018 1:43 pm
Does anyone have a working System 3/5 machine? I need to clarify some behaviour.
I have a System 5
Pernod wrote:
Tue Jun 19, 2018 1:43 pm
In Acorn DOS without a disc in the drive and I press RETURN the machine will wait for the floppy READY line to be asserted, loops indefinitely. Is this expected? With a disc in the drive it will respond with 'Command?' which makes sense.
I guess Acorn DOS is useless without a disc in drive so is probably valid behaviour, but would like confirmation.
Yes it loops indefinitely.
Pernod wrote:
Tue Jun 19, 2018 1:43 pm
Similarly at power up does the Acorn DOS prompt appear without a disc in drive?
Yes you get the DOS prompt on power up unless you are holding down the space bar to auto boot in which case it loops indefinitely with just the cursor on the screen.

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

Re: MAME: Acorn System

Post by Pernod » Tue Jun 19, 2018 9:17 pm

IanB wrote:
Tue Jun 19, 2018 9:01 pm
I have a System 5
Excellent, and thanks for the clarifications. What about on pressing BREAK? If pressing BREAK straight after startup at prompt I'd expect to get the prompt again, but if any other input before BREAK then tries to boot?

Do you have any floppies worth imaging for it, maybe an official Acorn utilities or anything else?
Last edited by Pernod on Tue Jun 19, 2018 9:18 pm, edited 1 time in total.
- Nigel

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

IanB
Posts: 179
Joined: Sun Sep 04, 2011 7:28 pm
Contact:

Re: MAME: Acorn System

Post by IanB » Tue Jun 19, 2018 9:58 pm

Pernod wrote:
Tue Jun 19, 2018 9:17 pm
Excellent, and thanks for the clarifications. What about on pressing BREAK? If pressing BREAK straight after startup at prompt I'd expect to get the prompt again, but if any other input before BREAK then tries to boot?
It depends on the key,
e.g. pressing and releasing 1,2 or 3 then BREAK tries to boot but pressing and releasing Q, W or E then BREAK gets back to the prompt.
Pernod wrote:
Tue Jun 19, 2018 9:17 pm
Do you have any floppies worth imaging for it, maybe an official Acorn utilities or anything else?
The only thing I have for it is the Level II file server which I posted here some time ago:
viewtopic.php?f=3&t=11606&p=145594#p145594
(Also includes a machine code monitor which I converted from the UK101 and a couple of versions of System BBC Basic from JGH's site)

Back in the 80s, I wrote a shim for the Acorn DOS ROM which translated BBC OS calls into their Acorn DOS equivalents so it could run standard BBC language ROMs and I probably still have that somewhere but it's not really that useful anymore as the official System version of BBC Basic turned up some years ago.

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

Re: MAME: Acorn System

Post by Pernod » Wed Jun 20, 2018 10:58 am

IanB wrote:
Tue Jun 19, 2018 9:58 pm
It depends on the key,
e.g. pressing and releasing 1,2 or 3 then BREAK tries to boot but pressing and releasing Q, W or E then BREAK gets back to the prompt.
Of course, depending on key>='@'.
IanB wrote:
Tue Jun 19, 2018 9:58 pm
The only thing I have for it is the Level II file server which I posted here some time ago:
viewtopic.php?f=3&t=11606&p=145594#p145594
(Also includes a machine code monitor which I converted from the UK101 and a couple of versions of System BBC Basic from JGH's site)
Do you have a clean image of this for the archive, without the additional SMON and SBASIC?

Your photo in the link above looks like you're running your System 5 with a 40 column card, but the ROM in your download is the usual 80 column version :?
0000.png
Last edited by Pernod on Wed Jun 20, 2018 11:01 am, edited 1 time in total.
- Nigel

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

IanB
Posts: 179
Joined: Sun Sep 04, 2011 7:28 pm
Contact:

Re: MAME: Acorn System

Post by IanB » Wed Jun 20, 2018 3:59 pm

Pernod wrote:
Wed Jun 20, 2018 10:58 am
Do you have a clean image of this for the archive, without the additional SMON and SBASIC?
Sorry, no. It was sent to me just as a file on a BBC floppy with other unrelated BBC stuff.
I don't have any of the System DOS utils but Prime posted re-creations of them fairly recently:
viewtopic.php?f=44&t=14829

I also don't have any of the Econet utils for the System but you can use BBC file server utils to create blank file server discs.

There is another earlier version of the System file server and system/atom utils on JGH's site:
http://mdfs.net/Apps/Networking/FServers/
Direct link: http://mdfs.net/Apps/Networking/FServers/Lv2SYS.zip

This appears to be for version 2 protocol Econet, not version 3 as used on BBCs and RISCOS so is probably not compatibe with them (I guess maybe only 16 bit addresses and no bridges?). The floppy seems to also have version 2 Econet ROMs for Atoms and Systems (The file server and system ROM image I posted were version 3 protocols)
Pernod wrote:
Wed Jun 20, 2018 10:58 am
Your photo in the link above looks like you're running your System 5 with a 40 column card, but the ROM in your download is the usual 80 column version
I modified the 80 column card to make it 40/80 switchable, patched Acorn DOS to work in 40 column mode and added a switch on the 6502 card to switch between the two versions. I didn't post the 40 column ROM as it would only work with my hardware mod.
Last edited by IanB on Wed Jun 20, 2018 4:31 pm, edited 3 times in total.

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

Re: MAME: Acorn System

Post by jgharston » Wed Jun 20, 2018 8:27 pm

Pernod wrote:
Tue Jun 19, 2018 8:34 pm
The above explains bit 7 but BVS is checking bit 6 which is set if key>='@', how can this also detect no key pressed?
Because:
if no key is pressed, &E21 returns &FF which is %11111111, so bit 6=1, so BVS is followed.
if a key >='@' is pressed, &E21 returns &40-&7F which is %01xxxxxx, so bit 6=1, so BVS is followed
so, that test results in BVS not being followed if (key is pressed)AND(key<&40) - ie a number or punctuation key. Documentation says to use the SPACE key.

Edit: I've got some System disk images, but I can't remember where they are at the moment, and probably being in a directory called "System" isn't going to help. ;) I'll set a file search going....
Last edited by jgharston on Wed Jun 20, 2018 8:32 pm, edited 1 time in total.

Code: Select all

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

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

Re: MAME: Acorn System

Post by jgharston » Wed Jun 20, 2018 10:38 pm

jgharston wrote:
Wed Jun 20, 2018 8:27 pm
Edit: I've got some System disk images, but I can't remember where they are at the moment, and probably being in a directory called "System" isn't going to help. ;) I'll set a file search going....
I've got a few more somewhere, but I've started tidying them to here.

Code: Select all

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

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

Re: MAME: Acorn System

Post by Pernod » Thu Jun 21, 2018 1:01 pm

jgharston wrote:
Wed Jun 20, 2018 10:38 pm
I've got a few more somewhere, but I've started tidying them to here.
Thanks, had already found those.

Attached a utilities disc which contains some BASIC programs. It probably came from somewhere on the forum and claims to be for System 3. They appear to be for the 40 column card, but don't seem to run too well.
Can someone test SPACEIN on actual hardware?
0000.png
On the subject of the 40 column VDU card, which 6845 variant does it use? I'm assuming HD6845 but schematic suggests MC6845.
Attachments
DOS1.zip
(20.71 KiB) Downloaded 8 times
- Nigel

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

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

Re: MAME: Acorn System

Post by Pernod » Wed Jul 04, 2018 6:46 pm

There are a few different versions of the System Econet ROM out there:
- System/3 Econet 1.48
- Econet 2.40
- Econet 3.40
- Econet 3.50

The 2/3 versions are mapped at &E000, where would these be inserted in a System 3? I'd assume in an 8K Static RAM board IC17 with the ROM region links set to &E000-&FFFF, but wouldn't this conflict with Acorn DOS on the CPU card?

The System/3 Econet 1.48 ROM runs at &A000, and looks for the MC6854 at &B400-&B403 which is where the Atom Econet board is mapped. It's also read/writes to &800B-&8015. Any ideas on what configuration this was intended for?
- Nigel

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

Post Reply