6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 11:47 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Sun Nov 26, 2023 2:04 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1119
Location: Albuquerque NM USA
22V10 has been around for a while; GAL22V10 is available from used market but Atmel's ATF22V10 is still available at reasonable price from Mouser. Another important factor is GAL22V10 and ATF22V10 both can be programmed with the ubiquitous TL866II programmer. WinCUPL a common development tool for 22V10. I understand it has rather buggy user interface so I took the advice of BigDumbDinosaur and composed the PLD design as plain text file and use WinCUPL just to compile the plain text design file. So far I've not encounter any serious issues with WinCUPL.

My first 22V10 project is using it as a state machine to bootstrap 6502 from CF disk. It is not going well, so I'm trying another approach by using 22V10 as a small bootstrap ROM. It turns out this particular approach was very well discussed in this old topic, Use GAL as a small eprom. I'm just tinkering with my new knowledge of 22V10 and WinCUPL to build a 6502 computer so I'm starting a new topic in SBC area.

The goal of this project is building a 6502 computer using 22V10 as the bootstrap ROM. It will not have a traditional parallel EPROM, but will have mass storage such as CF, serial EEPROM, or SD. It will have a serial port, but I really want to tinker with 65C22. Beyond that is rather hazy but I do want to stick with currently available components.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 2:07 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1119
Location: Albuquerque NM USA
Prototype
Start off with a prototype on CRC65 pc board with prototype area so to minimize wiring. CRC65's CPLD is removed. Prototype area has GAL22V10, 74HCT138, and W65C51.

Memory map:
RAM, $0-$F7FF
IO, $F800-$FBFF.
22V10 ROM (32-bytes), $FC00-$FFFF

IO area currently has two devices, there are room for more:
CF interface, $F800-$F9FF, uniquely mapped to $F800-$F807
Serial port (W65C51), $FA00-$FBFF, uniquely mapped to $FA00-$FA03

GAL22V10 provides 32 bytes of bootstrap ROM and 2 decodes for RAM and IO. GAL22V10 merits a separate post about its operation.

Get it boot up first, then I'll make up the rest as I go...


Attachments:
DSC_74921125.jpg
DSC_74921125.jpg [ 1.43 MiB | Viewed 17287 times ]
DSC_74911125.jpg
DSC_74911125.jpg [ 1.08 MiB | Viewed 17287 times ]
ROM22_construction_as-built.jpg
ROM22_construction_as-built.jpg [ 233.73 KiB | Viewed 17287 times ]
ROM22V10_scm.pdf [27.08 KiB]
Downloaded 90 times
Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 7:10 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
plasmo wrote:
22V10 has been around for a while; GAL22V10 is available from used market but Atmel's ATF22V10 is still available at reasonable price from Mouser. Another important factor is GAL22V10 and ATF22V10 both can be programmed with the ubiquitous TL866II programmer. WinCUPL a common development tool for 22V10. I understand it has rather buggy user interface so I took the advice of BigDumbDinosaur and composed the PLD design as plain text file and use WinCUPL just to compile the plain text design file. So far I've not encounter any serious issues with WinCUPL.


You need the TL866 II Plus to program GALs. The older TL866A (and it's many clones!) won't do them, and there are 1000s of these older ones (and clones) still being sold online - I've just this month bought one via ebay and had to return it - fortunately I was refunded... Still looking for a II Plus programmer in the UK as the Linux software I use doesn't support the newer (black case) ones. (I currently use a Genius G540 programmer for Lattice GALs but it won't do the ATMEL ones - and the old WinXP laptop I use is on its way out, so I'm after a II Plus) I use GALasm to generate the JED files for it (again, from Linux)

But on the 22v10 front: I've used them since day 1 (of my "new Ruby era", staring in 2018, 40 years after I first touched the 6502) programmable logic was about in the late 70s and early 80s so I don't feel too bad about it not being fully/authentic retro and in my latest design the 22v10 is doing the work of about 6 or 7 TTL ICs - R/W separator, RAM, ROM, VIA address decoder and a 3-bit latch for the banked ROM. In my '816 system there are 2 of them, one doing the top 8-bit address latch and IRQ combiner the other doing address decoding. They're not doing anything "new" as such, just replacing a raft of TTL that I'm too lazy to implement.

So from my point of view; Go For It :-)

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 2:11 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1119
Location: Albuquerque NM USA
You are right, I should've said TL866II-Plus. Mine was purchased from eBay about 5 years ago. Surprised to hear that TL866II (not Plus) is still being sold today. The factory software of my 5-year old Plus needs to be upgraded (from rev7 to rev12) in order to program GAL22V10.

I have used UV-erasable PAL16L8/16R8 in the 80's. I recall the software was National's Plan and programmer was Data I/O. The devices, tools, and programmer have certainly changed a lot since then.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 3:02 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
I'm looking forward to seeing where this goes. I abandoned doing something similar as the smallest I've been able to make SD card bootstrap code - just enough to load sector 0 and chain to it - is 126 bytes, so I don't think that would fit. I can share the code though if you're interested. It relies on bespoke hardware (itself based around a 22V10) to provide an SPI interface so the remaining code is really just sending the right commands and testing the results.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 3:35 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1119
Location: Albuquerque NM USA
This post describes GAL22V10 portion of the design.

WinCUPL provides a table entry in the form of
Table Input => Output { list of Input and corresponding Output}

This is a convenient form to enter a small ROM where Input are ROM addresses and Output are ROM data. The size of ROM is variable, depending on the ROM contents and pin assignment of output bits. The pin assignment matters because 22V10's AND-OR fabric are different for different pins. For an example pin 23's AND-OR fabric has 8 AND product lines while pin 18 has 16 AND product lines. If the ROM design won't fit, it may be useful to reassign the data pins. Changing pin assignments is problematic for pc board so I've found 32-byte ROM seems to fit most of the time.

The goal is to bootstrap from CF disk (or serial EEPROM or SD) and run a particular application automatically from power-on. This a multi-stage bootstrap process so it is fairly difficult to create and test various software directly on the CF disk. A near-term solution is bootstrapping from the serial port so I can load/test individual software pieces then assemble them into a CF disk. So there are at least two bootstrap codes, serial bootstrap and CF bootstrap. 22V10 is too small to accommodate both bootstraps so there will be two different versions of 22V10. This post will only address the serial bootstrap.

22V10 has up to 10 outputs and 12 inputs; 32-byte ROM only needs 8 data outputs and 5 address inputs plus one tri-state control. The other 2 outputs and 7 inputs can be used for something else. Address decodes for RAM and I/O are logical uses of these extra input/output. The extra inputs are assigned to 6502's address A15 to A10 and read_write_not. The outputs are RAM output enable and I/O base address. ROM's output enable is driven by A[15..10] all high thus ROM is in address space $FC00-$FFFF. IO is in address space $F800-$FBFF and RAM is from $0-$F7FF. ROM and RAM are enabled all the time, these decodes determine when the data bus is driven by ROM or RAM. IO is the base address signal further decoded by 74138 for CF control signals and additional address for 6551 and 6522.

This is the contents of serial bootstrap 22V10.
Code:
Name            ROMSerbt;
Partno          ;
Revision        ;
Date            11/25/23;
Designer        H. SHEN;
Company         ;
Location        ;
Assembly        ;
Device          g22v10;

/****************************************************************/
/* Serial Bootstrap */
/* RAM is from 0x0-0xF7FF  */
/* ROM is from 0xFC00-0xFFFF  */
/* IO is from 0xF800-0xFBFF   */
/*   Connecting to IO are 65C22, 65C21, and compact flash */
/*   compact flash read and write are decoded via 74138 with clock and rwb in inputs */
/*   CF addresses are 0xF800-0xF8FF */
/****************************************************************/

/** Inputs **/

Pin 1      = rwb;
Pin 2      = A0;
Pin 3      = A1;
Pin 4      = A2;
Pin 5      = A3;
Pin 6      = A4;
Pin 7      = A10;
Pin 8      = A11;
Pin 9      = A12;
Pin 10   = A13;
Pin 11   = A14;
Pin 13   = A15;

/** Outputs **/

Pin 15 = D0;
Pin 16 = D1;
Pin 17 = D2;
Pin 18 = D3;
Pin 19 = D5;
Pin 20 = D7;
Pin 21 = D6;
Pin 22 = D4;
Pin 14 = !RAMOE;
Pin 23 = !IO;   

/** Declarations and Intermediate Variable Definitions **/

Field Addr = [A4..0];
Field Data = [D7..0];

/** Logic Equations **/

RAMOE = rwb & !(A15 & A14 & A13 & A12 & A11);

IO = A15 & A14 & A13 & A12 & A11 & !A10; /* I/O base decode */

D0.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D1.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D2.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D3.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D4.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D5.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D6.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D7.oe   = A15 & A14 & A13 & A12 & A11 & A10;
Table  Addr => Data {

/*   Addr      Data  */
/*   ------   ---------  */
   'h'00 =>      'h'a2;
   'h'01 =>      'h'05;
   'h'02 =>   'h'8e;
   'h'03 =>   'h'02;             
   'h'04 =>   'h'fa;                           
   'h'05 =>   'h'a9;                           
   'h'06 =>   'h'1e;                           
   'h'07 =>   'h'8d;                           
   'h'08 =>   'h'03;                           
   'h'09 =>   'h'fa;                           
   'h'0a =>   'h'ad;                           
   'h'0b =>   'h'01;                           
   'h'0c =>   'h'fa;                           
   'h'0d =>   'h'29;                           
   'h'0e =>   'h'08;                           
   'h'0f =>   'h'f0;                           
   'h'10 =>   'h'f9;                           
   'h'11 =>   'h'ad;                           
   'h'12 =>   'h'00;                           
   'h'13 =>   'h'fa;                           
   'h'14 =>   'h'9d;                           
   'h'15 =>   'h'00;                           
   'h'16 =>   'h'c0;                           
   'h'17 =>   'h'e8;                           
   'h'18 =>   'h'd0;                           
   'h'19 =>   'h'f0;                           
   'h'1a =>   'h'4c;                           
   'h'1b =>   'h'05;                           
   'h'1c =>   'h'c0;                           
   'h'1d =>   'h'ff;                           
   'h'1e =>   'h'00;                           
   'h'1f =>   'h'02;                         

}

------------------------------------------------
Code:
000000r 1               ;11/25/23
000000r 1               ;ROM in 22V10
000000r 1               ;boot from serial port
000000r 1               ;load 251-byte binary file to 0xC005
000000r 1               ;serial port is w65c51 located in range $FA00-$FBFF
000000r 1               ;  Use addresses of $FA00 to allow expansion of other I/O devices
000000r 1               W65C51Data   = $FA00      ;External ACIA data
000000r 1               W65C51Stat   = $FA01      ;external ACIA status
000000r 1               W65C51Cmd   = $FA02      ;external ACIA command
000000r 1               W65C51Ctrl   = $FA03      ;external ACIA control
000000r 1                  .pc02         ;W65C02
000000r 1               
000000r 1                  .ORG $ffc0
00FFC0  1  A2 05           LDX #$5         ;no parity, RTSB low, DTRB low, interrupt enabled
00FFC2  1  8E 02 FA        STX W65C51Cmd      ;enable ACIA transmit and receive reg
00FFC5  1  A9 1E           LDA #$1e
00FFC7  1  8D 03 FA        STA W65C51Ctrl      ;internal baud, 38400
00FFCA  1               serboot1:
00FFCA  1  AD 01 FA        LDA W65C51Stat      ;chk serial receive ready flag
00FFCD  1  29 08           AND #8
00FFCF  1  F0 F9           BEQ serboot1
00FFD1  1  AD 00 FA        LDA W65C51Data
00FFD4  1  9D 00 C0        STA $c000,x
00FFD7  1  E8              INX
00FFD8  1  D0 F0           BNE serboot1
00FFDA  1  4C 05 C0        JMP $c005
00FFDD  1               
00FFDD  1  FF 00 02        .byte $ff,0,2      ;IRQ vector is $200, reset vector is $FFC0


Above is program listing for the 32-byte serial bootstrap code. It initializes W65C51 then loads 251 bytes of program into $C005-$C0FF then jumps into $C005. The vectors are $200 for interrupt, $FFC0 for reset, and $54C for NMI. These rather odd numbers are results of "putting square pegs in round holes"--this particular solution happens to fit. No doubt there are other working combinations. This is a case where I/O in zero page can reduce the code size.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 4:08 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
Very compact. The NMI address is more flexible than it looks, you could put it in any page of memory by just changing the entry point of the second stage code to somewhere else in page C0, which is easy to accommodate.

I start wondering whether one of the spare outputs could be used to override address decoding and force this to get used instead of RAM after a reset. It would be easy to make that state then reset itself when a certain point is reached, then the vector can just be RAM after that.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 9:58 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1119
Location: Albuquerque NM USA
That’s an interesting idea. 6551 and 6522 have programmable output that can serve to shut off ROM and reclaim that space for RAM. I’ll lose one address input but gain one block of RAM, so I think it is even for RAM space. The good part is not having to play game with ROM code to get the right interrupt/reset/nmi vectors.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 4:31 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1119
Location: Albuquerque NM USA
Now 22V10 has a bootstrap program that can load and run 251 bytes of binary data via serial port, this is 251-byte 2nd stage bootstrap to be loaded via the serial port. It is basically an Intel Hex file loader to load application program. This is screen shot of 22v10 bootstrap load/run 251-byte hexloader then load/run a monitor. Now I have a tool to test/develop software for CF bootstrap.
Attachment:
22v10bootstap-hexloader-monitor.jpg
22v10bootstap-hexloader-monitor.jpg [ 40.45 KiB | Viewed 17178 times ]


Attachments:
TinyLoad.asm [3.38 KiB]
Downloaded 95 times
Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 29, 2023 4:00 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1119
Location: Albuquerque NM USA
Serial bootstrap is working well. I have a TeraTerm macro script to load and run monitor with the serial port. The monitor serves as the tool to install 2nd stage bootstrap in master boot record as well as the monitor itself in sectors after the master boot record. Once the 2nd stage bootstrap and monitor are stored in the CF disk, I'll swap out the serial boot 22V10 and install the CF boot 22V10 so it can boot from CF disk and run the monitor. This is the programming file of 22V10 for CF boot, followed by the program listing of the 32-byte CF boot ROM in the 22V10.

Code:
Name            BootROM;
Partno          ;
Revision        ;
Date            11/23/23;
Designer        H. SHEN;
Company         ;
Location        ;
Assembly        ;
Device          g22v10;

/****************************************************************/
/* 32-byte ROM code extracted from 65ALL */
/* RAM is from 0x0-0xf7FF  */
/* ROM is from 0xFC00-0xFFFF  */
/* IO is from 0xF800-0xFBFF   */
/*   Connecting to IO are 65C22, 65C21, and compact flash */
/*   compact flash read and write are decoded via 74138 with clock and rwb in inputs */
/*   CF addresses are 0xF800-0xF8FF */
/****************************************************************/

/** Inputs **/

Pin 1      = rwb;
Pin 2      = A0;
Pin 3      = A1;
Pin 4      = A2;
Pin 5      = A3;
Pin 6      = A4;
Pin 7      = A10;
Pin 8      = A11;
Pin 9      = A12;
Pin 10   = A13;
Pin 11   = A14;
Pin 13   = A15;

/** Outputs **/

Pin 15 = D0;
Pin 16 = D1;
Pin 17 = D2;
Pin 18 = D3;
Pin 19 = D5;
Pin 20 = D7;
Pin 21 = D6;
Pin 22 = D4;
Pin 14 = !RAMOE;
Pin 23 = !IO;   

/** Declarations and Intermediate Variable Definitions **/

Field Addr = [A4..0];
Field Data = [D7..0];

/** Logic Equations **/

RAMOE = rwb & !(A15 & A14 & A13 & A12 & A11);

IO = A15 & A14 & A13 & A12 & A11 & !A10;

D0.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D1.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D2.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D3.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D4.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D5.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D6.oe   = A15 & A14 & A13 & A12 & A11 & A10;
D7.oe   = A15 & A14 & A13 & A12 & A11 & A10;
Table  Addr => Data {

/*   Radius   Perimeter  */
/*   ------   ---------  */
   'h'00 =>      'h'ad;
   'h'01 =>      'h'07;
   'h'02 =>   'h'f8;
   'h'03 =>   'h'30;             
   'h'04 =>   'h'fb;                           
   'h'05 =>   'h'a2;                           
   'h'06 =>   'h'20;                           
   'h'07 =>   'h'8e;                           
   'h'08 =>   'h'07;                           
   'h'09 =>   'h'f8;                           
   'h'0a =>   'h'ad;                           
   'h'0b =>   'h'07;                           
   'h'0c =>   'h'f8;                           
   'h'0d =>   'h'29;                           
   'h'0e =>   'h'08;                           
   'h'0f =>   'h'f0;                           
   'h'10 =>   'h'f9;                           
   'h'11 =>   'h'ad;                           
   'h'12 =>   'h'00;                           
   'h'13 =>   'h'f8;                           
   'h'14 =>   'h'9d;                           
   'h'15 =>   'h'e2;                           
   'h'16 =>   'h'bf;                           
   'h'17 =>   'h'e8;                           
   'h'18 =>   'h'd0;                           
   'h'19 =>   'h'f7;                           
   'h'1a =>   'h'4c;                           
   'h'1b =>   'h'02;                           
   'h'1c =>   'h'c0;                           
   'h'1d =>   'h'ff;                           
   'h'1e =>   'h'00;                           
   'h'1f =>   'h'02;                           
}

-----------------------------------------------------------
Code:
000000r 1               ;11/24/23
000000r 1               ;ROM in GAL22V10
000000r 1               ;boot from CF disk
000000r 1               ; CF is in native 16 bit mode
000000r 1               ; only the low byte contains meaningful program
000000r 1               ; read data from master boot sector
000000r 1               ;   execute the program in master boot sector to load more program
000000r 1               
000000r 1               ;copy (256-32) bytes file to 0xC002
000000r 1               
000000r 1               CFdata   = $f800       ;CF data register
000000r 1               CFerr   = $f801       ;CF error reg
000000r 1               CFsectcnt   = $f802       ;CF sector count reg
000000r 1               CF07   = $f803      ;CF LA0-7
000000r 1               CF815   = $f804          ;CF LA8-15
000000r 1               CF1623   = $f805          ;CF LA16-23
000000r 1               CF2427   = $f806          ;CF LA24-27
000000r 1               CFstat   = $f807          ;CF status/command reg
000000r 1               
000000r 1                  .ORG $ffc0
00FFC0  1               readbsy:
00FFC0  1  AD 07 F8        LDA CFstat   ;check for Busy (bit7) flag cleared
00FFC3  1  30 FB           BMI readbsy
00FFC5  1  A2 20           LDX #$20   ;issue read CF command and initialize X to $20
00FFC7  1  8E 07 F8        STX CFstat
00FFCA  1               chkdrq:
00FFCA  1  AD 07 F8        LDA CFstat   ;check data request bit set before read CF data
00FFCD  1  29 08           AND #8      ;bit 3 is DRQ, wait for it to set
00FFCF  1  F0 F9           BEQ chkdrq
00FFD1  1               getCFdata:
00FFD1  1  AD 00 F8        LDA CFdata
00FFD4  1  9D E2 BF        STA $bfe2,x   ;regX is $20, so program copied with $20 offset
00FFD7  1                        ;  starting from $c002.  This is allows NMI vector
00FFD7  1                        ;  to locate at $24C
00FFD7  1  E8              INX
00FFD8  1  D0 F7           BNE getCFdata
00FFDA  1  4C 02 C0        JMP $c002   ;OP code is $4C $02 $C0
00FFDD  1               ;adjust vectors to $200 for interrupt, $ffc0 for reset, and $24c for NMI
00FFDD  1  FF              .byte $ff
00FFDE  1  00 02           .word $200


The memory map is same as serial boot 22V10, the difference is the 32-byte ROM program. The program waits for CF Busy bit to clear, then sends CF read command ($20) and waits for CF's data FIFO to be loaded with contents of the master boot record; it then copies the contents of MBR to RAM starting from $c002 and runs it. Because I'm running out of the code space, the last instruction (JMP $c002) is part of reset vector and NMI vector. I have to do "STA $bfe2,x" at location $FFD4 to make it all work.

What's in the master boot record is the 2nd stage bootstrap. I'll talk about that next time.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 30, 2023 2:14 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1119
Location: Albuquerque NM USA
Monitor is still evolving, but current version is attached below. Part the monitor contains the 2nd stage bootstrap and a command to write the 2nd stage bootstrap to master boot record along with the monitor itself. This is the mechanism to evolve and update the monitor without switching out hardware. There is always the possibility of a mistake in new code that "brick" the hardware (not just a possibility, it happened a few times already), but I can always recover with the serial bootstrap or alternatively, use CF disk imaging tool to restore the latest working CF.

This snippet of code is the 2nd stage bootstrap that is written to master boot record. The CF is still in native cylinder-head-sector mode with 16-bit wide data bus, so each sector contains 256 16-bit word and sector number starts from 1 for MBR. Sector 2 is the beginning of the monitor code where upper byte of 16-bit word is discarded. This 2nd stage bootstrap copies sectors 2 to sector $d to $b400-$bfff and jump to $b400 to start the monitor.
Code:
   STZ $c0         ;set up ZP as pointer from CF to memory
   LDA #$b4      ;$b400 is starting of monitor
   STA $c1
   LDY #1         ;regY is always 1 to write to CF sector count reg
   LDX #2         ;start from sector 2
moresectx:
; zero page locations 0xc0 and 0xc1 are indirect index of address to be loaded
   STY CFsectcnt      ;sector count of 1
   STX CF07
   LDA #$20      ;read CF command
   STA CFstat
readdrqx:
   LDA CFstat      ;check not busy and data request bit set before read CF data
   BMI readdrqx      ;spin on BSY set
   AND #8         ;spin on DRQ
   BEQ readdrqx
blkx:
   LDA CFdata      ;CF is in native 16-bit mode, discard the upper byte
   STA ($c0)      ;save, starting from 0xB400
   INC $c0
   BNE blkx
   INC $c1         
   INX         ;next CF sector
   CPX #$e         ;copy up to $BFFF
   BNE moresectx
   JMP $b400      ;start location of CRCMon


So after reset, 6502 executes the bootstrap code in 22V10 which loads/runs 2nd stage bootstrap in master boot record, which then loads/run the monitor. Boom, a week of works happened in a second.
Attachment:
ROM22_CF_boot_monitor.jpg
ROM22_CF_boot_monitor.jpg [ 36.69 KiB | Viewed 17071 times ]


Attachments:
ROM22Mon_rev02.zip [8.18 KiB]
Downloaded 80 times
Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 30, 2023 6:08 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
After burning your boot code into the GAL, how much is left in the way of logic resources?

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 01, 2023 1:00 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1119
Location: Albuquerque NM USA
I've used up all 10 outputs of 22V10 so there are no spare output pins. In terms of sum-of-products utilization, the answer is less clear. As you know, 22V10 product terms can vary from 8 to 16 depending on the pin assigned. For the 8 data pins, I've picked the pins with most product terms to represent them. Here is a table of product terms utilization for 32 bytes of serial boot ROM and CF boot ROM.


Code:
Pin#   product   signal      serial      CF
      terms      names      boot      boot
15      10         D0      7         7
16      12         D1      5         9
17      14         D2      7         8
18      16         D3      10         10
19      16         D5      9         10
20      14         D7      11         11
21      12         D6      8         9
22      10         D4      8         9



Even though program size is the same (32 bytes), the sum-of-products utilization is different as determined by the contents of the 32 bytes. For both cases, D7 used relatively large number of product terms (11). At one time D7 was assigned to pin 22 which only has 10 product terms so it didn't fit. I have to move the pins around in order to fit 32-byte ROM program. It seems to me a larger program is possible if I'm willing to move the pin assignments around. The two pins with 10 product terms (pins 15, 22) may be the limiting factor, depending on the contents of the program.
Bill
Edit, I have a bad feeling the sum-of-product table won't work consistently across different browsers, so here is a picture of the above table
Attachment:
Sum of products utilization for CFboot and Serial boot.jpg
Sum of products utilization for CFboot and Serial boot.jpg [ 35.14 KiB | Viewed 17015 times ]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: