Skip to content

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

Comments

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?

The 6502 was pretty fast little chip: https://imapenguin.com/2022/06/how-fast-can-a-6502-transfer-...

The ARM team decided to design their own CPU because they felt that the available options weren't that much better than the 6502 as they wished them to be.

8088 and 8086 are internally equivalent, the difference is the size of the data bus - which would make little difference if any when emulating an 8 bit data bus processor.

I remember my Apple II "felt" quicker than the first 4.77 MHz IBMs I used. A lot of that was due to BIOS character output on CGA needing to coordinate when to write to VRAM with the 6845 to avoid causing "snow" on the screen.

Went from Apple IIe to an Amiga 500, then later an Amiga 1200. Sometime later "upgraded" to a 486 running DOS/Win3.1 (not an upgrade).

Sometime later "upgraded" to a 486 running DOS/Win3.1 (not an upgrade).

I understand it wouldn't feel like much of an upgrade.

I think the 16-bitness alone won't help all that much except for some 16-bit address computations, but the bigger register set of the 8088/8086 and the code being written in assembly may allow to map 6502 registers to fixed 8086 registers, which is a pretty big advantage compared to writing the emulator in a high level language (not sure if the emulator uses that approach though, if it would just run the CPU emulation it would be trivial, but when emulating the whole hardware the manual register allocation may become a bit trickier).

"Most of the state of the emulated 6502 CPU is stored in 8086 registers:

A => dl

X => cx

Y => bp

PC => si

The Z and N flags are stored directly in the 8086 ZF and SF, while dh stores the C and the O flags. The stack pointer is stored in memory."

Might help if you want to emulate a 65816 for a IIgs? But I imagine you'd want at least a 286 for that.

Wasn't that the SNES CPU? A 486 maybe, and for basic emulation.

No. The 8088/86 was similar in speed to the 6502, around 1.4x faster.

The clock speed was higher (4.77 vs 1MHz) but it was generally less efficient.

However, it was an easier machine to use. The Apple 2 was full of Woz shortcuts as the article mentioned. Made it cheap, but hard to program. Not just the floppy and the speaker, the high res graphics mode (HGR) had memory addresses that were not aligned to actual screen rows. The first row of pixels started at $8000. The next row in memory was 1/3 of the way down the screen, probably due to refresh timing.

Amazing what was achieved on such hardware, in days when documentation was good, but very hard to find.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.