[Coco] The DOS command

Dave Philipsen dave at davebiz.com
Fri Nov 8 01:54:45 EST 2019


Interestingly, the same concept is used to detect the Extended BASIC ROM as well. Color BASIC looks for ‘EX’ at address $8000 while initializing. If it finds it there then it branches to $8002 which is the entry point for initializing for Extended BASIC. And then Extended BASIC does the same thing during its initialization. It looks for ‘DK’ (presumably DisK) at $C000 and branches to $C002 if it finds it. 

This means if you have a CoCo 1 or 2 which has separate ROMs you could actually replace the Extended BASIC ROM with a custom ROM that would do something different. You’d just need to make sure it had ‘EX’ as the first two bytes and the entry to the code was directly following that at $8002.


Dave

> On Nov 7, 2019, at 7:07 PM, Phill Harvey-Smith <afra at ramoth.org.uk> wrote:
> 
> On 08/11/2019 00:57, RETRO Innovations wrote:
>> is there a comparable story about self starting carts that do NOT tie CART to Q on the cart port? I tried to explain that such a thing must be happening for things like CoCoSDC and the FD controller, as they need CART IRQ available, but they autostart...  I assume it must be a special set of values in the ROM on the cart.
> 
> First two charcaters of the ROM must be 'DK' and the cart is entered at $C002.
> 
> From the Dragon ROM, I'm assuming the CoCo would be much the same :
> 
>    LDX     #$444B        ; Check for 'DK' flag for DOS cart
>    CMPX    $C000
>        LBEQ    $C002        ; yes, found, jump to Dos init
>    
>        ANDCC   #$AF        ; Enable IRQ and FIRQ
> At this point if FIRQ is tied to Q, then the FIRQ vector will be followed, which ultimately enters the cart at $C000
> 
> It should also be noted that if a 'DOS' cart is entered at $C002, the IRQ and FIRQ are still disabled to give the DOS rom a chance to change the vectors, and clear any interrupt sources it may be using before enabling them.
> 
> I do know of at least one cart for the Dragon that enters the code at $C002 that is not a DOS cart, namely Compusense's Edit+.
> 
> Cheers.
> 
> Phill.
> 
> -- 
> Phill Harvey-Smith, Programmer, Hardware hacker, and general eccentric !
> 
> "You can twist perceptions, but reality won't budge" -- Rush.
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list