[Coco] Is the 6309 worth it?
Phill Harvey-Smith
afra at aurigae.demon.co.uk
Wed Dec 6 18:57:44 EST 2006
Robert Gault wrote:
> L. Curtis Boyle wrote:
>> <snip>
>> The biggest hurdle of using a 6309 is if you use RS-DOS almost
>> exclusively... there are only a few programs that properly use it (Sock
>> Master's MOD player, Roger's Spyder Hyper & Projector III, and maybe a few
>> others. I believe Robert Gault came out with some patches for the Coco 3
>> only to allow RS-DOS to run in native mode, getting you that 12-15% speed
>> increase, and I know Sock Master had some patches for screen scrolling as
>> well, that helped a lot, but not much more than that.
>>
>
> There is no reason why Disk Basic could not be made to run in 6309
> native mode. The main problem is providing backwards compatibility for
> all Disk Basic programs.
If it would help, I have an asm file that will assemble to the disk
basic rom with mamou (the assembler that nitros uses).
> The gotcha with native mode is the difference in the size of the stack
> during interrupts. The Disk Basic NMI service routine must be patched.
Does the FIRQ stack change much ? as DragonDos, uses FIRQ to for the WD
to signal it needs data, and NMI to signal that it has finished, rather
than using the halt line like RS-DOS does.
> There may be others but I can't think of any. Since many programs
> contain their own disk routines and don't use the ROMs, each of these
> programs would need patching to run in 6309 native mode.
It's a real shame that Tandy did not do what Dragon did with their dos
and have a jump table at the beginning of the ROM for things like
reading sectors, opening/closing files etc. This meant that even if the
rom was updated, the table stayed in the same place, so people used the
ROM routines rather than writing their own.
> In creating 6309 patches for the ROMs and writing EDTASM6309, I chose
> compatibility over speed and stuck with the 6309 emulation mode.
That seems like a wise choice, I suppose running properly slower is
better than crashing faster :)
> The best way in Disk Basic to use the 6309 native mode (in my opinion)
> is to incorporate switching into programs. The author could run in 6309
> native mode, switch as needed for disk I/O to emulation mode, and exit
> the program in emulation mode.
This is where having a jump table would be handy, as the rom could be
patched to do the switch (assuming enough spare space, which IIRC there
is loads in the Disk basic rom), meaning the application program would
never know, asuming there are instructions to get the current mode, save
it, do the disk op, and then restore.
> This takes just several bytes of code so
> is not an inconvenience. It is completely analogous to programs that
> switched to the full fast mode on the Coco1. It works fine (even if you
> loose video) as long as you slow down after doing your task.
I did find (on the Dragon at least), that if you switch it off for too
long, the memory corrupts, because it's not being refreshed. What does
supprise me is that in the SAM data sheet it claims to do this because
the video chip can't keep up, yet as I read it all it is doing is
exactly doubling the clock, since there is normally a latch between the
VDG and the data bus anyway, why does the SAM not just do a video access
every 2 cycles instead of 1, if it had been designed that way we could
have had 2MHz CoCos/Dragons from the outset :(
Since I hopefully have a couple of 6309s on order, is there a good
document on the extra modes/instructions anywhere ?
Cheers,
Phill.
--
Phill Harvey-Smith, Programmer, Hardware hacker, and general eccentric !
"You can twist perceptions, but reality won't budge" -- Rush.
More information about the Coco
mailing list