Can I get some help converting the attached .bin files (from PAL16L8) to jedec I can burn into GAL16V8A?
I couldn't get an error free conversion out of them.
Attached whatever is available for this, nothing more.
Or even better if it is possible to burn 2x PAL16L8s (My programmer can't deal with them) I can send them to you, covering all costs, etc.
I'm stuck, so everything would be helpful at this point.
Thanks.
Robson
Re: Help: PAL TO GAL
Posted: 16 Mar 2025 18:42
by 6502addict
Recently Ia asked a IA engine (Claude Sonnet) to reverse engineer a GAL from the jedec ?
it produced an Abel File, A Wincupl file and even a source in VHDL
perhaps that you can reverse engineer your PAL
and from the wincupl burn a suitable GAL
Re: Help: PAL TO GAL
Posted: 16 Mar 2025 18:55
by 6502addict
your BI-O.bin in wincupl
Name BI_IO;
PartNo 00;
Date 16/03/2025;
Revision 01;
Designer Engineer;
Company Vintage Computer;
Assembly None;
Location None;
Device G16V8;
/* *************** INPUT PINS *********************/
PIN 1 = A0; /* Address bit 0 */
PIN 2 = A1; /* Address bit 1 */
PIN 3 = A2; /* Address bit 2 */
PIN 4 = A3; /* Address bit 3 */
PIN 5 = A4; /* Address bit 4 */
PIN 6 = A5; /* Address bit 5 */
PIN 7 = A6; /* Address bit 6 */
PIN 8 = A7; /* Address bit 7 */
PIN 9 = DIR; /* Direction control (0=read, 1=write) */
PIN 11 = !CS; /* Chip Select (active low) */
/* Define operations */
READ = !DIR & !CS; /* Read operation when DIR=0 and CS active */
WRITE = DIR & !CS; /* Write operation when DIR=1 and CS active */
/* In write mode, I/O pins are controlled externally *
your BI-O.bin in vhdl
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity BI_IO is
Port (
A : in STD_LOGIC_VECTOR(7 downto 0); -- Address bus
DIR : in STD_LOGIC; -- Direction control (0=read, 1=write)
nCS : in STD_LOGIC; -- Chip select (active low)
IO : inout STD_LOGIC_VECTOR(7 downto 0) -- Bidirectional I/O
);
end BI_IO;
architecture Behavioral of BI_IO is
signal READ : STD_LOGIC;
signal WRITE : STD_LOGIC;
begin
-- Define control signals
READ <= '1' when (DIR = '0' and nCS = '0') else '0';
WRITE <= '1' when (DIR = '1' and nCS = '0') else '0';
-- Bidirectional I/O control
-- In READ mode (DIR=0), drive data from address bus to I/O pins
-- In WRITE mode (DIR=1), I/O pins are inputs (data flows from external sources)
IO <= A when READ = '1' else (others => 'Z');
-- Note: No need to explicitly handle external data coming in during WRITE mode
-- as the tri-state operation handles this automatically
end Behavioral;
your BI-MEM in WINCUPL
Name BI_MEM;
PartNo 00;
Date 16/03/2025;
Revision 01;
Designer Engineer;
Company Vintage Computer;
Assembly None;
Location None;
Device G16V8;
/* Define memory regions */
FIELD ADDRESS = [A15..A8];
/* Define memory map:
ROM: 0x0000-0x7FFF (32KB)
RAM: 0x8000-0xFFFF (32KB)
*/
ROM_REGION = !A15; /* ROM is in lower half of memory space */
RAM_REGION = A15; /* RAM is in upper half of memory space */
/* Memory chip select logic */
ROM_CS = ROM_REGION & !MREQ; /* ROM selected when in ROM region & MREQ active */
RAM_CS = RAM_REGION & !MREQ; /* RAM selected when in RAM region & MREQ active */
/* Memory control signals */
ROM_OE = ROM_REGION & READ; /* ROM output enable during reads from ROM region */
ROM_WE = ROM_REGION & WRITE; /* ROM write enable during writes to ROM region */
RAM_OE = RAM_REGION & READ; /* RAM output enable during reads from RAM region */
RAM_WE = RAM_REGION & WRITE; /* RAM write enable during writes to RAM region */
/* Global memory enable signal */
MEMEN = !MREQ; /* Memory enabled when MREQ is active */
your BI-MEM in VHDL
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity BI_MEM is
Port (
A : in STD_LOGIC_VECTOR(15 downto 8); -- High address bits
nMREQ : in STD_LOGIC; -- Memory request (active low)
nRD : in STD_LOGIC; -- Read signal (active low)
nWR : in STD_LOGIC; -- Write signal (active low)
nROM_CS : out STD_LOGIC; -- ROM chip select (active low)
nRAM_CS : out STD_LOGIC; -- RAM chip select (active low)
nROM_OE : out STD_LOGIC; -- ROM output enable (active low)
nROM_WE : out STD_LOGIC; -- ROM write enable (active low)
nRAM_OE : out STD_LOGIC; -- RAM output enable (active low)
nRAM_WE : out STD_LOGIC; -- RAM write enable (active low)
nMEMEN : out STD_LOGIC -- Memory enable (active low)
);
end BI_MEM;
architecture Behavioral of BI_MEM is
-- Memory region signals
signal ROM_REGION : STD_LOGIC;
signal RAM_REGION : STD_LOGIC;
-- Operation type signals
signal READ : STD_LOGIC;
signal WRITE : STD_LOGIC;
begin
-- Define memory regions based on address space
-- ROM: 0x0000-0x7FFF (32KB)
-- RAM: 0x8000-0xFFFF (32KB)
ROM_REGION <= not A(15); -- ROM is in lower half of memory space
RAM_REGION <= A(15); -- RAM is in upper half of memory space
-- Define operation types
READ <= '1' when (nMREQ = '0' and nRD = '0') else '0';
WRITE <= '1' when (nMREQ = '0' and nWR = '0') else '0';
-- Memory chip select logic
nROM_CS <= '0' when (ROM_REGION = '1' and nMREQ = '0') else '1';
nRAM_CS <= '0' when (RAM_REGION = '1' and nMREQ = '0') else '1';
-- Memory control signals
nROM_OE <= '0' when (ROM_REGION = '1' and READ = '1') else '1';
nROM_WE <= '0' when (ROM_REGION = '1' and WRITE = '1') else '1';
nRAM_OE <= '0' when (RAM_REGION = '1' and READ = '1') else '1';
nRAM_WE <= '0' when (RAM_REGION = '1' and WRITE = '1') else '1';
-- Global memory enable
nMEMEN <= nMREQ; -- Memory enabled when MREQ is active
end Behavioral;
if you don't find anybody near you I can burn them
Re: Help: PAL TO GAL
Posted: 16 Mar 2025 21:05
by Robson
Thank you for the quick reply.
Pin 10 can't be RD or any function since it's gnd.
(BI-MEM)
"PIN 10 = !RD; /* Read signal (active low) */"
The problem with AI for files like this is they lie. They say they can convert them and spit out files that look viable, sometimes they even assemble but they are not logically correct.
The problem is there are just not enough example CUPL / AHDL to train correctly
Re: Help: PAL TO GAL
Posted: 17 Mar 2025 11:07
by Robson
I used AI to generate the pld files, then manually corrected them to the above pinout and added comments to take those lines out. I assume the script runs fine so funcions won't change. I fed these 2 files to Wincupl to generate the jedec files.
I had to change the device to G16V8A though since PAL16L8 is not available in the Wincupl library (it gives an error if I use PAL16L8).
To find out if it is actually working try a binary where you have the source code. See if it will reproduce identical code
Re: Help: PAL TO GAL
Posted: 25 Mar 2025 19:21
by Robson
I've managed to do a lot of research/sweating/swearing/testing and finally got it working.
Also, the srcipt's outputs were not 100% accurate so it was good to be able to test them here immediately.
But the main thing is that the result is a fully working STBook test cart (based on sarnau's project - with a redesigned connector and basically a redraw the whole thing).
In action( a bit long video - I missed that it was waiting for me to bypass the errors).