REMINDER - Stay logged in for at least 2 hours a week to get whitelisted.
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)

ATF16v8 for 2.06 decoding

Problems with your machine in general.
User avatar
olivier.jan
Site sponsor
Site sponsor
Posts: 339
Joined: 01 Jun 2020 08:00

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: 28404
Joined: 16 Aug 2017 23:19
Location: UK

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 ..
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7393
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

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: 28404
Joined: 16 Aug 2017 23:19
Location: UK

Re: ATF16v8 for 2.06 decoding

Post by exxos »

stephen_usher wrote: 13 Mar 2021 15:10 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 ...
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7393
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

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
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.
You do not have the required permissions to view the files attached to this post.
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
Site sponsor
Site sponsor
Posts: 339
Joined: 01 Jun 2020 08:00

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
Site sponsor
Site sponsor
Posts: 339
Joined: 01 Jun 2020 08:00

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
You do not have the required permissions to view the files attached to this post.
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: 7456
Joined: 23 Mar 2018 20:22

Re: ATF16v8 for 2.06 decoding

Post by PhilC »

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

Return to “HARDWARE ISSUES”

Who is online

Users browsing this forum: ClaudeBot and 4 guests