Attempting to get a DragonPlus board going ...

A place to discuss everything Dragon related that doesn't fall into the other categories.
sorchard
Posts: 530
Joined: Sat Jun 07, 2014 9:43 pm
Location: Norwich UK

Re: Attempting to get a DragonPlus board going ...

Post by sorchard »

bluearcus wrote:Unfortunately this doesn't seem to work...
Yes, not so easy it would seem. Just been having a look at xroar's source: In dragon.c there's a flag 'unexpanded_dragon32' that when cleared, causes a Dragon to get D64 style decoding for PIA0.

I can also confirm that the flag only appears to be set if a Dragon is specified with no more than 32K.

Easy enough to mod purely for testing the OS9 boot issue, (make the decode depend on 'is_dragon64' or 'have_acia' instead?) but a more permanent change might need some careful checking to unpick the decode logic.

(Edit: I see you're a step ahead already!)

Also a cautionary note, hopefully I'm being over-cautious: Writing PIAs with bogus values as is happening here might not be very healthy. One thing that could happen is an input line could end up as an output. I've often wondered how bad it would be if say the keyboard inputs were set as outputs such that pressing keys resulted in shorted outputs. Outputs are usually designed to survive some abuse but not too much. It's not something I'd like to try to see what happens, though as I say, I'm probably being over-cautious.
Stew
bluearcus
Posts: 142
Joined: Wed Sep 07, 2016 4:45 pm

Re: Attempting to get a DragonPlus board going ...

Post by bluearcus »

Ideally the ACIA driver would compare the mirrored addresses on init and play nicely if found something suspicious!

I didn't know about this lazy decode malarky though, and always wondered why the 6551 board in my 32(64)+ACIA sent a new flying lead in to a lifted pin of the PIA. Now I understand!
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Attempting to get a DragonPlus board going ...

Post by sixxie »

So I see you're delving into XRoar's heuristics for putting a machine together!

Any advice on what an expanded Dragon 32 generally *does* look like? Should be easy enough to modify - what's there is guesses! The main obvious thing is to beef up the decoding for writes to upper RAM (don't select ROM at same time), but maybe I went too far in making it 64-like.

Edit: ah wait, I see a link to the upgrade procedure earlier in the thread - I'll have a shuftie at that.
bluearcus
Posts: 142
Joined: Wed Sep 07, 2016 4:45 pm

Re: Attempting to get a DragonPlus board going ...

Post by bluearcus »

Hi Ciaran,

I think 95% of 32(64) machines will just have an upper 32k decoding mod. I have an exception, but even that was upgraded in two stages, 64K mod first, ACIA board added later.

Mike
bluearcus
Posts: 142
Joined: Wed Sep 07, 2016 4:45 pm

Re: Attempting to get a DragonPlus board going ...

Post by bluearcus »

OK, after A LOT of faffing, I think I have conjured up a new OS9 system disk which likes 64k Dragon 32s... and should be OK for normal Dragon 64 architecture machines with proper decoding for FF00-FF08 as well.

The problem was not in the ACIA6551 driver, which isn't loaded by the DragonData OS9 system disk by default, but in some code in the DDISK disk interface driver which was checking the ACIA state before going into the sector read/write routine. It was checking what it believed was the ACIA command register at $FF06 to determine if the ACIA was active and potentially sending or receiving (using interrupts) and if so, waiting for any send to complete before making the ACIA interrupt-safe. Unfortunately it was finding the PIA data register at $ff02 instead (used for the matrix output lines, plus the printer port) and getting confused.

The revised DDISK now does a check of $ff06 vs $ff02 to see if the values are the same, which seems to be a safe-ish way of determining if the command register of a real decoded 6551 is there, or a mirror of the PIA data register for the keyboard/printer output lines. Thankfully the standard state of the PIA output register coincides with a disabled ACIA command register state, so even if there's a false match on a real 64, the ACIA won't be active and all should be good. I should look at the printer driver I suppose to check there's no possible clash when that's in use, but as the disk is really for 32(64) machines, I'm not too worried.

Give it a try Tony (or Stu as you have some similar machines I believe) - it boots fine where the standard DragonData OS9 system disk hangs in my modified Xroar.

If it works it should be a better starting point for your DragonPlus in OS9 adventures Tony... next stop Dynacalc in 80 columns!

Mike
Attachments
OS9-SYS-32UPG.VDK
OS9 System disk for Dragon 32 upgraded to 64k
(180.01 KiB) Downloaded 257 times
Serenarian
Posts: 29
Joined: Thu Oct 25, 2012 1:28 pm

Re: Attempting to get a DragonPlus board going ...

Post by Serenarian »

COMPUSENSE DRAGON PLUS BOARD.zip
Some notes On DragonPlus
(128.75 KiB) Downloaded 275 times
This talk about DragonPlus boards has prompted me to get out my second Dragon64 which has the board fitted. That's mine in the picture on the hardware page. And yes it still works fine.
When I bought my DragonPlus back in the 1980s it was one of the first and the documentation that came with it was very sparse - so I made some notes of my own at the time. I have spent the past few days typing them up in a more comprehensive form in an old version of MsWord for Windows. Hopefully they will be of some use and understandable. I took some time to cross reference the 6845 configuration with that of the BBC and IBM computers of the time which also used it. Please feel free to edit them.

Compusense did a very good job with the hardware but sadly there weren't the programs to exploit it. Yes there were the OS9 and Flex drivers - and I used it for OS9 mainly. For general use they had written Edit+128 which came with my board although at the time the documentation with it was only in photocopied form. Edit+ was mainly intended as a programmer's editor, but it did at least allow the 80x24 Video to be used in Dragon Basic - and to access the extra RAM as two 32k RAM disks - as you will have discovered. But EDIT+128 is quite large, sets the machine to MAP1 and uses a block of memory above $E000 that I use for other things Its just a pity that it wasn't written to be position independent and and that Compusense didn't publish a documented list of the main routines that made up the code. After all It would have helped others to write code for the board and perhaps promote sales. A stripped down set of drivers would be nice. My other grumble is about the character set - no block graphics or box and line characters that would be useful for forms. I do have an EPROM programmer though and promised myself to make my own character set ....one day...

On the subject of OS9, I too had a Dragon 32 that I upgraded to 64k and I patched OS9 to run on it. I still have the disk here it front of me if anyone is interested. I don't have facilities to make a VDK, but anyone passing Mold in North Wales can come and collect a disk. Sadly my silly sister-in-law binned the Dragon32 that I had loaned to her children in the late 1980s, otherwise that would be available for testing. GRRRR!!!

P Mooney
Pernod70
Posts: 122
Joined: Sat Apr 22, 2017 10:06 pm
Location: Croydon, UK

Re: Attempting to get a DragonPlus board going ...

Post by Pernod70 »

That's a nice document, thanks. It will help me correct some video timing details in MAME. At IC12 there is a N82S147AN PROM, any idea how this is used? It would be nice to see a dump of your IC22 too, to compare with the character set that I'm currently using.
Serenarian
Posts: 29
Joined: Thu Oct 25, 2012 1:28 pm

Re: Attempting to get a DragonPlus board going ...

Post by Serenarian »

The dump of my Character EPROM IC22 is Appendix A. I painstakingly laid it out as a table there using a faded printer dump I made of the EPROM contents back in 1986. The hex codes for each byte are exactly what my EPROM programmer output at the time. In the righthand column I have inserted the corresponding symbol from various font sets - trying to find a shape that looks most like the Compusense one. But they are not exactly like the screen image. I tried to pick from various fonts but none were quite like the Compusense font. - Take the number 4 for example where the two lines at the top of the character don't meet in a point. So your only hope (for now), if you are really keen, is to plot them out pixel by pixel on graph paper - but it looks exactly like the image of the dump on the Dragonplus hardware page. I have given you the complete byte by byte hex codes for all 255 characters. As I wrote in my notes, I don't much like the font choice they made. I would rather have Inverse characters than the underline, or better still some block graphics or lines to draw boxes (as in IBM code page 437). My EPROM has the upper half blank too. I guess I will have to dig out my EPROM programmer soon and design my own font set - and add another font in the upper 4k with a couple of jumpers to select the lower or upper half.

As for the way that the N82S147AN is used, I don't know. It puzzled me too. I was a programmer really and only tinkered with circuits. Its soldered into the board so I'm not curious enough to remove it. Anyway I doubt that it would tell us much.

Just a thought though. You will see in my notes that there is a register at $FFE2 which Compusense described as "Memory Bank Register". The brief 4 page documentation they provided to me is exactly the same as the images in the archive TechnicalInfo01.jpg, TechnicalInfo02.jpg, TechnicalInfo03.jpg, TechnicalInfo04.jpg - including the spelling mistakes. You will see on page 2 "Register details ($FFE2) " .. and that they describe it as a write only register in which only bits 0, 1 and 2 are used and that the figures in column R0 have been scribbled out. Also notice that it says "bits 3-7 must not be used". Could this be the N82S147AN? The top of the next page says that status of the 6845 display can be determined by BIT0 of the same register - so its not write only after all. Clearly register $FFE2 holds some mysteries, You will also pick out that the 64k static RAM is mapped as two parallel 32k banks at the bottom of the memory map, and yet it appears to OS9 and Flex as a single 64k RAM disk. I've not studied the OS9 driver to see how it switches this into the memory map. Finally, the pads labelled PL4 for an expansion connector have not been explained - other than a rumour that there were plans for a hard disk interface. Perhaps the upper 5 bits of $FFE2 are related to that.

P Mooney
Pernod70
Posts: 122
Joined: Sat Apr 22, 2017 10:06 pm
Location: Croydon, UK

Re: Attempting to get a DragonPlus board going ...

Post by Pernod70 »

Serenarian wrote:As for the way that the N82S147AN is used, I don't know.
Does the Plus board ever produce any colour? I've always assumed it was monochrome, but maybe the PROM contains a palette?
Serenarian
Posts: 29
Joined: Thu Oct 25, 2012 1:28 pm

Re: Attempting to get a DragonPlus board going ...

Post by Serenarian »

No colour, i'm sorry - and I know that these PROMs were used in some video cabinets to give an RRR GG BBB palette. Maybe there was a plan for that on the DragonPlus . It would have required a second Video RAM bank (like on the IBM MGA board) to hold the corresponding character attributes. The IBM card does Bright, Underline, Inverse in this way, and the Sinclair uses a parallel attribute map alongside the video ram page. One byte from the video page gives the character matrix and a parallel byte from the attribute page gives the colour - that's why the colours have to apply to a complete character cell, and not individual pixels.
Post Reply