Re: Hardware emulation of 6509 using 6502?

From: Mia Magnusson <mia_at_plea.se>
Date: Fri, 16 Mar 2018 00:22:17 +0100
Message-ID: <20180316002217.00005066@plea.se>
Den Thu, 15 Mar 2018 15:00:40 -0700 skrev Mike Naberezny
<mike@naberezny.com>:
> On 3/15/18 1:55 PM, MichaƂ Pleban wrote:
> > I am not familiar with the 65816, so I have an obvious question -
> > could KERNAL routines be called in the 65816 mode? If not, than the
> > usefullness would be limited (no editor/KERNAL/BASIC calls,
> > probably no interrupts as well).
> 
> I wrote a SoftBox terminal program that runs from the 24K RAM
> cartridge.  This program doesn't use the ROMs at all; it just uses
> the I/O devices directly. It has its own screen, keyboard, and IEEE
> routines (the IEEE routines are limited to what is needed for the
> SoftBox).  Porting this program to '816 native would allow me to stop
> using the cartridge and have much more space for code and buffers.
> It would also speed up the terminal, e.g. the '816 memory move
> instructions could be used to scroll regions of the screen.
> 
> For those times when the built-in routines are needed, the '816 can
> be switched to emulation mode to call the ROMs.  Although, with so
> much contiguous RAM available in '816 native mode, those routines
> could also be ported to '816 native and run from RAM.
> 
> I think the '816 adapter is worth pursing because it would be similar
> in size and cost to the existing adapter but would add powerful
> features for programs written to use them.

As it seems like the B series uses the lower half of bank 15 for a tiny
bit of ram and a lot of cartridge space, and most of the upper half of
bank 15 for ROM, I/O and video RAM, a simpler patch could be to att
some way to use A15 to switch between two different banks. I.e. in a
special mode: A15 = high = always bank 15, A15 = low = selected bank as
normal. That way you could have up to 32k in each bank that can be
mixed with kernal ROM, I/O and screen ram directly.

Btw I took a slight look at the 65816 documentation and it seems like
bank 0 i special. Maybe a 65816 adapter for the B and P series should
have some simple XOR hardware on the bank signals to flip around the
banks as required?

One thing really worth deciding though is where to stop feature creep.
How big is the demand for this hardware as it is right now?

(My drive for starting this thread is to make it possible to build a B
replica (or even a P replica) without having to find the rare 6509 CPU
(and in the long run also replace the 6525 with something easier to
find). In a theoretical distant future maybe even build a semi-replica
capable mimicing a few different Commodore models. But different people
might have different ideas on what they want).

-- 
(\_/) Copy the bunny to your mails to help
(O.o) him achieve world domination.
(> <) Come join the dark side.
/_|_\ We have cookies.
Received on 2018-03-16 01:00:30

Archive generated by hypermail 2.2.0.