Date : Sun, 09 Apr 2006 22:42:01 +0100
From : dominic beesley <dominic@...>
Subject: [Fwd: Re: Contikit anyone?]
Subject: Re: [BBC-Micro] Contikit anyone?
Date: Sun, 09 Apr 2006 21:09:24 +0100
From: dominic beesley <dominic@...>
To: Rob <robert@...>
References: <4438F46C.7030705@...>
<7.0.0.16.0.20060409132055.061a8830@...>
Cheers
Its more a case of reliably getting code to call back and forth across
multiple roms. cc65 has the concept of a "far" pointer which I can use
but my bank switching code seems to get ignored by the OS and every time
I call an OS routine it puts back whichever ROM it thinks is best!
(I've been using the extended vectors stuff already in a rommable c
library - not ready yet but sort of working)
I've now put up a screenshot too....
http://www.brahms.demon.co.uk/contiki-cal.gif
Thats what it looks like in MODE 0/(Master shadow) mode. Looks nice, but
doesn't do a huge amount, yet!
Dom
Rob wrote:
> At 12:47 09/04/2006, dominic beesley wrote:
>
>> I've recently been working on a version of cc65 (www.cc65.org) to
>> target the BBC range. (an early version can be found at
>> www.brahms.demon.co.uk/software)
>>
>> I've managed to get contiki http://www.sics.se/~adam/contiki/ working
>> (just the desktop and a couple of programs). Would there be any
>> serious interest in this.
>
>
>
> congrats!! this is something I've always had in my "must see if I can
> do it" pile.. (unfortunately this keeps growing...)
>
>
>> To help me get a bit further, I've managed to put most of the C
>> Library in a sideways RAM bank and load the program in normal memory.
>> To squeeze more I'd like to use several SW/RAM banks but find that
>> whenever I call OS routines it plops me back in whatever ROM/SWRAM
>> bank it thinks is most appropriate with terrible consequences.
>>
>> Is there a document or discussion or whatever that details how best to
>> go about coding for multiple RAM/ROM banks
>
>
> You can use the extended vectors to point any of the standard OS or user
> vectors into a call within a specified sideways rom/ram bank, so as to
> intercept for your custom routines. See AUG p326 for details on how to
> do this. As long as your calling routine was itself called correctly,
> wherever it was, I belive that the return from this should come back to
> the same place.
>
>
> Rob
>
>
>