Matchbox sized 6502 / Z80 / 6809 Co Pro

discussion of games, software, hardware & emulators relating to the Acorn Atom and Acorn System machines.
Post Reply
User avatar
hoglet
Posts: 8927
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Tue Dec 02, 2014 8:43 am

Patched the BCC to BCS in the memory test.

I think we're getting closer....
IMG_0754.JPG
LIST is for some reason is not adding Newlines.

Escape handling needs to be added.

And it's still all a bit fragile, but great fun!

Dave

User avatar
sirmorris
Posts: 776
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by sirmorris » Tue Dec 02, 2014 8:15 pm

=D> =D> =D>

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Wed Dec 03, 2014 5:34 am

hoglet wrote:I think we're getting closer....
LIST is for some reason is not adding Newlines.
Fixed. Something was zeroing WIDTH before actually checking it to decide if a NewLine was needed.
hoglet wrote:Escape handling needs to be added.
Done!

Today's updates to EXBAS09:
* Escape in input and background checked for
* Host error vector claimed
* *commands passed to Host
* WIDTH not erroneously zeroed, so newlines output when needed
* 6809 Tube Client also updated, I discovered I'd vectored errors through NMIV instead of SWIV!

Looks like EXBAS09 should be sufficiently functionable to be used to do some real testing. I'm just looking at adding LOAD and SAVE and that should be it.

Image

Code: Select all

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

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Wed Dec 03, 2014 8:41 am

JGH,

Great stuff!!! I'll test this evening.

One thing I did notice yesterday is that the initialization is as be messed up.

The symptom is that tracing is on after a cold boot, where as it should be off.

I tracked this down to the following code:

Code: Select all

807f : 8e80de                     LDX  #LA10D         ; POINT X TO ROM SOURCE DATA
8082 : ce0076                     LDU  #LPTCFW        ; POINT U TO RAM DESTINATION (WAS #CMPMID)
8085 : c612                       LDB  #18            ; MOVE 18 BYTES (WAS 28)
8087 : bd813e                     JSR  LA59A          ; MOVE 18 BYTES FROM ROM TO RAM
If you look at the destination block, you see some commenting out has occurred:

Code: Select all

                        ;	LFD update: Code moved in ROM
                        ;zGETNCH    INC  <CHARAD+1    ;   *PV INCREMENT LS BYTE OF INPUT POINTER
                                  ;BNE  zGETCCH       ;   *PV BRANCH IF NOT ZERO (NO CARRY)
                                  ;INC  <CHARAD       ;  *PV INCREMENT MS BYTE OF INPUT POINTER
                        ;zGETCCH    FCB  $B6          ;   *PV OP CODE OF LDA EXTENDED
007c =                  CHARAD:   RMB  2              ; *PV THESE 2 BYTES CONTAIN ADDRESS OF THE CURRENT
                        *         *    CHARACTER WHICH THE BASIC INTERPRETER IS
                        *         *    PROCESSING
                         ;         JMP  BROMHK        ;  JUMP BACK INTO THE BASIC RUM
Which means that the subsequent locations are being overwritten with junk, rather than ending up at zero.

One consequence of this is setting of the TRACE flag (to B6 iirc)

I have no idea whether there are any worse consequences.

Dave

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Wed Dec 03, 2014 10:51 am

hoglet wrote:One thing I did notice yesterday is that the initialization is as be messed up.
Yes, I think "LFD" moved some code and memory locations around resulting in it trampling on a few things. Now I can do *commands from within EXBAS09 I can *mdump various bits of memory to see what's happening.

Some more test code shows the Client code is working. It picked up a couple of errors in the 6809 BIOS entries. Need to think of some FileCalls tests. Also, try and make some Flex or OS/9 boot disks and work out a CBIOS. ;)

Image

Code: Select all

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

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Thu Dec 04, 2014 7:17 pm

The current versions of Client09.bin and EXBAS09 seem to be pretty stable.

The only issue is that the Escape key will interrupt the programs if it is waiting in an INPUT statement, but not otherwise.

EXBAS09 is derived from Co Co Basic. I'd like to try running something a bit more ambitious. Can anyone point me to a nice text-only Co Co Basic Adventure Game?

Dave
Last edited by hoglet on Thu Dec 04, 2014 8:16 pm, edited 1 time in total.

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by oss003 » Thu Dec 04, 2014 8:14 pm

Hi Dave,

maybe Phill has some Dragon software to run.
IIRC he also got OS9 working on the Dragon.

Greetings
Kees

User avatar
danielj
Posts: 7846
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by danielj » Thu Dec 04, 2014 8:18 pm

Yup :) Phill is a source of 6809 goodness... I've been watching this with lots of =D> Does anyone have the Acorn release of FLEX? I know they pushed it out for the System 3.

User avatar
flynnjs
Posts: 831
Joined: Tue Jul 06, 2010 9:33 pm
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by flynnjs » Thu Dec 04, 2014 11:35 pm

Any chance of pushing the latest to GitHub please, Dave?

I'd like to merge my changes into your latest code and the send
back to you.

Jason

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Fri Dec 05, 2014 1:17 am

hoglet wrote:The only issue is that the Escape key will interrupt the programs if it is waiting in an INPUT statement, but not otherwise.
Does Ctrl-C work? It should be polling Escape. The test used in INPUT and direct mode is the same as during program execution. I'll put the kettle on...
Edit: Fixed it! CHKESCAPE needed to return with the Carry flag set.

The latest upload has fixed the workspace initialisation program, plus I've tweeked it around a bit to realign most of the addresses with the original CoCo Basic. It seems to be stable enough to be used to write programs for testing. I've also added a way of passing and returning register values from the CALL command. POKE 161,65:CALL &HFFEE ;)
hoglet wrote:EXBAS09 is derived from Co Co Basic. I'd like to try running something a bit more ambitious. Can anyone point me to a nice text-only Co Co Basic Adventure Game?
Couldn't find an adventure game, but I've uploaded a lunar position calculator. Do *EXEC LUNAR then RUN.

Code: Select all

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

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Fri Dec 05, 2014 8:38 am

Hi Jason,
flynnjs wrote:Any chance of pushing the latest to GitHub please, Dave?

I'd like to merge my changes into your latest code and the send
back to you.
I've just pushed the latest code to github. The changes only affected the 6809 co processor.

Dave

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Fri Dec 05, 2014 8:45 am

JGH,

Great stuff =D> =D> =D>
jgharston wrote:Edit: Fixed it! CHKESCAPE needed to return with the Carry flag set.
This is now working perfectly, and I can Escape from any Basic program.
jgharston wrote: Couldn't find an adventure game, but I've uploaded a lunar position calculator. Do *EXEC LUNAR then RUN.
Just given this a go (with the latest EXBAS09) and hit a syntax error on line 4055:

Code: Select all

4055 Y=INT(A):M=INT(100*(A-Y)):D=100*(100*(A-Y)-M)
The statement it doesn't like is:

Code: Select all

M=INT(100*(A-Y))
I don't see anything wrong with the expression. Removing the 100* gets past the syntax errors. Extra brackets do not help.

Were you able to run this in your emulator?

Dave

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Sat Dec 06, 2014 10:01 am

JHG,
hoglet wrote:The statement it doesn't like is:

Code: Select all

M=INT(100*(A-Y))
I've narrowed this down a bit now.

It looks like the multiply operator is broken, as this returns a syntax error:

Code: Select all

PRINT 5*2
The following all work:

Code: Select all

PRINT 5+2
PRINT 5-2
PRINT 5/2
Is it possible in adding support for * Commands you have broken multiply?

Edit: I just tested an earlier version (from 1st December) before you added support for * Commands, and multiply does work in that version. So this is definitely a regression.

Edit 2: Patching two bytes, so the _ is used instead of * for * Commands and I've got a bit further with Lunar. Next problem is PRINT# seems is generating a syntax error. But maybe that is unsupported in this version of Basic.

Dave

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Sat Dec 06, 2014 7:09 pm

Back on the Z80 Co Pro this afternoon.

I found a nice archive of CPM disks here:
http://www.autometer.de/unix4fun/z80pack/

I thought I would have a go at converting one of these to run on the Acorn Z80 Co Processor. I chose the one with Infocom's Planetfall and Hitchhikers Guide to the Galaxy text adventures:
http://www.autometer.de/unix4fun/z80pac ... nfocom.tgz

Converting the disk image involved the following steps:
- Using Ubuntu's cpmcp to extract the files from the CPM disk image
- Patching the .com files to remove some ANSI control codes
- Using Ubuntu's cpmcp to copy the files to an Acorn CPM disk image
- Running a little java program to convert the Acorn CPM disk image to .dsd file

I can supply more details if anyone else needs to do this.

Here they both are running on the FPGA co-processor:
IMG_0755.JPG
IMG_0756.JPG
Here's the resulting .dsd image.
infocom.zip
(234.74 KiB) Downloaded 64 times
This should work either in BeebEm or on real hardware, and the disk is a bootable CPM disk.

If there are any other CPM images people want converting in this way, just let me know. It would be easy to automate doing a whole batch.

Dave
Last edited by hoglet on Wed Mar 04, 2015 7:11 am, edited 1 time in total.

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Sun Dec 07, 2014 3:52 am

hoglet wrote:The statement it doesn't like is:

Code: Select all

M=INT(100*(A-Y))
It looks like the multiply operator is broken, as this returns a syntax error:
I was trying to stop it tokenising *commands (for instance to stop *LOAD being converted to *$9C), but that ended up with it not tokenising anything after a '*', and '*' is actually supposed to be tokenised! Anyway, I've removed that from the tokeniser, and just put a comment in the instructions to enter *commands in lower case to stop them being tokenised.

I've also updated the Tube client code. I discovered the FIRQ data transfer routines were not preserving the X and B registers! We hadn't noticed so far because we've been using *commands from the supervisor prompt, but doing an OSFILE call resulted in the handler losing its pointer to the control block halfway through and running code then crashed unexpectedly. I've also tightened up OSCLI and EXECUTE so if code is entered all registers are preserved, and the environment "given" to the entered code is set up correctly so that it can be re-entered as the current program on a soft Break. I've put together a technical reference.

I'm currently looking for some Flex-09 or OS/9 system disk images so I can write a BIOS disk interface, and get them up and running.
hoglet wrote:Were you able to run this in your emulator?
I haven't correctly implemented the overflow flag in my emulator yet, haven't managed to get my head around what what it needs to do based on what data is being manipulated. So any EXBAS09 arithmetic gives an OVerflow error. My emulator is a bit held together with string at the moment, and has a couple of lines hard-coded in refering to directories on my machine. When I tidy it up I'll upload it to my Tube emulators area.

Code: Select all

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

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Sun Dec 07, 2014 1:01 pm

Hi JGH,
jgharston wrote: I've also tightened up OSCLI and EXECUTE so if code is entered all registers are preserved, and the environment "given" to the entered code is set up correctly so that it can be re-entered as the current program on a soft Break.
In v0.24 the EXECUTE code is broken. The fix is to change:

Code: Select all

f964 : beff8c           	LDX  ADDRESS	; Get transfer address
to

Code: Select all

f964 : beff8e           	LDX  ADDRESS + 2	; Get transfer address
Also, on a soft reset I'm now seeing "Not 6809 code" before the 6809>* promt. Not sure if this is expected or not.

Dave

User avatar
lurkio
Posts: 2428
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by lurkio » Sun Dec 07, 2014 4:54 pm

hoglet wrote:I found a nice archive of CPM disks here: http://www.autometer.de/unix4fun/z80pack/ ... I thought I would have a go at converting one of these to run on the Acorn Z80 Co Processor ... I can supply more details if anyone else needs to do this.
Brilliant stuff, Dave! Please do supply as many details about the tools you used to do the conversion as you can. If you feel like doing more yourself, then I for one would be happy to see more Infocom conversions, if there are any more to convert.

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Sun Dec 07, 2014 6:18 pm

hoglet wrote:In v0.24 the EXECUTE code is broken. The fix is to change:

Code: Select all

f964 : beff8c           	LDX  ADDRESS	; Get transfer address
to

Code: Select all

f964 : beff8e           	LDX  ADDRESS + 2	; Get transfer address
D'oh! That's the big-endianness tripping me up again.
hoglet wrote:Also, on a soft reset I'm now seeing "Not 6809 code" before the 6809>* prompt. Not sure if this is expected or not.
That should be correct on a hard reset as the host has sent 6502 BASIC across(*). If you haven't run any 6809 code then on a soft reset it should just go back to the 6809>* prompt. If you have run some 6809 code with a header (eg EXBAS09) then on a soft reset it should re-enter the 6809 code.

(*)I'm thinking of deviating from the specification slightly and on a hard reset just going to the 6809> prompt if there's no 6809 code to run. On the Z80 it looks to disk to try and boot a disk operating system before giving up and going to the supervisor prompt. I haven't got enough information on Flex-09 and OS/9 to do that yet.

Code: Select all

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

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Mon Dec 08, 2014 4:03 am

I've tracked down the obscure error that was stopping my 6809 emulator running on ARM BASIC, and viola, the 6809 Tube running on an ARM CoPro:

Image

I've uploaded !6809Tube. It runs on any BBC BASIC platform that has more than about 128K of memory, so RISC OS, ARM CoPro, Windows. Some of the higher-numbered addressing modes aren't yet implemented.

Code: Select all

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

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Tue Dec 09, 2014 12:57 pm

Upthread there's mention of putting an 80186 CoPro core in the matchbox, and it can already do a Z80. The standard Tube client for both of these have a handful of bugs in them, and I'd recommend putting a slightly patched version in the matchbox. The Z80 is minor, an unbalanced stack when calling code, and truncating =TIME$. The 80186 is more serious, OSFILE loses its pointer to its control block and writes the returned control block contents to where the filename is in memory. Both of them are about 30 minutes' work to fix and I'll upload patched ROMs later today.

Code: Select all

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

User avatar
danielj
Posts: 7846
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by danielj » Tue Dec 09, 2014 1:29 pm

Jonathan, is that why when using my 80186 I can end up with hideous file corruption under ADFS in certain circumstances? (usually unzipping files directly to the IDE HDD)

d.

User avatar
flaxcottage
Posts: 3921
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by flaxcottage » Tue Dec 09, 2014 4:07 pm

Brains the size of planets - all of you. Respect. :shock: 8)
- John

Image

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Tue Dec 09, 2014 9:25 pm

danielj wrote:Jonathan, is that why when using my 80186 I can end up with hideous file corruption under ADFS in certain circumstances? (usually unzipping files directly to the IDE HDD)
Could well be. I haven't investigated too deeply into the BIOS/BDOS part of the 80x86 CoPro (DOS disk system layer that sits on top of the Tube system). I've actually got the Acorn source code for the Tube client, and the coding and commenting style is horrendous.

Anyway, I've now uploaded:
80186 Tube Client v1.01:
* Fixed broken OSFILE implementation
* Errors have the correct error number
* OSWORD 5, 14 and 15 have the correct control block lengths
* Version string is "1.01"

Z80 Tube Client v1.21:
* Fixed broken EXECUTE code: only matches ROM type byte 8 instead of 8-15, and enters raw code with a balanced stack.
* OSWORD 5, 14 and 15 have the correct control block lengths
* Errors have the correct error number
* Version string is "1.21"

I've tested ClientZ80 v1.21 quite extensively with B-Em. I haven't fully tested Client86 v1.01 much as I have to dig out an earlier version of BeebEm with the 80x86 emulation included.

Code: Select all

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

User avatar
flynnjs
Posts: 831
Joined: Tue Jul 06, 2010 9:33 pm
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by flynnjs » Tue Dec 09, 2014 10:52 pm

jgharston wrote: Anyway, I've now uploaded:
80186 Tube Client v1.01:
Good that we've got some momentum here but I think 186
support in these FGPAs is a little way off yet; it definitely
won't be in the Flash from day 1, unlike the others that are
up running already. The beauty is that we'll be able to re-
flash these as new Tubes become available in the future.

Andrew just posted the links to the latest OSHUG meeting
videos and it reminded me of this:
http://en.wikipedia.org/wiki/RISC-V
which could be interesting but I don't know how big it is
and whether it would fit on an LX9.

PhilYoung
Posts: 203
Joined: Sun Jun 12, 2011 4:55 pm
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by PhilYoung » Wed Dec 10, 2014 11:54 am

Hi,
jgharston wrote:[Could well be. I haven't investigated too deeply into the BIOS/BDOS part of the 80x86 CoPro (DOS disk system layer that sits on top of the Tube system). I've actually got the Acorn source code for the Tube client, and the coding and commenting style is horrendous.
The source code is showing up as 'Document not found', assuming it's Client86.src, has it been mislaid in your server move perhaps ?

Cheers,

Phil Young

paulb
Posts: 811
Joined: Mon Jan 20, 2014 9:02 pm
Contact:

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by paulb » Wed Dec 10, 2014 12:07 pm

flynnjs wrote:Andrew just posted the links to the latest OSHUG meeting
videos and it reminded me of this:
http://en.wikipedia.org/wiki/RISC-V
which could be interesting but I don't know how big it is
and whether it would fit on an LX9.
SPARC and MIPS second processors certainly would give everyone a dose of alternative Acorn history. :lol:

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Thu Dec 11, 2014 1:29 am

jgharston wrote:If you have run some 6809 code with a header (eg EXBAS09) then on a soft reset it should re-enter the 6809 code.
That wasn't actually happening as on Reset the address of the last program was always being overwritten when copying the ROM to RAM. Fixed now.

Some minor tweeks to the 6809 Tube Client, and I've taken the opportunity to bring the Serial Client and the 6812 Client up to the same functionality.

6809 Tube client:
6809 Serial Tube Client:
6812 Serial Tube Client:
* Version number is now an EQU to prevent me forgetting to update the text strings.
* Does not overwrite PROG on reset, so a Soft Reset will actually re-enter the last current program.
* Raw code is not made the current program.
* Supervisor makes itself current program so is re-entered on Soft Reset.
* Full code header (C) string check.
* Place-holder put in the source for booting from disk on Reset.
I'm going to update my other Tube clients to ensure their functionality also matches.

Also, a slight tweek to EXBAS09 so that it displays a startup message on a warm entry (after Soft Reset) as well as a cold entry (on first running).

Code: Select all

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

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by jgharston » Sun Dec 14, 2014 5:18 am

Today's minor tweeks the 6809 Tube client:
jgharston wrote:* Place-holder put in the source for booting from disk on Reset.
Went for a long walk across the moors yesterday, and it clicked how to get this done without significantly "polluting" the code, and also gives a cleaner startup display. Now, instead of starting up:

6809 TUBE 64K v0.24
Filing System
BASIC
Not 6809 code
6809>*

It starts up:

6809 TUBE 64K v0.24
Filing System
BASIC
6809>*

which looks a lot neater, like the Z80 CoPro, and leaves a neat entry in the Client code for checking for and booting a disk operating system. I've now got some Flex09 disk images, so I'm going to have a play around with them to see what to do next.

Code: Select all

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

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Sun Dec 14, 2014 8:57 am

Here are some initial notes/thoughts on an 80186 Co Processor, and why it might be harder than first thought.

The best single reference I can find is this:
http://www.cowsarenotpurple.co.uk/bbcco ... /tube.html

Here's the 80186 datasheet:
http://www.classiccmp.org/rtellason/chipdata/80186.pdf

Here's the 80186 Co Pro schematic:
http://mdfs.net/Info/Comp/BBC/Circuits/ ... 6copro.gif

There are a few open source x86 compatible cores:
Next186 (Open Cores) - 80186
Zet86 (Open Cores) - 80186
CPU86 (HT Labs) - 8088
OpenSOC86 - similar to 486 in real mode

Here's a block diagram of the 80186:
80186.png
As well as the processor core, the 80186 contains several on-chip peripherals:
- Programmable Timers
- 2-Channel Programmable DMA Controller
- Programmable Interrupt Controller
- Programmable Chip Select Unit

The problem is, none of the above cores seem to implement all of these peripherals. :(

I believe the timers and the DMA controller are actually used for data transfers between the Co Processor and the Host. So without these, not much is going to happen.

What's I'm not clear on is how similar the DMA controllers in the 80186 are to the 8237A DMA controller:
http://www.cs.ucr.edu/~dalton/i8237a/src/I8237A.vhd
http://www.cs.ucr.edu/~dalton/refdesign ... 32/DMA.vhd

Dave

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

Re: Matchbox sized 6502 / Z80 / 6809 Co Pro

Post by hoglet » Sun Dec 14, 2014 9:31 am

JGH,

Any chance of fixing this link please?
http://mdfs.net/Software/Tube/80186/Client86.src

Dave

Post Reply