Dragon 32/64 in FPGA, help needed.

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
Higgy69
Posts: 5
Joined: Mon Mar 27, 2017 11:32 am

Dragon 32/64 in FPGA, help needed.

Post by Higgy69 »

Hi all,

A chap from the US who created a Tandy Color Computer FPGA 'Core' is tweeking it to replicate a Dragon 32/64.
This is great news as the Dragon is probably the last popular 80's computer which does not have a representative FPGA Core.

But he needs your help!! The Tandy is his speciality and some assistance is needed to get the Dragon all working. He is planning on making a Dragon 64 Core as i guess that gives the best setup.

There is currently an Alpha build for the MiSTer FPGA hobby device. A MiST Core is also planned.

Now over to the first problems:

1. The problem is nicknamed ROM files with no indication of the destination address, or if both the 32k and 64k versions of the ROM are supposed to be mapped at the same time, etc.

2. Anyone have information on .pak format?

Thanks all.
User avatar
robcfg
Posts: 1529
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Dragon 32/64 in FPGA, help needed.

Post by robcfg »

Hi!

I'm glad to see progress on a FPGA emulation of the Dragon.

As for your questions, the one of the rom locations, can be found in the excellent book Inside the Dragon.

In short, the 32K Basic rom is mapped to 0x8000 to 0xBFFF and the 64K one overlaps the cartridge address space from 0xC000 to 0xFF00.

On a Dragon 64, you can switch the memory mapping type from the same one as the Dragon 32 (32KB Ram + 16KB Rom + 16KB minus 256 bytes Cartridge space) to a full 64KB Ram space.

Regarding your second question, what is a .PAK file? Is that something you get by running a certain tool or program?
Higgy69
Posts: 5
Joined: Mon Mar 27, 2017 11:32 am

Re: Dragon 32/64 in FPGA, help needed.

Post by Higgy69 »

Thanks for info, inhave passed it on. Some further progress at the bottom of this post.

Is there link to the 64 1@2 .roms?
So far 64Tano.rom and 64Tano2.rom are being used:

'64Tano.rom @ $8000 and 64Tano2.rom @ $C000... doesn't appear to be the proper ROMs or setup to allow typing EXEC 48000 to put the machine in 64K mode. EXEC 49152 boots the second ROM and shows 1983 (C) but is still in 32K ROM mode afterwards'.
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Dragon 32/64 in FPGA, help needed.

Post by sixxie »

The second ROM contains code to run from $C000+, but when mapped it's actually just switched in in place of the normal 32K ROM. A loader stub is copied into RAM which copies the ROM ($8000+) into RAM ($C000+).

The correct EXEC address to kick that off is 48000. That address is just a convenience - it immediately JMPs to $BF49 / 48969. But I guess when you have the opportunity to relate your EXEC address to the 48K of RAM that will then be available to BASIC, you gots to take it.

As for the ROM images themselves, they're all on this site: Software > Dragon > Dragon Data Ltd > Dragon Firmware

The IC numbering in that directory is a little confusing, and the zip filename sometimes disagrees with the contents. And on a real Dragon 64, these ICs are numbered 34 and 37.

Anyway, a valid CRC32 for 32K BASIC is 0x84f68bf9 - for 64K BASIC, 0x17893a42
Higgy69
Posts: 5
Joined: Mon Mar 27, 2017 11:32 am

Re: Dragon 32/64 in FPGA, help needed.

Post by Higgy69 »

More questions/clarification needed:

'There is confusion on whether a 64K Dragon contains two 16KB-length ROMs, one at $8000 and the other at $C000. According to what I've read, the system boots into the first ROM in 32K mode, and typing EXEC 48000 should either run the $C000 ROM or perform a copy of the $8000 ROM into RAM $C000.... No matter what set of ROMs I use, EXEC 48000 crashes, but typing EXEC 49152 boots the 1983 ROM and gives the blue cursor... yet stays in 32K ROM mode'.

Thanks
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Dragon 32/64 in FPGA, help needed.

Post by sixxie »

Two 16K ROMs, both resident at $8000+. Selection is with bit 2 of PIA1 side B. A HIGH value there selects the 32K BASIC ROM, a LOW value selects the 64K BASIC ROM.

There's an external pullup resistor on that line such that when configured as an input (power on PIA state), it'll be HIGH.
Higgy69
Posts: 5
Joined: Mon Mar 27, 2017 11:32 am

Re: Dragon 32/64 in FPGA, help needed.

Post by Higgy69 »

Thanks for the help, that info helped.
FPGA Core is making good progress. Hopefully .CAS support will be added soon. I think say people from the US forget/don't know that in the UK audio tapes were the main way we got software loaded on our 8-bits. ;)
Post Reply