[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Relocating intbasic?...random musings



On Friday, December 7, 2012 11:11:31 AM UTC-6, Steve Nickolas wrote:
> On Fri, 7 Dec 2012, BLuRry wrote:
> 
> 
> 
> > Holy grail: Have intbasic work within prodos.  Possible?
> 
> 
> 
> It may be.
> 
> 
> 
> The INT binary has some tools and an image of Integer Basic located to 
> 
> $8000-9424.  Prolly the cold entry point (8000) would need to be 
> 
> intercepted to force HIMEM and top-of-program-space to 8000 instead of 
> 
> C000; additionally, a ProDOS wedge would need to be written (BASIC.SYSTEM 
> 
> doesn't handle ? chr$(4) outside of Applesoft).
> 
> 
> 
> > What if we relocated it to an aux page of a ramworks card?  I'd add 
> 
> > RamWorks to Jace to play with that.  :-)
> 
> 
> 
> That might require a lot of rewriting, não?
> 

Nope.  Not really.  I can just subclass the Ram128k class and put a stub in its reconfiguration method to add the necessary I/O listeners to change the aux bank.  I don't think the RamWorks card had any rom on-board to speak of.  The majority of the card internals would work the same, just what aux page is swapped in will vary by the bank select.  So if I swap out the aux ram prior to memory mapping, then it would just sort of take care of itself, really.  It would be < 100 lines of code to implement the card.

As for making it configurable, I already have the mechanisms to make a configurable class selector on the Apple2e class that would allow you to pick what type of memory card, be it 128k or RamWorks.  All the configuration dialogs are auto-generated and would adapt accordingly.  It would take three lines of code (one of them is an annotation to indicate configurability) to add the ram card selector and hook it up.  I built extensibility into every corner of Jace so it can be as extensible as the computer it is emulating. :-)

Unlike other changes, swapping out the ram implementation would require rebooting, as it would wipe out system memory the moment you applied changes.  Other config changes (such as swapping in the ][DB rom, changing cards) do not require restarting the emulator or rebooting the virtual machine.

I suppose the only reason I haven't made an attempt at doing it was because I already implemented the "slinky ram" RamFactor card.  No reason I couldn't have both, eh?

> -uso.