from Hacker News

Appler: Apple ][ emulator for IBM PC, written in 8088 assembly

by ggerganov on 3/8/23, 8:14 AM with 47 comments

  • by BlackFingolfin on 3/8/23, 9:24 AM

    That is pretty amazing. Kudos to the authors, I never would have believed emulating an Apple II on an 8088 in a way that is actually usable would be remotely possible.

    The story in the README is also worth reading! E.g.

    > At the time we wrote Appler we of course knew that the colors are supposed to be purple, blue, green, and orange, but we had never seen them displayed by an actual physical computer, because the Apple ][ displays that were available in Bulgaria were all monochrome-green. Alex looked at the schematics, and he used the actual resistor values of the DAC to calculate what the 4 primary colors should be.

    WHAT??? Awesome

  • by flohofwoe on 3/8/23, 12:21 PM

    Oh my, the 6502 emulation [1] has fewer lines of assembly code than my (code-generated) implementation has lines of C code [2] :D

    Very nice use of a macro assembler though [3], makes the code feel very high level.

    To my defense, my generated code has a lot of redundancies (such as assert(false) which were meant to catch any 'stray cycles' but which are removed in release mode - and it could be more compact if it would use preprocessor macros (but since the code is generated anyway that seemed kinda wrong).

    [1] https://github.com/zajo/appler/blob/develop/src/65C02.ASM

    [2] https://github.com/floooh/chips/blob/master/chips/m6502.h

    [3] https://github.com/zajo/appler/blob/52aaa0f768cdf303438cd2c7...

  • by robterrell on 3/8/23, 4:01 PM

      It was developed in 1990, at a time when Apple IIe was still in
      production, which means that Appler is likely the first Apple ][ 
      emulator ever made
    
    Not to be one of those guys, but "][ in a Mac" was from 1985:

    https://archive.org/details/2InaMac

  • by rob74 on 3/8/23, 9:29 AM

    > The Hollywood blockbuster The Terminator featured some 6502 code for Apple ][ in several scenes, seen on the Terminator's HUD

    I knew that Bender from Futurama had a 6502 as his brain (https://spectrum.ieee.org/the-truth-about-benders-brain), but I expected the Terminator to be powered by something a bit more advanced...

  • by javier_e06 on 3/8/23, 6:00 PM

    Ah Karateka! We all know what happens at the end of the game if Karateka tries to kick Mariko when he enters her room. Apple's basic was my first language. I can hear Human League blasting away in my Sony Walkman.
  • by IncRnd on 3/8/23, 10:40 AM

    It's been a while since I've used one of these! It's looking good!

    The only way to make it better is to change the spelling to App][er. It's an extra l that way, but I think that's forgivable.

  • by JoeDaDude on 3/8/23, 3:09 PM

    Came to check out the Emulator, stayed to enjoy the history and design lessons of the Apple II computers. Thanks for posting!!
  • by low_tech_love on 3/8/23, 10:28 AM

    Make to look at the README, it’s quite nice!
  • by qorrect on 3/8/23, 9:30 PM

    What anachronistic keycaps are these https://github.com/zajo/appler/blob/develop/images/Apple1.jp... ? They look gorgeous
  • by cylinder714 on 3/8/23, 9:05 PM

    For extra credit, try running this under 8086tiny, an IBM PC XT emulator: https://github.com/alblue/8086tiny
  • by anthk on 3/8/23, 10:45 AM

    Mmmmh IDK about the 8088, but the 8086 is 16 bit so it could be doable to emulate an Apple II at good speeds, right?
  • by nikolay on 3/10/23, 2:28 AM

    It's good to see fellow Bulgarians and Bulgarian projects here.
  • by mzs on 3/8/23, 5:54 PM

    readme.md links to this and wow!

    https://arachnoid.com/electric_duet/index.html

  • by rbanffy on 3/8/23, 11:17 AM

    Finally a utility for all those old PCs!
  • by breakingcups on 3/8/23, 12:14 PM

    What an accomplishment, very cool.
  • by worldsavior on 3/8/23, 5:20 PM

    Looking at the src code gives me a headache. How can someone develop an actual emulator in Assembly? From where is the motivation and what is the principle?