So my roommate bought that weird Hand386 portable PC that popped up on aliexpress. Let's tear it down (nondestructively for once, since I'm borrowing it).

#hand386 #teardown

first off, lemme get the spoilers out of the way: It's real, it runs DOS/Windows 95, and it can run Doom (badly) and VGAPride.

It's easy to open (this image came out blurry, but I'm just using it for navgiation)

We've got two terminal connectors on the left, plus a 3.5mm audio jack. The right has a USB port and a barrel jack power connector.

First off, the CPU. This is surprising! It's an DM&P ALi M6117D.
This is a modified version of the chip made by ALi/ULi, licensed to DM&P. ALi's chip division was bought by Nvidia in 2006.
So the M6117D is a 386SX-compatible system on a chip.
It's a static 386SX Core (apparently licensed from Intel?) plus ram controller, peripheral controllers, IDE support. It runs at 25-40mhz, and up to 16 megabytes of RAM

Chip info here:
Also, I was wrong. Apparently it goes up to 64 megabytes of RAM:

https://www.dmp.com.tw/app/webcamera/pdf/m6117d.pdf

Next to the CPU, we've got four DRAM chips. AMIC A420616AS-50F, 2-megabyte chips.
So we're looking at 8 megabytes.
Then we've got our VGA chip: A Chips&Technologies 65535.
This is a fully integrated chip with built in CRT controller/flat panel support, RAMDAC, and and clocks.
It supports up to 1280x1024 resolution with enough VRAM, or 640x480 16bpp truecolor.
For VRAM, a Sharp LH6A4260K-60, which I'm pretty sure is a 512 kilobyte chip, but I can't be sure.
The really surprising chip is this, a Yamaha OPL3 YMF262-M...
Yeah, this thing has real OPL3 sound. Assuming this chip is genuine, of course.
There's two SST39SF512 half-megabyte flash chips.
The left is labeled VIDEO and the right is labeled BIOS.
The last interesting thing about the top of the PCB is that there's another speaker, labeled SP1.
There's two stereo speakers as well, so I suspect this is just used for PC Speaker, and was easier than merging the audio in with those other speakers
So here's another blurry navigation-picture for the other side of the PCB. The interesting thing here is that they've got the keyboard on a separate PCB.
So over by the USB port, we've got a CH375B.
This is an 8-bit IO chip for USB, specifically for storage.
(it's also an 8051-based core! there's always an 8051)

There's three 74HC139s, which are dual 2-to-4 line decoders.

This maybe is used for wiring up one of the expansion ports to the ISA bus?

A YAC512-M. This is a DAC used by the OPL3 to create the analog output of the audio chip.
A PAM8403 three-watt class-D stereo audio amplifier.
Assorted power regulation/charging circuitry that I'm not going to go into.
though I do want to show off this amazing bodge job.
So the keyboard PCB is also the display converter PCB. It stars a Realtek RTD2660, which is a standard video controller. It takes in analog video and drives LVDS displays with it. It's an all-in-one chip that's used on a bunch of cheap monitors, and it's also an 8051!
Next to it we've got a P25Q40H half-megabyte serial flash chip. This is presumably used to store configuration info for the RTD2660.
The other chip on the keyboard/video board is an HM82C42. I can't find any info on this specific version, but it's almost certainly an Intel MCS-48 acting as a PS/2 keyboard controller.
The keyboard is a rubber membrane onto the PCB, like a remote control. It's functional but feels pretty crap.
that large connector on the side is called "ISA" on the PCB.

It's a 60 pin connector. 8-bit ISA is 62 pins, 16-bit ISA is 98 pins.

So if they just merged some grounds, 60-pins is totally doable.

The other connector is 12 pins:
This one is PS/2 and VGA. An adapter is included with the device.
Storage is on a 2 gigabyte CF card. It's got Dos 7.1, Windows 95, and a few games pre-installed on it, plus a driver for the CH375 USB storage chip
Games included:
Doom, Wolf3d, XianJian QiXia Zhuan (aka Chinese Paladin), Tyrian, Raptor: Call of the Shadows, and Uncharted Waters: New Horizons
Daikoukai Jidai II
there's also the SBVGM audio player, which includes "Funky Stars" and the whole soundtrack of PlanetX3
@foone Hell, yeah! Gotta include the Hybrid song, even when you don't have a device capable of playing the original sampled tracker version!
@foone Wait! What the fuck! I don't actually have an OPL version of the Hybrid song. Yo! Can we get that "Funky Stars" file!
@foone Does it *have* any digital audio? Because I've only seen literally the OPL3, so hypothesized it was synth-only (time to dust off the MIDI sound efffects that I think fraggle might have uncovered in DOOM, or at least boosted).

@LionsPhil no, unless you bitbang some PWM out of the PC Speaker (like lots DOS of MOD-trackers, and some games - e.g. RealSound - used to do). But that will sound very bad on a piezo.

Also: this is a 386*SX* (16bit, no cache) so Doom is already stretching it.

@dryak (or, you could also try volume-modulating on the FM chip. But in my fuzzy memory from back in days, it's a bit more complicated on an OPL3)
@dryak Yeah, and you can't really do that concurrently with something else. I remember a (third-party) Win3.11 PC speaker digital audio driver with two operating modes: one was completely blocking while a sample played, and worked about as well as that vaguely famous DOS golf game that did it; but the multitasking-friendly interrupt-driven mode was a crackly mess because you are asking too much to go context switch your only core during such realtime-sensitive hackery.
@dryak @LionsPhil Apparently, it seems some games can load their sound effects as custom MIDI instrument data? https://moddingwiki.shikadi.net/wiki/Adlib_sound_effect
Adlib sound effect - ModdingWiki

@dryak @LionsPhil Wolf3D has proper gunshots but Windows 95 has no mixer or PCM devices installed.

@indigoparadox wolf3d has two different ways to play soundfx:

- stream register setting to the FM chip (VGM format style) to make an approximation of the sound (much more complex than a note, but not a sample).

- stream a digital sample, either over DMA to a Sound Blaster, or over the printer port to the FIFO of a Disney Source.

@indigoparadox Sierra's EGA games(running on SCI0, starting with KQ4) definitely worked this way: each drivers (AdLib, MT-32, etc.) loads custom settings and instruments, and then the game played MIDI notes mapped to those.
In later games (eg. SQ3; or running SCI01, eg. QfG2) the music driver could intercept these MIDI notes and play samples instead, before the engine supported proper samples.

ID software games tended to be closer to VGM and streamed complex register settings

@indigoparadox For completedness yet another possibility to play (this time proper digital samples, but with shitty quality) on FM sound chips, that I haven't seen in western games (but is apparently popular for speech in Japanese games):
Composite Sine Mode synthesis.

You do a fourrier transform of your digital sample into a series of sine waves, and send the loudest sines to the number of FM operators that can do CSM.

The sound card plays sines on those operator and assembles them back.

@LionsPhil @foone I don't think anyone ever previously shipped a sound card with a 4-op OPL3 but no PCM sample support.

The Adlib had an 2-op OPL2.

The Sound Blaster, et al, had PCM sample support.

@foone I just wanna note that, with some help, I got SimCity 2000 working on mine (https://mastodon.social/@indigoparadox/110449363026513306) because they also helpfully included a VESA.COM executable in the root that is a working DOS VESA driver for that video chipset, in case that throws anyone else for a loop! 😩
@indigoparadox @foone man love that rooftop alien monster thing. Memories.
@foone Aw heck yeah Tyrian! I love that game! Still listen to the soundtrack sometimes.

@foone I wonder if they have a license for that Win95.

I wonder if Microsoft still sells licenses for it.

@dascandy42 they absolutely do not
@foone @dascandy42 but you can still get one through msdn right?
@foone The choice of CF instead of SD puzzles me
@elithebearded the ALi M6117D has native IDE support, and CF is basically IDE. They'd need another conversion chip to support SD
@foone well it's correct. that IS A connector

@foone https://de.aliexpress.com/item/1005005542582463.html?gatewayAdapt=glo2deu

This shop page should shed some more light on the ISA 8 Bit extension Interface as it have the pinout

@foone appearently there is a external ISA „expansion“ with 3 card slots you can buy for $20

https://de.aliexpress.com/item/1005005543239919.html?gatewayAdapt=glo2deu

@foone Mmmmm, carbon wafers!
@foone Love how these kinds of wafers look like Stroopwafels. Makes me want a tiny coffee cup to balance them on.
@foone Also that crab is dope as hell.
@foone that's... the official layout?
@foone Wow, wild! Someone miscalculated the diode drop, or didn't have the right drop on hand, I guess? Very impressive bodging for what I looks to be a production unit in some capacity, at least!
@foone The soldering equivalent of a couple of cars rear ending each other and then the airbags inflated.