Well, it's been a while (Dec 24) since I did my last lot of 6502 tinkering. I ran out of spare time back then (and a little enthusiasm too), but I have a little more time on my hands now, so I'm picking up where I left off. In re-reading my posts to recall what configuration I had settled on, I'm not sure what was I thinking when I said...
I'm thinking my memory map will be as follows...
Code: Select all
C000-FFFF ROM (16k)
DD00-DFFF I/O (0.75k)
0000-DCFF RAM (47.25k)
Spot the obvious mistake of an address overlap! Maybe I was enjoying an early Christmas imbibe - in any event, that should read like this...
Code: Select all
C000-FFFF ROM (16k)
BD00-BFFF I/O (0.75k)
0000-BCFF RAM (47.25k)
Contiguous now at least.
W.r.t. the address decoding, if someone would be so kind as to double-check the following Wincupl code for me, please, I would be grateful...
Code: Select all
Name DRG65C02 Address Decoder;
Partno DRG65C02_ADA;
Revision 02;
Date 03/02/2025;
Designer David Giblin;
Company ;
Location Edenfield, Lancs. UK;
Assembly None;
Device p22v10;
/*
* Pin Map
--------
CLK |1 24| Vcc
RW |2 23| /WE
A15 |3 22| /OE
A14 |4 21| /RAM_CS
A13 |5 20| /ROM_CS
A12 |6 19| /IO_0
A11 |7 18| /IO_1
A10 |8 17| /IO_2
A9 |9 16| /IO_3
A8 |10 15| /IO_4
A7 |11 14| /IO_5
Gnd |12 13| --
--------
*/
/*
* Inputs: Signals from the 65C02 plus phi2.
*/
Pin 1 = CLK;
Pin 2 = RW;
Pin 3 = A15;
Pin 4 = A14;
Pin 5 = A13;
Pin 6 = A12;
Pin 7 = A11;
Pin 8 = A10;
Pin 9 = A9;
Pin 10 = A8;
Pin 11 = A7;
/*
* Outputs:
*/
Pin 23 = WE; /* to RAM and ROM chips */
Pin 22 = OE; /* to RAM and ROM chips */
Pin 21 = RAM_CS; /* to RAM /CS pin */
Pin 20 = ROM_CS; /* to ROM /CS pin */
Pin 19 = IO_0_CS; /* to IO_0 /CS pin */
Pin 18 = IO_1_CS; /* to IO_1 /CS pin */
Pin 17 = IO_2_CS; /* to IO_2 /CS pin */
Pin 16 = IO_3_CS; /* to IO_3 /CS pin */
Pin 15 = IO_4_CS; /* to IO_4 /CS pin */
Pin 14 = IO_5_CS; /* to IO_5 /CS pin */
/*
* Local variables
*/
FIELD Address = [A15..A7];
/*
* Logic:
*/
RAM = Address:[0000..BCFF];
IO_0 = Address:[BD00..BD7F];
IO_1 = Address:[BD80..BDFF];
IO_2 = Address:[BE00..BE7F];
IO_3 = Address:[BE80..BEFF];
IO_4 = Address:[BF00..BF7F];
IO_5 = Address:[BF80..BFFF];
ROM = Address:[C000..FFFF];
!WE = CLK & !RW;
!OE = CLK & RW;
!RAM_CS = RAM;
!ROM_CS = ROM;
!IO_0_CS = IO_0;
!IO_1_CS = IO_1;
!IO_2_CS = IO_2;
!IO_3_CS = IO_3;
!IO_4_CS = IO_4;
!IO_5_CS = IO_5;
This is based on the helpful advice in this thread on how to write these kinds of files. Hopefully, some of it stuck. It compiles with no errors or warnings.
Thanks.
Dave