ApplePi (iMac G3 mod)

Discussion in 'Retro & Arcade Worklogs' started by elvis, Aug 9, 2020.

  1. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    43,467
    Location:
    Brisbane
    I have an Apple iMac G3 333MHz, Bondi blue tray loading. The CD-ROM stopped reading discs years ago, and even with a 128MB RAM upgrade it's really too slow to do anything interesting with (I have zero nostalgia for MacOS 7/8/9 era gaming, and MacOSX 10.3 on a single core 333MHz does not browse the Internet well).

    Plan is to turn it into a RPi4 + DOSBox + box86 + WINE retro gaming machine. The form factor is nice, as it's an all-in-one with a 15" CRT and a big handle on the top, making it a somewhat "portable" CRT gaming machine.

    The 15" CRT on this thing is beautiful, and despite a very limited choice video modes, displays an amazing and sharp picture.

    Later iMac models (slot load models, DV and eMac) require all sorts of custom I2C commands to fire up the CRT. *Apparently* this one does not.

    I've had this project on the backburner for eons, and after a few parts finally turning up from China, I'm giving it a go.

    First up, converting a DE15 VGA connector to DB15 RGB. After a lot of butchering of cables that never worked properly, I grabbed some of these screw terminal break out connectors to allow me to do a bit of trial and error (ironically then getting it working the first go).

    IMG_20200809_123014.jpg

    Plugging that into the iMac with the "logic board" (Apple speak for the motherboard, including the custom ATX power supply and audio front panel headers, as well as the power button connector), I've got the DB15 removed from that and plugged into my custom cable:

    IMG_20200809_123019.jpg

    Powering on the logic board and then feeding the strict 1024x768@75Hz mode, I get a picture. Woo!

    IMG_20200809_123032.jpg

    But here's where the fun ends. If I remove the logic board, I can power on the system by shorting pins 23 and 24 on the custom ATX cable. For this iMac family, +5V needs to go from the standby voltage pin (24) to the power on pin (23). I've connected that with a 510 ohm resistor just to be safe (most guides online say 200-400ohm).

    That gets the system fan spinning, and the power on light changes from off to "standby" orange.

    Again, I send my 1024x768@75Hz signal, and three things happen:

    1) The fan spins faster
    2) The orange standby light turns to green
    3) The degausse coil cycles on and off

    But no picture! Bummer. Kind of stuck now, as this isn't very well documented. Later models with I2C control have lots of work documented, and lots of other people just tear the CRT out and put in an LCD (sacrilege!) I've posted on the MacRumors forums where some clever folks hang out, asking there. But looks like the rest of my weekend is going to Googling about, hoping someone somewhere knows what the magic sauce is.

    I'm hoping it's something trivial like "you need load on one of the pins" or something. If it actually does need I2C commands to do things like set the initialisation brightness, then I'll attempt to do that via the RPi's GPIO pins into my screw-terminal connector (from what I can tell, these monitors take I2C off a couple of spare pins on the DB15 connector).
     
    Last edited: Aug 9, 2020
    Pierre32, 2SHY, sammy_b0i and 3 others like this.
  2. OP
    OP
    elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    43,467
    Location:
    Brisbane
    Hot plugging the whole logic board in after jumping the power supply brings the picture to life (slow fade in, even if the tube has been on). Removing it again kills the picture.

    Investigating the lines on the custom power header (looks like an ATX power header, but is much smaller), the colours match up to ATX standards.

    * Black is common ground
    * Red is +5V
    * Orange is +3.3V
    * Yellow should be +12V, but measures +8.5 without the logic board
    * Blue should be -12V, measures -8.5 without the logic board
    * Grey is "PWR_OK" according to ATX spec, and should measure +5V when the PSU self-tests. Mine measures 0V.

    This sounds like the issue. My guess is critical parts of the CRT aren't getting +12V where required. +5 makes it to the power LED, and high voltage to the screen + degauss coil. The 0V on PWR_OK is also a clue (need to find a way to measure this with the logic board attached, but I'd bet it goes high).

    Now to try and figure out what's causing the 12V lines to not come up to full voltage without the logic board attached. There's no data lines connected anywhere (again, newer iMacs have all sorts of proprietary I2C signals to start things, whereas this model doesn't). So I'm guessing there needs to be a certain amount of load on a line somewhere to make things start.
     
  3. Hater

    Hater Member

    Joined:
    Nov 19, 2012
    Messages:
    5,434
    Location:
    Canberra
    Have you hit up the lowendmac mailing list? So many old school boffins on that list. MacRumours has some boffins but it's clouded by 99,999 hipster douchebags who would pay $99 to eat an Apple branded turd and claim it's the greatest meal since the prawn cocktail was invented
     
    MUTMAN, Pierre32, adz and 1 other person like this.
  4. OP
    OP
    elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    43,467
    Location:
    Brisbane
    I didn't know they had one! Will give it a go, cheers.

    In further investigation, the PWR_OK stays low even with the logic board attached. However the +12V lines definitely measure +12V with the logic board attached, and only +8.5 with it removed. That's still my current bet as to what's going wrong.

    I hope it's something really trivial, like just putting load across a specific connection.

    [edit]

    Aaaand that was it. 5W resistor on the +5V was enough to bring +12V up to spec and get a picture being displayed.

    Now to find a pin header that matches this weird power supply, and start building the connectors I need to make this all work.

    I need to take 5V into the RPi's USB-C connector, and check how the speakers get power (put a little cheapy headphone amp in there or something). I'm thinking a little switch bay where the CDROM tray used to go on the front, with front USB ports and a volume knob.
     
    Last edited: Aug 10, 2020
    Pierre32 and adz like this.
  5. OP
    OP
    elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    43,467
    Location:
    Brisbane
    Even back when Apple made cool stuff, they still used obnoxious proprietary connectors. Here's an iMac G3 power connector (black) compared to a standard ATX (white).

    Now I'm on the hunt to get something to fit that square peg into the round hole that is the perf board I want to use to connect all the bits without snipping wires.

    Standard IDE/RPi/Arduino style headers are 2.54mm pitch. ATX is 4.20mm. This is around 2.75-2.8mm or so. Ugh.

    IMG_20200810_122632.jpg

    IMG_20200810_122641.jpg

    IMG_20200810_123454.jpg
     
    Last edited: Aug 10, 2020
    adz and Vanne like this.
  6. theSeekerr

    theSeekerr Member

    Joined:
    Jan 19, 2010
    Messages:
    3,582
    Location:
    Broadview SA
    elvis likes this.
  7. OP
    OP
    elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    43,467
    Location:
    Brisbane
    Pitch is measured centre to centre right? For a single one it didn't make 3.0mm. Now I'm doubting myself and need to re-measure.

    At this stage I only need about 6 pins (2x ground, 2x 5V, and the standby to signal on with a switch in between). I've got some perf board I want to use, so I was thinking just snapping off a standard 40pin / 2.54mm pitch header with the pins I need and just angling them slightly to get them where I want. Should be fine for the expected current draw.

    I've got some USB breakout connectors on order to power the RPi and HDMI to VGA converter (which will also generate the load I need without the 5W resistor).

    Next two tasks are:

    1) Playing with the I2C pins on the RGB cable to the monitor. Macrumors forum member Rocky Hill has open sourced a bunch of software to send commands to iMac G3 350 CRTs (very different model internally to mine) to set everything I want to configure (4 levels of brightness/contrast, 6 levels of RGB controls, all monitor geometry). But he notes that others have very similar commands for the iMac DV and eMac models, so it's likely the I2C commands remain unchanged between models. These can be send direct from the GPIO header of the RPi (and one of the reasons why I wanted an RPi in this thing, and not a NUC or other small PC).

    2) tapping the audio and seeing what sort of amplification is required to drive both the speakers and the headphone jack (I'd like to use both, ultimately, and have auto cutover).

    So while I wait on electronic parts, I'll fiddle around with that stuff.

    I've only got RPi 2 and 3 hardware on hand at the moment which is what I'll test on. Will get myself an RPi4 for the final build though so I can get better box86/WINE performance.
     
  8. theSeekerr

    theSeekerr Member

    Joined:
    Jan 19, 2010
    Messages:
    3,582
    Location:
    Broadview SA
    Mouser don't list a single header with a pitch in between 2.54 and 3.0mmm, so if it's not 3.0 you're really out of luck.
     
  9. sammy_b0i

    sammy_b0i Laugh it up, fuzzball!

    Joined:
    Jun 29, 2005
    Messages:
    4,209
    Location:
    ACT 2913
    The finished product is going to be awesome. I've always wanted to see a Rpi in a 12" PB G4, fully interfaced with KB/trackpad, screen. Swap the battery for a nice powerbank... /drools
     
    elvis likes this.
  10. OP
    OP
    elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    43,467
    Location:
    Brisbane
    I'm a Clamshell iBook guy myself. I dunno what it is, but that gaudy late 90s / early 00s Apple "fruit"/"lifesaver" design aesthetic really tickles me (normally I'm more an 80s guy through and through, and not really a fan of 90s/00s).

    Don't think I'll ever get one though, as they always go for silly money.

    I got this iMac in 2003 in a business liquidation auction, and have had it sitting around for years. Was really functional back in MacOSX 10.0-10.3 days, but then websites went crazy and this poor thing couldn't keep up. I've literally had this thing on the backburner since then after attempting to get a picture out of it years ago, deeming it "too hard" (lord knows why - I guess I was clueless at the time) and moving on.

    I'm hoping that making it rather pluggable with an RPi means it'll see a few generations of upgrades as SBCs continue their popular run (at least until the CRT gives out).
     
  11. Vanne

    Vanne Member

    Joined:
    Apr 20, 2003
    Messages:
    2,053
    Nice job man, had one of these sitting around at my place too, educational 1.42mhz , but aside from being used in the bar as a media player, it wasn’t used for much. Picked it up for a song though, around 10 bucks or so at an auction and couldn’t just let the poor white thing sit there..
    great to see the repurpose. :)
     
  12. OP
    OP
    elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    43,467
    Location:
    Brisbane
    Small amount of progress today. i2c connected and working through the iMac's RGB cable.

    Can read data fine. Now I have to figure out how to write it. "i2cset" throws "write failed" messages at me, so that's the next thing to deal with.

    Code:
    pi@applepi:~ $ i2cdump  -y 1 0x50
    No size specified (using byte-data access)
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 00 ff ff ff ff ff ff 00 06 10 01 9d 01 01 01 01    ........????????
    10: 00 09 01 01 08 1b 14 28 e8 66 e9 9c 57 4c 96 26    .??????(?f??WL?&
    20: 10 48 4c 00 02 00 01 01 01 01 01 01 01 01 01 01    ?HL.?.??????????
    30: 01 01 01 01 01 01 88 13 80 c0 20 e0 22 10 10 40    ?????????? ?"??@
    40: 13 00 0e c8 10 00 00 1e 60 18 20 f0 30 58 20 20    ?.???..?`? ?0X 
    50: 10 50 13 00 0e c8 10 00 00 1e 00 00 00 fd 00 4b    ?P?.???..?...?.K
    60: 75 3c 3c 08 00 0a 20 20 20 20 20 20 00 00 00 fc    u<<?.?      ...?
    70: 00 69 4d 61 63 0a 20 20 20 20 20 20 20 20 00 3a    .iMac?        .:
    80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
    90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
    a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
    b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
    c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
    d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
    e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
    f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
    
    [edit]

    I think I'm just reading EDID data here perhaps, and not hooked in to the i2c port for the CRT control itself?
     
    Last edited: Sep 10, 2020
    adz likes this.
  13. OP
    OP
    elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    43,467
    Location:
    Brisbane
    Well I think this is just EDID data, and not the control bus for the monitor itself.

    Pointing this script at it:
    https://gist.github.com/shirriff/dd9e35da12879cf1c5ed9ed92ff704ec

    Yields:

    Code:
    pi@applepi:~ $ python edid.py 
    Header:
      Manufacturer: APP
      Product code: 40193
      Serial number: 16843009
      Week: 0
      Year: 1990
      Edid version 1, revision 1
      Analog input
      Levels: +0.7/-.03
      Separate sync supported
      Horizontal screen size: 27cm
      Vertical screen size: 20cm
      Display gamma: 1.400
      DPMS standby supported
      DPMS suspend supported
      DPMS active-off supported
      Display type (analog): RGB color
    Chromaticity coordinates:  r: (0.610, 0.342), g: (0.298, 0.588), b: (0.151, 0.064), w: (0.283, 0.298)
    Established timings:
      1024x768 @ 75 Hz
    Standard timing information:
    Descriptor 1: Detailed timing descriptor:
      Pixel clock: 50000kHz
      Horizontal active pixels: 640
      Horizontal blanking pixels: 192
      Vertical active lines: 480
      Vertical blanking lines: 34
      Horizontal front porch pixels: 16
      Horizontal sync pulse pixels: 64
      Vertical front porch lines: 1
      Vertical sync pulse lines: 3
      Horizontal image size: 270mm
      Vertical image size: 200mm
      Horizontal border pixels: 0
      Vertical border lines: 0
      Digital separate sync
      VSync serration
      Positive horizontal sync polarity
    Descriptor 2: Detailed timing descriptor:
      Pixel clock: 62400kHz
      Horizontal active pixels: 800
      Horizontal blanking pixels: 240
      Vertical active lines: 600
      Vertical blanking lines: 32
      Horizontal front porch pixels: 16
      Horizontal sync pulse pixels: 80
      Vertical front porch lines: 1
      Vertical sync pulse lines: 3
      Horizontal image size: 270mm
      Vertical image size: 200mm
      Horizontal border pixels: 0
      Vertical border lines: 0
      Digital separate sync
      VSync serration
      Positive horizontal sync polarity
    Descriptor 3: Display range limits
      Minimum vertical field rate 75Hz
      Maximum vertical field rate 117Hz
      Minimum horizontal field rate 60Hz
      Maximum horizontal field rate 60Hz
      Maximum pixel clock rate: 80Mhz
      Default GTF
    Descriptor 4: Display name iMac
    
    Which is all standard analogue display modeline and chromacity/colorimetry stuff.

    So it looks like I'm not hooked in to the right spot at all. Now to find out where that should be based on the dozens of points I can connect in to...
     

Share This Page

Advertisement: