Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

OldStuff

macrumors newbie
Original poster
Oct 11, 2022
5
0
I can get my fat mac 512k to work with floppy emu but not a real drive. I probed the lines to identify why the floppy emu worked, but the actual hardware did not. I determined the ASG was not generating a PWM. There is continuity between the ASG and pin 10 of the DB19 connector. However, there is no PWM signal.

It will be difficult to source an ASG chip, so I wonder if anyone knows of a datasheet for the IC. Or if anyone has specifics about the commands from the 68k to the ASG. If I know the 6-bit binary commands, I can reproduce the PWM with a small microcontroller.

Ideally, I'd like to get an ASG 16R8 and replace the chip. But I can reproduce one if needed, given that I can get enough information about the commands.
 

OldStuff

macrumors newbie
Original poster
Oct 11, 2022
5
0
Oh, I just discovered something after reading this page (http://preserve.mactech.com/articles/mactech/Vol.01/01.11/PAL/index.html) about the PAL chips on the Mac. It says...

ASG is a 16R8 device that illustrates why PALs can be so valuable. Its primary purpose is to take the 6-bit disk speed value fetched at the end of every horizontal retrace period and convert it to a pulse-width modulated signal. It's a 6-bit counter. This leaves a couple of inputs and outputs available, which are used to control the loading of the sound generator pulse-width modulator, which is a counter made up of TTL devices. If a discrete counter had been used for the disk PWM, another chip would have been required for the sound PWM load function. Using a PAL for a simple counter function saved a chip in the design.

I've also been fighting a screen issue. I figured the screen issue might need a recap. So I ordered the kit. While waiting, I just thought I would tackle the disk issue. However, the two issues may be connected. The ASG receives the clock from the horizontal retrace, which it uses for timing. I also noticed the Mac no longer has the startup BING. This is also used for the sound generator.
1665539487115-jpeg.2093108


That led me to another PAL chip, the LAG (16R8).
1666070229119.png



The LAG performs the video control functions, as documented here...

LAG is a 16R8 device that performs most of the video control functions. It has as inputs most of the video address counter outputs, which are decoded to create output signals which load the video shift register, provide the CRT sweep circuitry with horizontal and vertical syncs, increment and reset the video address counters, and switch the RAM address multiplexers between CPU, video, and sound addresses.

So the next step is to dive deeper into the LAG and ensure it operates correctly as it feeds the clock to the ASG and video.
 

OldStuff

macrumors newbie
Original poster
Oct 11, 2022
5
0
Alright - rather than editing the second post as I started to dive deeper into the PAL ICs, I'll keep it open for historical purposes. I traced the clock, and it led to the 15mhz crystal. I probed the hsync and vsync to find that there was data on the oscilloscope. I noticed that all the diagrams I could find showed the hsync and vsync leading directly to the connector. However, my mac 512 has a 220ohm resistor for the hsync, which isn't documented in the schematics.

I then swapped my flyback from the SE/30 to the 512k and resolved the screen issue. So the LAG is functioning fine. My second post can be ignored about thinking it was a clock issue on the ASG.

However, now that I have a working mac with the floppy emu, it will not work with physical floppy drives. This is because the ASG is still missing the PWM. I'd love to see a datasheet that explains what the 6bit address lines are instructing the ASG to create for a floppy PWM signal. I could easily make a small microcontroller to replicate the PWM based on the 6bit address commands.

At this point, I have the 512k working well off the floppy emu only - after sacrificing a flyback from the SE/30.
 

OldStuff

macrumors newbie
Original poster
Oct 11, 2022
5
0
The undocumented 220-ohm resistor is labeled R44 from LAG pin 14 to J7 pin 3 (hsync). It is in none of the 512k schematics that I could find. So I'm guessing my 512k logic board is a newer revision.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.