[Coco] Coco3 startup ASM help needed.

David Ladd davidwladd at gmail.com
Thu Mar 29 22:08:35 EDT 2018


Pere,

Well from what I understand on the CoCo 3 to start a ROM image that you
would normally do a EXEC&HC000 you would do a EXEC&HE010 on a CoCo 3.

Not sure if that helps?

+-----------------------------------------------------------------------+
| David Ladd a.k.a. PacoOtaktay a.k.a. Drencor                          |
| YouTube: http://www.youtube.com/user/PacoOtaktay                      |
| YouTube Gaming Live: https://gaming.youtube.com/user/PacoOtaktay/live |
| Websites: http://dwladd.com     &     http://www.theterrorzone.com    |
| G+:  https://plus.google.com/113262444659438038657                    |
| G+:  https://plus.google.com/+DavidLaddPacoOtaktay                    |
|                                                                       |
| Do you have your CoCo 3 yet?                                          |
+-----------------------------------------------------------------------+


On Thu, Mar 29, 2018 at 8:12 AM, Pere Serrat <psergm at gmail.com> wrote:

> 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