CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: Porchy on 22:34, 03 December 13

Title: Amstrad 6128 HAL/PAL16L8 chip
Post by: Porchy on 22:34, 03 December 13
Following on from my intro thread im now pleased to announce that my HAL16L8 chip recreation is ready for release.
The file is ready to be programmed to a GAL16V8 device and is a drop in replacement with no mods being required.

I have tested this with the following:
The Addams Family
Robocop (with speech)
Pac-Man emulator
Orion Prime.
various other original titles that I got with the system.

No problems encountered at all
I have NOT tested this with any external expansions. When Bryce gets time I think he will do the testing on everything he has and report any issues.

If anyone in the UK requires one of these and cannot program it themselves then I can provide a programmed chip.
Also, the equations that ive created are in no way a secret and will gladly give them to anyone that wants them or if someone want to include it in the wiki then please do

I would like to thank the following people:
arnoldemu for his truth tables, they saved me heaps of time
Charles MacDonald for discovering that latches were being used somewhere
TotO for sending me his chip to start working with
Anyone else that may provide feedback in the future.

Enjoy
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: TFM on 22:38, 03 December 13
WoW!!!!!!! That's amazing!!!!!!!!!!!!  :) :) :)
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Bryce on 22:42, 03 December 13
I can also program them for people on this side of the water if needed.

Bryce.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: TFM on 04:05, 04 December 13
You mean north of the lake Chiemsee?  ;)
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: IanS on 21:21, 06 December 13
Also, the equations that ive created are in no way a secret and will gladly give them to anyone that wants them or if someone want to include it in the wiki then please do
Can you post the equations in here?
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Porchy on 21:29, 06 December 13
A15OUT = (!X2 & !X1 & A14
     # !X3 & !X2 & A14
     # A15);

!X1 = (!A15 & D7ANDD6 & RESET & !IOWR & D0
     # !X1 & RESET & IOWR
     # !X1 & !D7ANDD6 & RESET
     # !X1 & A15 & RESET);

!X2 = (!A15 & D7ANDD6 & RESET & !IOWR & D1
     # !X2 & RESET & IOWR
     # !X2 & !D7ANDD6 & RESET
     # !X2 & A15 & RESET);

!X3 = (!A15 & D7ANDD6 & RESET & !IOWR & D2
     # !X3 & RESET & IOWR
     # !X3 & !D7ANDD6 & RESET
     # !X3 & A15 & RESET);

!CAS1 = (X3 & !X1 & A15 & A14 & !NCAS & !RAMDIS & !CPU & CAS0
     # !X3 & !A15 & A14 & !NCAS & !RAMDIS & !CPU & CAS0
     # X3 & !X2 & X1 & !NCAS & !RAMDIS & !CPU & CAS0
     # !NCAS & CAS0 & !CAS1);

!CAS0 = (X3 & X2 & X1 & !NCAS & !RAMDIS & CAS1
     # X3 & !X1 & !A15 & !NCAS & !RAMDIS & CAS1
     # !X3 & A15 & !NCAS & !RAMDIS & CAS1
     # !X1 & !A14 & !NCAS & !RAMDIS & CAS1
     # !X3 & !A14 & !NCAS & !RAMDIS & CAS1
     # !NCAS & !RAMDIS & CPU & CAS1
     # !NCAS & !CAS0 & CAS1);

A14OUT = (A15 & A14
     # !X1 & A14
     # X3 & A14);
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Bryce on 16:46, 10 December 13
Hi Porchy,
       just wanted to confirm: I programmed a GAL16V8D-15QPN and stuck it in a spare 6128 (MC0023C). So far all fine, everything seems to work as normal. I'll leave it in for a few weeks and see if it ever causes a problem, but for now I'd say mission accomplished :) Great work.

Bryce.

The proof:

Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Porchy on 19:06, 10 December 13
Thanks for testing. I was a bit nervous opening the page when I got notification in case something had gone wrong  ;)
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Bryce on 22:47, 10 December 13
Na, you're too negative. I was pretty confident that your work would be good. I have 2 or 3 other 6128 PCBs. I'll check what version they are and test them too if they are different. Then you can tick off which ones have been tested till all versions have been tried. If anybody wants one of these, then let me know (PM).

Bryce.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Porchy on 22:58, 10 December 13
Na, you're too negative. I was pretty confident that your work would be good. I have 2 or 3 other 6128 PCBs. I'll check what version they are and test them too if they are different. Then you can tick off which ones have been tested till all versions have been tried. If anybody wants one of these, then let me know (PM).

Bryce.

Your right, Ive never had much faith in my own abilities until quite recently and ive got the good people of the internet to thank for that really.

Have you tested the expansion hardware with it too? Thats my main concern right now.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Bryce on 23:24, 10 December 13
No, I only had an hour free today. But that's why I left it in the machine. I'll give it a serious testing over time, but I doubt I'll find any fault.

Bryce.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: arnoldemu on 23:32, 10 December 13
@Bryce,great avatar!
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Bryce on 23:39, 10 December 13
@Bryce,great avatar!

I felt I needed to express my Christmas spirit[nb]I hate Christmas[/nb] :D It's also explains why I don't comment in the repaint / graphic enhancement threads :)

Bryce.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Bryce on 14:57, 12 December 13
Last night I took a look at what it would take to convert a 464 into a true 100% 6128 compatible 128K machine using this new GAL. My idea was to make a board that would plug under the Z80, as most of the required signals are available there. Although it is possible, it would unfortunately be a very messy mod, involving track cutting to implement the A14out, A15out and CAS0. It would also need quite a few fly-leads soldered to other spots on the board for the signals that aren't available on the Z80 socket (RAMDIS, IOWR, A14out, A15out, CAS0, NCAS and /CPU).

Bryce.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: arnoldemu on 15:09, 12 December 13
I have created a page on the wiki with Porchy's JED and equations.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Porchy on 19:36, 12 December 13
Last night I took a look at what it would take to convert a 464 into a true 100% 6128 compatible 128K machine using this new GAL. My idea was to make a board that would plug under the Z80, as most of the required signals are available there. Although it is possible, it would unfortunately be a very messy mod, involving track cutting to implement the A14out, A15out and CAS0. It would also need quite a few fly-leads soldered to other spots on the board for the signals that aren't available on the Z80 socket (RAMDIS, IOWR, A14out, A15out, CAS0, NCAS and /CPU).

Bryce.


I just got my hands on a 464 yesterday and came to a similar conclusion. Shame but may mock something up to determine how messy a mod would be.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: TotO on 19:36, 12 December 13
it would unfortunately be a very messy mod, involving track cutting to implement the A14out, A15out and CAS0. It would also need quite a few fly-leads soldered to other spots on the board for the signals that aren't available on the Z80 socket (RAMDIS, IOWR, A14out, A15out, CAS0, NCAS and /CPU).
It's why, it's not really a good idea. Better to find a 6128 and keep the 464 save of hack.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: gerald on 22:10, 03 October 15
Thread resurrection !

I've had a look at the issue using the GAL in the following thread : New yerar, new CPC board (http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/new-yerar-new-cpc-board/msg106955/#msg106955)
The problem also happen on a regular CPC6128 using the GAL instead of the orginal PAL and a memory extension.

The problem is caused by the handling of RAMDIS, which in the GAL version mask a part of the video fetch (hence the artefact).

I've updated the PAL wiki page (http://www.cpcwiki.eu/index.php/PAL16L8) with a fixed version which I've tested on a 6128 with and without a memory extension (XMEM and my own RAM extension).
Test where done with custom memory test (test C3/C4-C7 mode) and few game/demo (Orion prime/Phortem/Still rising/Pacman/Rtype)

For reference, the new equations are :
Code: [Select]
A14OUT     = !(  !A14
              #   !A15 & !Q0 & Q2 );

A15OUT     = !(  !A15 & !A14
              #   !A15 & !Q1
              #   !A15 & !Q0 & !Q2 );

Q0     = (  D7ANDD6 & nRESET & D0 & !A15 & !nIOWR
          #   !D7ANDD6 & nRESET & Q0
          #   nRESET & A15 & Q0
          #   nRESET & nIOWR & Q0 );

Q1     = (  D7ANDD6 & nRESET & D1 & !A15 & !nIOWR
          #   !D7ANDD6 & nRESET & Q1
          #   nRESET & A15 & Q1
          #   nRESET & nIOWR & Q1 );

Q2     = (  D7ANDD6 & nRESET & D2 & !A15 & !nIOWR
          #   !D7ANDD6 & nRESET & Q2
          #   nRESET & A15 & Q2
          #   nRESET & nIOWR & Q2 );

nCAS0     = (  nCAS
             #   RAMDIS & !nCPU & nCAS0
             #   !A15 & A14 & !nCPU & Q2 & nCAS0
             #   A15 & A14 & !nCPU & Q0 & !Q2 & nCAS0
             #   !nCPU & !Q0 & Q1 & !Q2 & nCAS0
             #   !nCAS1 );

nCAS1     = !(  !RAMDIS & !nCAS & !A15 & A14 & !nCPU & Q2 & nCAS0
             #   !RAMDIS & !nCAS & A15 & A14 & !nCPU & Q0 & !Q2 & nCAS0
             #   !RAMDIS & !nCAS & !nCPU & !Q0 & Q1 & !Q2 & nCAS0
             #   !nCAS & !A15 & A14 & Q2 & nCAS0 & !nCAS1
             #   !nCAS & A15 & A14 & Q0 & !Q2 & nCAS0 & !nCAS1
             #   !nCAS & !Q0 & Q1 & !Q2 & nCAS0 & !nCAS1 );
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Munchausen on 12:31, 04 October 15
Thread resurrection !

I've had a look at the issue using the GAL in the following thread : New yerar, new CPC board (http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/new-yerar-new-cpc-board/msg106955/#msg106955)
The problem also happen on a regular CPC6128 using the GAL instead of the orginal PAL and a memory extension.

The problem is caused by the handling of RAMDIS, which in the GAL version mask a part of the video fetch (hence the artefact).

I've updated the PAL wiki page (http://www.cpcwiki.eu/index.php/PAL16L8) with a fixed version which I've tested on a 6128 with and without a memory extension (XMEM and my own RAM extension).
Test where done with custom memory test (test C3/C4-C7 mode) and few game/demo (Orion prime/Phortem/Still rising/Pacman/Rtype)

For reference, the new equations are :
Code: [Select]
A14OUT     = !(  !A14
              #   !A15 & !Q0 & Q2 );

A15OUT     = !(  !A15 & !A14
              #   !A15 & !Q1
              #   !A15 & !Q0 & !Q2 );

Q0     = (  D7ANDD6 & nRESET & D0 & !A15 & !nIOWR
          #   !D7ANDD6 & nRESET & Q0
          #   nRESET & A15 & Q0
          #   nRESET & nIOWR & Q0 );

Q1     = (  D7ANDD6 & nRESET & D1 & !A15 & !nIOWR
          #   !D7ANDD6 & nRESET & Q1
          #   nRESET & A15 & Q1
          #   nRESET & nIOWR & Q1 );

Q2     = (  D7ANDD6 & nRESET & D2 & !A15 & !nIOWR
          #   !D7ANDD6 & nRESET & Q2
          #   nRESET & A15 & Q2
          #   nRESET & nIOWR & Q2 );

nCAS0     = (  nCAS
             #   RAMDIS & !nCPU & nCAS0
             #   !A15 & A14 & !nCPU & Q2 & nCAS0
             #   A15 & A14 & !nCPU & Q0 & !Q2 & nCAS0
             #   !nCPU & !Q0 & Q1 & !Q2 & nCAS0
             #   !nCAS1 );

nCAS1     = !(  !RAMDIS & !nCAS & !A15 & A14 & !nCPU & Q2 & nCAS0
             #   !RAMDIS & !nCAS & A15 & A14 & !nCPU & Q0 & !Q2 & nCAS0
             #   !RAMDIS & !nCAS & !nCPU & !Q0 & Q1 & !Q2 & nCAS0
             #   !nCAS & !A15 & A14 & Q2 & nCAS0 & !nCAS1
             #   !nCAS & A15 & A14 & Q0 & !Q2 & nCAS0 & !nCAS1
             #   !nCAS & !Q0 & Q1 & !Q2 & nCAS0 & !nCAS1 );

This is great, nice work Gerald! How about a CPLD version of the gate array now? Hehe
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: gerald on 14:11, 04 October 15
This is great, nice work Gerald! How about a CPLD version of the gate array now? Hehe
That's a bit more tricky, and I thing we may end up using obsolete part as well  ;D
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Munchausen on 17:48, 04 October 15
I actually looked at the Xilinx XC9500XL, and if you used an I2C D2A for the video signals, you have exactly the right number of IO pins. Of course, discovering this was the easy part...
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: TotO on 17:57, 04 October 15
XL are 3.3V only... Better to use 5V versions if possible.
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Porchy on 18:23, 04 October 15
Thread resurrection !

I've had a look at the issue using the GAL in the following thread : New yerar, new CPC board (http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/new-yerar-new-cpc-board/msg106955/#msg106955)
The problem also happen on a regular CPC6128 using the GAL instead of the orginal PAL and a memory extension.

The problem is caused by the handling of RAMDIS, which in the GAL version mask a part of the video fetch (hence the artefact).

I've updated the PAL wiki page (http://www.cpcwiki.eu/index.php/PAL16L8) with a fixed version which I've tested on a 6128 with and without a memory extension (XMEM and my own RAM extension).
Test where done with custom memory test (test C3/C4-C7 mode) and few game/demo (Orion prime/Phortem/Still rising/Pacman/Rtype)

For reference, the new equations are :
Code: [Select]
A14OUT     = !(  !A14
              #   !A15 & !Q0 & Q2 );

A15OUT     = !(  !A15 & !A14
              #   !A15 & !Q1
              #   !A15 & !Q0 & !Q2 );

Q0     = (  D7ANDD6 & nRESET & D0 & !A15 & !nIOWR
          #   !D7ANDD6 & nRESET & Q0
          #   nRESET & A15 & Q0
          #   nRESET & nIOWR & Q0 );

Q1     = (  D7ANDD6 & nRESET & D1 & !A15 & !nIOWR
          #   !D7ANDD6 & nRESET & Q1
          #   nRESET & A15 & Q1
          #   nRESET & nIOWR & Q1 );

Q2     = (  D7ANDD6 & nRESET & D2 & !A15 & !nIOWR
          #   !D7ANDD6 & nRESET & Q2
          #   nRESET & A15 & Q2
          #   nRESET & nIOWR & Q2 );

nCAS0     = (  nCAS
             #   RAMDIS & !nCPU & nCAS0
             #   !A15 & A14 & !nCPU & Q2 & nCAS0
             #   A15 & A14 & !nCPU & Q0 & !Q2 & nCAS0
             #   !nCPU & !Q0 & Q1 & !Q2 & nCAS0
             #   !nCAS1 );

nCAS1     = !(  !RAMDIS & !nCAS & !A15 & A14 & !nCPU & Q2 & nCAS0
             #   !RAMDIS & !nCAS & A15 & A14 & !nCPU & Q0 & !Q2 & nCAS0
             #   !RAMDIS & !nCAS & !nCPU & !Q0 & Q1 & !Q2 & nCAS0
             #   !nCAS & !A15 & A14 & Q2 & nCAS0 & !nCAS1
             #   !nCAS & A15 & A14 & Q0 & !Q2 & nCAS0 & !nCAS1
             #   !nCAS & !Q0 & Q1 & !Q2 & nCAS0 & !nCAS1 );


Superb! Thank you
Ill update my list too
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Munchausen on 22:19, 04 October 15
XL are 3.3V only... Better to use 5V versions if possible.

Yeah there is a 5V part. Though the 3.3V versions are 5V compatible... not sure how compatible!
Title: Re: Amstrad 6128 HAL/PAL16L8 chip
Post by: Kris on 22:59, 10 October 15
I just upgrade/update the GAL in my 6128; everything seems OK even after 2 hours watching demos :)
Nice job !