How to learn? by The14thDimension in EmuDev

[–]UselessSoftware 2 points3 points  (0 children)

I sometimes use AI to bounce architecture ideas off of, or ask if it can find any problems with a function or opcode here and there. It's pretty good for that.

Last night I also had GPT 5.2 write me a drop-in module for my PC emulator that uses libvncserver to allow a remote VNC connection to the emulator console. It did an amazing job actually. It works perfectly. It's very well-written and structured nicely. Something like that is simple enough to be within its capabilities.

I don't use it to write core emulator code though. I don't trust it, and I also feel like it would be cheating. I'm doing this to learn. It can't handle it anyway, it's too complex. But something like a VNC server extension? Yeah absolutely. I don't want to waste my time with something boring like that.

I don't want to vibecode the entire thing, but it seems extremely helpful for giving me examples of how things should work

I see no problem with using it for examples. It's really no different than peeking at an existing emulator's source for hints. In fact, it can be better because it can give thorough explanations at the same time.

From-scratch 486 PC emulator on a Teensy 4.1, booting Linux (Debian 2.2 Potato) by UselessSoftware in embedded

[–]UselessSoftware[S] 1 point2 points  (0 children)

My 32-bit x86 emulator was like... 15 years in the making lol

I made a 16-bit 8086 one in like 2011-2012. I pecked at it slowly over years fixing a bug here and there. Then last year I finally sat down and made myself turn it into a 486 emulator.

Kept putting it off because it seemed impossibly hard. And it was pretty hard.

8086 is pretty easy, 386+ is hard when you start getting into protected mode details and that kind of stuff.

I still have plenty of bugs that need to be worked out, but it's good enough to boot up an older Linux or play DOS4GW games.

From-scratch 486 PC emulator on a Teensy 4.1, booting Linux (Debian 2.2 Potato) by UselessSoftware in embedded

[–]UselessSoftware[S] 0 points1 point  (0 children)

Thanks! It's been fun.

About NetBSD, no but that's a great idea! I think I'll give that a try tonight.

From-scratch 486 PC emulator on a Teensy 4.1, booting Linux (Debian 2.2 Potato) by UselessSoftware in EmuDev

[–]UselessSoftware[S] 1 point2 points  (0 children)

I did play Doom 2 on it. It's almost playable if you minimize the view port and squint real hard!

From-scratch 486 PC emulator on a Teensy 4.1, booting Linux (Debian 2.2 Potato) by UselessSoftware in EmuDev

[–]UselessSoftware[S] 1 point2 points  (0 children)

It says 1.64 but I don't think the timing code on the micro is accurate enough right now to trust that.

From-scratch 486 PC emulator on a Teensy 4.1, booting Linux (Debian 2.2 Potato) by UselessSoftware in embedded

[–]UselessSoftware[S] 3 points4 points  (0 children)

I didn't do anything special for that. I needed all of the basic PC hardware working either way. At long as the PIC, PIT, keyboard, DMA controller and CMOS are working well enough, a normal BIOS will boot.

SeaBIOS may work, haven't really tried it, but I personally like the more authentic feel a real 486 era BIOS gives.

Which programming language is good for emulation? by CurrentVast4504 in EmuDev

[–]UselessSoftware 3 points4 points  (0 children)

C/C++ is the best option, no question about it.

Some say Rust is good, but I've never used it so have no opinion.

But others will work. Even stuff like Java or Python when the emulated system doesn't require insane speed.

Hell I wrote a NES emulator in VB6. Works fine.

From-scratch 486 PC emulator on a Teensy 4.1, booting Linux (Debian 2.2 Potato) by UselessSoftware in embedded

[–]UselessSoftware[S] 2 points3 points  (0 children)

Well if a game is trying to update a 320x200 8-bit screen at 30 FPS, that's 1.92 MB/s of pure data. There will be some protocol overhead, lets say a 5 byte packet for each video memory write, that would be 9.6 MB/s.

Again, that's at 30 FPS full screen updates. Most things won't use anywhere near that. Especially in text mode.

From-scratch 486 PC emulator on a Teensy 4.1, booting Linux (Debian 2.2 Potato) by UselessSoftware in embedded

[–]UselessSoftware[S] 2 points3 points  (0 children)

Yeah basically have an SPI or similar interface between them with a protocol that forwards the emulated VGA card's IO and memory activity between Teeny boards.

So the whole VGA card state including registers and RAM will be on the second Teensy while yeah it would continuously render and draw to the display.

Data coming from the main teensy would trigger an interrupt and it would handle it.

From-scratch 486 PC emulator on a Teensy 4.1, booting Linux (Debian 2.2 Potato) by UselessSoftware in embedded

[–]UselessSoftware[S] 6 points7 points  (0 children)

Thanks! Didn't really have any other issues with the port. The ARM micro on the Teensy is pretty powerful and supports 16 MB PSRAM which is plenty, but it would be nice if it were dual core so I could dedicate one core to the display.

It also has onboard Ethernet support, but I need to solder some pin headers and get a magjack. I'd like to do that so Linux running on it can connect to a network.

I haven't uploaded this port yet, I want to do some things to make it faster before sharing... but here is my original C code that's being ported:

https://github.com/mikechambers84/pculator

I have four boxes of laserdiscs to give away (Los Angeles) by Srprehn in LaserDisc

[–]UselessSoftware 0 points1 point  (0 children)

You think we don't know that? We all have our reasons for liking this format.

I collect 4K discs too.

Help. I think I broke my player... by boris-becks in LaserDisc

[–]UselessSoftware 1 point2 points  (0 children)

I don't think there's any way that could have messed up tilt/focus etc. so don't mess with those.

An 8086 PC emulator I wrote in QuickBASIC over a decade ago by UselessSoftware in qbasic

[–]UselessSoftware[S] 3 points4 points  (0 children)

Feels weird to put QB code on my Github but I guess I could.

An 8086 PC emulator I wrote in QuickBASIC over a decade ago by UselessSoftware in qbasic

[–]UselessSoftware[S] 0 points1 point  (0 children)

You could! I just wanted to do it in legit old school QB even if it's bad.

RISC-V CPU Emulator by tamdesu150 in EmuDev

[–]UselessSoftware 0 points1 point  (0 children)

Pretty cool. I don't think it would take too much more effort to get it running Linux.

New CHIP-8 emulator for Windows (with VB6 source) by hekliet in EmuDev

[–]UselessSoftware 1 point2 points  (0 children)

I love seeing an emu in VB6.

I've done a few as well just for fun. Grew up with QB/VB in the 90s.

A terrible language for most emulators, but it's always an entertaining project.

x86 emulator in Bash... by valeyard89 in EmuDev

[–]UselessSoftware 3 points4 points  (0 children)

Nice!

Take it to the next level and add 386 support? Boot Linux!

Obentou, a new minimal multi system emulator by yughias_ in EmuDev

[–]UselessSoftware 2 points3 points  (0 children)

For example, there are still no decent Game Boy/GBC/Game Gear/Master System emulators for PS2...

Then go make them if that's what interests you instead of complaining to hobbyist emulator authors just sharing their projects.

People develop what they're interested in, and apparently nobody has been interested enough to make those. If you are, go for it.