Re: PCB where 65816 replaces a 6502

From: Didier Derny <didier_at_aida.org>
Date: Mon, 30 Nov 2026 16:14:31 +0100
Message-ID: <710870b8-b2f6-4a30-8c60-9376746988b1_at_aida.org>
Hi Ruud :)

I found a bug in emulation mode  breaking existing programs

if you do:

             LDA #$FF
             STA  $80
             STA $81
             LDY  #$02
             STA  ($80), Y or   LDA ($80),Y

instead of reading or writing at the address 000001 (what a normal 6502 
would do)
it tries to read/write in 010001 which is wrong

I studied this problem on a board with a 65c816

my vhdl code add a multiplexor between the high address latch and the 
physical addresses
he second entry of the multiplex is wired as x"00"
and I used the E pin to select
in native move the value is sent directly to physical pins
in emulation  mode 00 is sent as the high address

in that case it wraps correctly


--

didier


Le 30/11/2026 à 12:35, ruud_at_baltissen.org a écrit :
> Hallo allemaal,
>
>
> In the past I created a little circuit where a 65816 replaced a 6502 
> directly on the board. A year ago I designed a PCB that does the same 
> but adds 512 KB of RAM and 512 KB of EPROM. The EPROM can contain 
> handy programs that don't need to be loaded from disk. Today I gave it 
> a last check and the thought occurred if it wouldn't it be better to 
> replace it with another RAM. What are your thoughts about this?
>
> While writing the above, the thought popped up to replace the EPROM 
> with a 32-pin socket and some 3-pin headers that enable the user to 
> make its own choice. But I would still like your opinion, please.
>
>
Received on 2026-11-30 17:00:01

Archive generated by hypermail 2.4.0.