Page 1 of 1

Bringing Emulation Into The 21st Century

Posted: Sat Jul 24, 2021 3:37 am
by johnzo


Quote




Emulation is a fascinating area of software engineering, being able to bring to life a 30+ year old arcade machine on a modern computer is an incredibly satisfying accomplishment. Unfortunately I’ve become increasingly disillusioned with the lack of ambition shown by those in the emulation community. Whilst the rest of world moves onto cloud first, massively distributed architectures, emulation is still stuck firmly in the 20th century writing single threaded C++ of all things.



https://blog.davetcode.co.uk/post/21st-century-emulator/

My favorite / most horrifying part:


Quote




One of the many beautiful things about a microservice architecture is that, because function calls are now HTTP over TCP, we’re no longer limited to a single language in our environment. That allows us to really leverage the best that modern http api design has to offer.



The following table outlines the language choice for each opcode, as you can see, this allows to gain the benefits of Rusts safe integer arithmetic operations whilst falling back to the security of Deno for important operations like CALL & RET.



(just to be clear, they're not serious)


Bringing Emulation Into The 21st Century

Posted: Sat Jul 24, 2021 4:32 pm
by Snickers11001001

You had me for a second there.   LOL.  

 


Bringing Emulation Into The 21st Century

Posted: Sat Jul 24, 2021 4:54 pm
by Scott Robison


21 minutes ago, Snickers11001001 said:




You had me for a second there.   LOL.  



Now I want to write a Windows 10 emulator in Commander X16 BASIC. #haha


Bringing Emulation Into The 21st Century

Posted: Sun Jul 25, 2021 6:06 am
by kelli217


13 hours ago, Scott Robison said:




Now I want to write a Windows 10 emulator in Commander X16 BASIC. #haha



Computer science theory says it can be done. Turing-completeness and given sufficient storage and all that. But theory and practice are not the same thing. ?


Bringing Emulation Into The 21st Century

Posted: Sun Jul 25, 2021 7:16 pm
by Scott Robison


13 hours ago, kelli217 said:




Computer science theory says it can be done. Turing-completeness and given sufficient storage and all that. But theory and practice are not the same thing. ?



Exactly! I once computed the number of disks that would be required to emulate a Windows 10 system on a C= 64 with 1541.

Let's see, the computer I'm using right now, assuming we could even fit a CPU emulation in a C= 64 without having to swap programs in and out of the address space, would need 16 GiB for RAM and 951 GB for the SSD. So let's call that 902 GiB. I can store 166 KiB on a 1541 based on 664 blocks free (I'll just assume I read and write individual blocks rather than use files which would consume two extra bytes per block, and any overhead I can squeeze into otherwise unused directory sectors). So I'll need almost 5.7 million floppies just to emulate the RAM and SSD. Undoubtedly I'd need more to emulate other aspects of the system such as video RAM, CPU cache, etc. I wonder where I can find 5.7 M new old stock floppies?

Or we could go really old school and use tapes!


Bringing Emulation Into The 21st Century

Posted: Sun Jul 25, 2021 9:53 pm
by Snickers11001001

Scott!   Wowzers!    That's amazing to think about! 

Of course, there's already a lot of this sort of thing in 'the other direction' in the retro computer community.   

I have to take great care not to be a jerk when I see someone post on REDDIT about how their brand new VIC20 game blows away anything that ever existed at the time the machine was 'in general use' and how the original programmers must not have been any good etc., etc.   

Of course their new VIC20 program was put together using a cross development environment  running on a modern machine with more than half a million TIMES more transistors; repeatedly (and instantly) compiled right into VICE or whatever emulator of choice for testing.   The graphics were prepared using photoshop and illustrator and other utilities (having a combined code size equal to many thousands of 1541 disks); and thanks to the internet, with the benefit of having access to code libraries and disassembled code from virtually every 6502 based game app demo etc ever made!

And don't get me wrong   I don't begrudge folks from using those 'best available tools' for the job.   But its the smug and self righteous comparisons in which they credit themselves as better programmers than the folks from 'back in the day' that tends grind my gears.   I wonder what their game would have looked like if they HAD used only the same tools as the people who were programming on the old machines in the 1980s, using simple assemblers, graph paper and colored pencils for the drawings, and (on the VIC20 at least) saving their work on cassette tapes (where just the 'save' gave you time to go out and get a cup of coffee). 

Geez.   See what I mean?   I can be a real "get off my lawn" old coot when it comes to that topic!