Re: Difference between R65C02 and original 6502 (wrt 6509 emulation)

From: Mia Magnusson <mia_at_plea.se>
Date: Mon, 15 Apr 2019 20:33:08 +0200
Message-ID: <20190415203308.000030a7_at_plea.se>
Den Mon, 15 Apr 2019 11:28:43 -0500 skrev Jim Brain <brain_at_jbrain.com>:
> On 4/15/2019 10:32 AM, Mia Magnusson wrote:
> > Den Sun, 14 Apr 2019 21:43:28 -0500 skrev Jim Brain
> > <brain_at_jbrain.com>:
> >> Thanks Michał for the testing.
> >>
> >> I have updated the github repository with the v4 code here:
> > Cool, nice work!
> >
> >>    * I have also added support for the 65C816S in native mode, in
> >> which the bank register is driven directly by the 'C816. Placing
> >> the CPU into native mode will also switch into this mode, which
> >> means care must be practiced to set up the '816 bank to match the
> >> current 6509 'Execution Bank' before switching into this mode.
> >> Location $0 and $1 will still be visible while in native mode in
> >> the current HDL.
> > Something that Michal and you might want conteplate: Would there be
> > any benefit for the new 8088 support software if it were possible
> > to hide the $0/$1 registers in '816 native mode?
> 
> I apologize.  I misread my code last night, and the behavior you note
> is indeed in place:
> 
> always _at_(*)
> 
> begin
>     if(oe_bank & !flag_ext & !flag_full) // accessing bank register 
> lower 4 bits and we're not in '816 mode
>        data_6502_out = {4'b0000, data_bank[3:0]};
>     else if(oe_bank & !flag_ext & flag_full) // accessing bank
> register 8 bits and we're not in '816 mode
>        data_6502_out = data_bank;
>     else if(r_w & _rdy & phi2_6509) // read data from bus and ready
> is high and phi2 is high
>        data_6502_out = data_6509;
>     else // there is no option to read bank register in 816 mode.
>        data_6502_out = 8'bz;
> end
> 
> However, I did not hide the writes to the $0/$1 registers.  I assume 
> writing to those registers should also be prevented, but that means
> that one must remember what bank one was in before one went into '816
> mode.

In a CBM-II machine, byte 0/1 in bank 15 will anyway always be unused
by any software not aware of your 6509 emulator, so as long as writes
to 0/1 in '816 native mode are done in bank 15 no other data (like ram
for the 8088 or so) would be overwritten. So I can't see any really
good reason for hiding writes to the 0/1 registers while in '816 mode.


-- 
(\_/) Copy the bunny to your mails to help
(O.o) him achieve world domination.
(> <) Come join the dark side.
/_|_\ We have cookies.
Received on 2020-05-29 21:34:19

Archive generated by hypermail 2.3.0.