ATF16v8 for 2.06 decoding

Problems with your machine in general.
Post Reply
User avatar
olivier.jan
Posts: 214
Joined: Mon Jun 01, 2020 8:00 am

ATF16v8 for 2.06 decoding

Post by olivier.jan »

I haven't managed to do a proper address decoder for TOS 2.06 using an ATF16v8b and I'm not too sure why.
The exact same code (down to the PIN numbers) works flawlessly with an ATF22v10C, but with a 16v8 the machine (an H5) doesn't boot and stays on a very colourful screen.
The only difference I've found between the two GALs is that the 16v8 has a weak pull-up to VCC on all pins while the 22v10 hasn't.
If anyone has a clue on the issue, I have a stock of 16v8 and only a few 22v10.
I simply connect the GAL directly to the CPU socket and the ROM2 signal (JP13 on the H5).

Here is the pretty simple code:

Code: Select all

Name     STROMDEC ;
PartNo   00 ;
Date     12/23/2020 ;
Revision 01 ;
Designer Olivier ;
Company  home ;
Assembly None ;
Location home ;
Device   g22v10 ;



/* *************** CONNECTIONS *******************  */
/* ATARI A23..A16 = GAL 1..8                        */ 
/* ATARI AS       = GAL 9                           */ 
/* ATARI RW       = GAL 13                          */ 
/* ATARI ROM2     = GAL 14                          */ 
/* ATARI DTACK    = GAL 17                          */ 
/* ROM CE         = GAL 15                          */ 
/* ************************************************ */ 


/* *************** INPUT PINS ******************** */

PIN   [1..8] = [A16..23] ;
PIN      9   = !AS ;
PIN      13  = RW ;
PIN      14  = !ROM2 ;

/* *************** OUTPUT PINS ******************** */

PIN      17  = !DTACK ;
PIN      18  = !CE ;

FIELD TOS = [A23..16];

/* *************** DECLARATIONS AND INTERMEDIATE VARIABLE DEFINITIONS ******************** */

CE256 =  RW & AS & TOS:'h'[E00000..E3FFFF] ;


/* *************** ROM DECODER ******************** */

DTACK = CE256 ;
DTACK.oe = CE256 ;
CE    = CE256 # ROM2 ;
Retro stuff
520 STF/ 1040 STE / Mega ST / 2 Mega STE / 2 H5
2 x 600XL with U1MB /SOFIA 2/ AVG CART / and a few 1050
Apple //c, Commodore 128, Mac Classic, SE/30, LC, IIvi and PB G3 (Clamshell)
Amiga 600 and a few 486 and 386.
Many Nintendo G&W and other electronic games from the late 70s/early 80s.
User avatar
exxos
Site Admin
Site Admin
Posts: 23795
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: ATF16v8 for 2.06 decoding

Post by exxos »

I'm not 100% sure, but the 16v8 does not have tristate outputs ?

Edit: there are also some odd bugs that you shouldn't control OE and the variable with the same event...

You should have something like

DTACK = 'B'0;
DTACK.OE = CE256;

Or define DTACK as open collector in atmel options..

EDIT2:
Also be aware of the number of logic terms per pin.. They vary from 6-14 ( dont remember exactly offhand ) depending which output pin you are using..

A16-23 is 8 terms, plus AS & RW = 10 terms ..
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
stephen_usher
Posts: 5678
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: ATF16v8 for 2.06 decoding

Post by stephen_usher »

Indeed, it's not tri-state, so I had to use a 74LS transceiver in my decode circuit for the bus interface.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
exxos
Site Admin
Site Admin
Posts: 23795
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: ATF16v8 for 2.06 decoding

Post by exxos »

stephen_usher wrote: Sat Mar 13, 2021 3:10 pm Indeed, it's not tri-state, so I had to use a 74LS transceiver in my decode circuit for the bus interface.
Could work around DTACK and just drive it with a diode ...
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
stephen_usher
Posts: 5678
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: ATF16v8 for 2.06 decoding

Post by stephen_usher »

Here's my schematic. (Note that I have the ROM on the same board as the decoder and it has the ability to switch between ROM images in a 512K ROM or use the whole ROM.)

_ROE is the ROM /OE line.
ROM-decode.jpg
ROM-decode.jpg (94.04 KiB) Viewed 2339 times
And here's my GAL code:

Code: Select all

Name     TOS 2.06 ROM decoder (512K) ;
PartNo   00 ;
Date     24/10/2020 ;
Revision 01 ;
Designer Engineer ;
Company  Personal ;
Assembly None ;
Location  ;
Device   g16v8 ;

/* *************** INPUT PINS *********************/
PIN  1   =  A18                       ; /*                                 */ 
PIN  2   =  A19                       ; /*                                 */ 
PIN  3   =  A20                       ; /*                                 */ 
PIN  4   =  A21                       ; /*                                 */ 
PIN  5   =  A22                       ; /*                                 */ 
PIN  6   =  A23                       ; /*                                 */ 
PIN  7   =  !ROM2                       ; /*                                 */ 
PIN  8   =  !AS                       ; /*                                 */ 
PIN  9   =  RW                       ; /*                                 */ 

/* *************** OUTPUT PINS *********************/
PIN  19   =  !ROE                       ; /*                                 */ 



SELECTED=RW & AS & !A19 & !A20 & A21 & A22 & A23;

ROE=SELECTED # ROM2;

P.S. The 74LS244 is also useful for delaying /DTACK slightly so as to make sure that the output from the ROM is stable on the bus, as per the timing diagram.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
olivier.jan
Posts: 214
Joined: Mon Jun 01, 2020 8:00 am

Re: ATF16v8 for 2.06 decoding

Post by olivier.jan »

Thanks a lot, I was really thinking the 16v8 was just a smaller version of 22v10, but clearly the features are different and tri-state doesn’t behave in the same way. I’ll use a 22v10 this time and will use a 16v8 + LS244 next time.
Retro stuff
520 STF/ 1040 STE / Mega ST / 2 Mega STE / 2 H5
2 x 600XL with U1MB /SOFIA 2/ AVG CART / and a few 1050
Apple //c, Commodore 128, Mac Classic, SE/30, LC, IIvi and PB G3 (Clamshell)
Amiga 600 and a few 486 and 386.
Many Nintendo G&W and other electronic games from the late 70s/early 80s.
User avatar
olivier.jan
Posts: 214
Joined: Mon Jun 01, 2020 8:00 am

Re: ATF16v8 for 2.06 decoding

Post by olivier.jan »

Clearly the 22v10 is easier, took me less than one hour to get it working properly on a perfboard.
77401D0D-9C2F-4A45-800F-7DFB28A30456.jpeg
77401D0D-9C2F-4A45-800F-7DFB28A30456.jpeg (179.21 KiB) Viewed 2295 times
Retro stuff
520 STF/ 1040 STE / Mega ST / 2 Mega STE / 2 H5
2 x 600XL with U1MB /SOFIA 2/ AVG CART / and a few 1050
Apple //c, Commodore 128, Mac Classic, SE/30, LC, IIvi and PB G3 (Clamshell)
Amiga 600 and a few 486 and 386.
Many Nintendo G&W and other electronic games from the late 70s/early 80s.
User avatar
PhilC
Moderator
Moderator
Posts: 6039
Joined: Fri Mar 23, 2018 8:22 pm

Re: ATF16v8 for 2.06 decoding

Post by PhilC »

@olivier.jan nicely done.
If it ain't broke, test it to Destruction.
Post Reply

Return to “HARDWARE ISSUES”