Author Topic: Amstrad 6128 HAL/PAL16L8 chip  (Read 5085 times)

0 Members and 1 Guest are viewing this topic.

Offline Porchy

  • CPC464
  • **
  • Posts: 18
  • Country: gb
    • JAMMArcade.net
  • Liked: 35
  • Likes Given: 4
Amstrad 6128 HAL/PAL16L8 chip
« 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

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
  • Likes Given: 4650
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #1 on: 22:38, 03 December 13 »
WoW!!!!!!! That's amazing!!!!!!!!!!!!  :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.878
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3823
  • Likes Given: 391
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #2 on: 22:42, 03 December 13 »
I can also program them for people on this side of the water if needed.

Bryce.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
  • Likes Given: 4650
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #3 on: 04:05, 04 December 13 »
You mean north of the lake Chiemsee?  ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline IanS

  • CPC6128
  • ****
  • Posts: 195
  • Country: gb
    • index.php?action=treasury
  • Liked: 50
  • Likes Given: 42
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #4 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?

Offline Porchy

  • CPC464
  • **
  • Posts: 18
  • Country: gb
    • JAMMArcade.net
  • Liked: 35
  • Likes Given: 4
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #5 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);

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.878
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3823
  • Likes Given: 391
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #6 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:

« Last Edit: 16:50, 10 December 13 by Bryce »

Offline Porchy

  • CPC464
  • **
  • Posts: 18
  • Country: gb
    • JAMMArcade.net
  • Liked: 35
  • Likes Given: 4
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #7 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  ;)

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.878
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3823
  • Likes Given: 391
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #8 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.

Offline Porchy

  • CPC464
  • **
  • Posts: 18
  • Country: gb
    • JAMMArcade.net
  • Liked: 35
  • Likes Given: 4
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #9 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.

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.878
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3823
  • Likes Given: 391
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #10 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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #11 on: 23:32, 10 December 13 »
@Bryce,great avatar!
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.878
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3823
  • Likes Given: 391
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #12 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.
« Last Edit: 23:41, 10 December 13 by Bryce »

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.878
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3823
  • Likes Given: 391
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #13 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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #14 on: 15:09, 12 December 13 »
I have created a page on the wiki with Porchy's JED and equations.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Porchy

  • CPC464
  • **
  • Posts: 18
  • Country: gb
    • JAMMArcade.net
  • Liked: 35
  • Likes Given: 4
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #15 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.

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.314
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2531
  • Likes Given: 1481
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #16 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.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.371
  • Liked: 973
  • Likes Given: 244
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #17 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
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 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 );

Offline Munchausen

  • 6128 Plus
  • ******
  • Posts: 772
  • Country: gb
  • Liked: 211
  • Likes Given: 215
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #18 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
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 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

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.371
  • Liked: 973
  • Likes Given: 244
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #19 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

Offline Munchausen

  • 6128 Plus
  • ******
  • Posts: 772
  • Country: gb
  • Liked: 211
  • Likes Given: 215
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #20 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...

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.314
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2531
  • Likes Given: 1481
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #21 on: 17:57, 04 October 15 »
XL are 3.3V only... Better to use 5V versions if possible.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline Porchy

  • CPC464
  • **
  • Posts: 18
  • Country: gb
    • JAMMArcade.net
  • Liked: 35
  • Likes Given: 4
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #22 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
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 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

Offline Munchausen

  • 6128 Plus
  • ******
  • Posts: 772
  • Country: gb
  • Liked: 211
  • Likes Given: 215
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #23 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!

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 547
  • Country: fr
  • Team Impact
  • Liked: 208
  • Likes Given: 790
Re: Amstrad 6128 HAL/PAL16L8 chip
« Reply #24 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 !