Just add the bios and image files elsewhere.
An 8086 PC emulator in 4043 bytes
21–30 of 39 posts
Re: An 8086 PC emulator in 4043 bytes
#22Here's a link to a fully functional Windows binary (built with Visual Studio 2013): http://sdrv.ms/1hodqjP Just add the bios and image files elsewhere.
Re: An 8086 PC emulator in 4043 bytes
#23Here's a link to a fully functional Windows binary (built with Visual Studio 2013): http://sdrv.ms/1hodqjP Just add the bios and image files elsewhere.
Missing MSVCR120D.dll. Can you compile in release mode or include that DLL too? Installing the Visual C++ Redistributable Packages for Visual Studio 2013 didn't help.
Re: An 8086 PC emulator in 4043 bytes
#24The BIOS is part of the PC, yet it's not included in the 4043 bytes.
Re: An 8086 PC emulator in 4043 bytes
#25Re: An 8086 PC emulator in 4043 bytes
#26Re: An 8086 PC emulator in 4043 bytes
#27The BIOS is part of the PC, yet it's not included in the 4043 bytes.
The BIOS is replaceable software. Standard on the IBM PC, but not the "bare metal" itself. One can only emulate so much within 4096 bytes.
I agree regarding the BIOS, but this sounds like the BIOS image contains "microcode" necessary for the emulator to run, which would seem to be cheating just a little.
Re: An 8086 PC emulator in 4043 bytes
#28Earlier quoted context omitted.
Yes, it's very old fashioned (K&R era). I think the reason for doing it this way rather than putting the type declaration alongside the parameter is then it would also demand also adding an int declaration for the BX parameter which would then cause the code to be longer. That is to say with: main(BX,char**nE){ .. it would throw an expected identifier error on the char. So you'd be putting the original: main(BX,nE)n*…
Ah, thanks for the explanation. Looks like the author did a deep, deep dive in the C language specs!
Re: An 8086 PC emulator in 4043 bytes
#29Just a small reminder how far we have come - and what Moore's law (RIP) has done for us. Yes the original PC had few enough transistors one could actually count them. NowadAys ...
An awesome piece of work
Re: An 8086 PC emulator in 4043 bytes
#30Also, if someone can tell me how to make Windows not make the emulator segfault on my machine, that'd be great.
EDIT: Oh, it works fine in a graphical terminal. I'm guessing SDL failing to init on a text terminal broke everything.
EDIT 2: ALL THIS, PLUS REVERSI! You can even play Reversi!