[Coco] Coco3 startup ASM help needed.
rietveld rietveld
rietveldh at hotmail.com
Thu Mar 29 09:20:43 EDT 2018
Hi. Pls keep me in the 'loop' if u find a work around for this. I am also having a similar problem. I have the cocoflash auto detect if it's in a coco1/2 or coco3 and run the specific MENU for that machine. My coco3 menu takes advantage of a better graphics menu and also displays the coco3 games along with the rest of the Coco 1/2 games. The Coco 1/2 menu doesn't use true lowercase and doesn't display the coco3 games since they won't run on the 1/2
The strange thing is my program runs flawlessly from my SDC but after it is flashed to bank 0 of the cocoflash it gives an error upon powering on the Coco. Strange thing is that I can also do a EXEC after the error and the cocoflash MENU will run as intended.
I am now wondering if it's a problem with how the cocoflash is managing the switch
Sent from my BlackBerry Passport Red Edition.
Original Message
From: Pere Serrat
Sent: Thursday, March 29, 2018 9:13 AM
To: coco at maltedmedia.com
Reply To: CoCoList for Color Computer Enthusiasts
Subject: Re: [Coco] Coco3 startup ASM help needed.
Hello David,
thanks for that fast answer.
Maybe I should better explain what I am doing ...
The CoCo-Flash bank zero contains a machine detect code that
switches to the appropriate DOS bank for the detected computer:
- HDB-DOS for CoCo1-2
- HDB-DOS for CoCo3
- DosPlus5.0 Extended for Tano/Dragon
When Basic has ended initialization, it calls the DOS, this has been
intercepted so that instead of returning control to the Basic Interpreter,
it loads a few code lines to $e00 and then jumps there.
This small part simply switches to the bank where we have put the
FlashProgramManager (one for each machine) and starts it
On Dragon and CoCo1-2 this works flawlessly and starts the main menu.
But in the CoCo3, strangely, the code at $e00 is executed but the JMP $c000
fails and the screen shows the std Basic OK
If, at this point, I enter EXEC&HE00, the program works without issues!
So there is something in the CoCo3 configuration that prevents the ROM
from being called at that point or ...
The code at $e00 is this:
------------------------------------------------------------------------------
CopyCoC3
orcc #$50 ; disable interrupts
clr $ffd8 ; ensure normal speed
clr $ffd6 ; ensure normal speed
clr $ffde ; ensure ROM access
clr FCNTRL ; do not autostart selected
FLASH bank
ldd #FMBNK ; get first FLASH block
number to be used for DFEM for this computer
sta HIGHADRS ; Set High byte
stb LOWADRS ; set Low byte
mul ; waste 11 cycles
jmp $c000 ; start selected Bank
*** jumps anyway to the Interpreter!
;
*** but with bank already switched!!
------------------------------------------------------------------------------
I know it has been executed because a PEEK(&HFF65) returns value $0a (10d)
that's the bank where CoCo3 Program is
Any hint/idea to avoid this behaviour will be greatly appreciated
Thanks in advance
pere
-----Mensaje original-----
Message: 4
Date: Wed, 28 Mar 2018 23:47:35 -0500
From: David Ladd <davidwladd at gmail.com>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Subject: Re: [Coco] Coco3 startup ASM help needed.
Message-ID:
<CAHW2jkD6xmwkNhDuC5kLf2RZ288Str=Kas1792SOk1t3MOKNSA at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Jim & Pere,
I ran into a issue myself when I was writing a routine that was to startup
like a Disk Basic ROM. On the CoCo 3 it wouldn't startup like it would on
the CoCo 1 or CoCo 2. I found a example of what I needed to do in:
https://sourceforge.net/p/toolshed/code/ci/default/tree/dwdos/dw3dos.asm
The section with:
fcc "DK"
lbra Entry
fill $FF,9*256 spaced out to prevent CoCo 3 BASIC ROM patches
Once I saw that section and saw the comment then I knew what I had to do in
my code.
Hopefully that helps.
---
Este correo electrónico ha sido comprobado en busca de virus por AVG.
http://www.avg.com
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list