跳到主要内容

9 篇博文 含有标签「retro」

查看所有标签

WhereQ-DOSBox interrupts: the map of every INT in the emulator

· 阅读需 14 分钟
WhereQ-DOSBoxWhereQ-DOSBox

The one interface every DOS program agrees on​

Here is something I did not expect to care about, and then could not stop caring about.

A DOS game from 1987 does not know what a graphics card is. It does not know that a mouse exists, or that a keyboard has a buffer. It knows exactly one thing: it can ask the machine a question by pushing a number onto the stack and executing INT. INT 10h and the machine will put a character on the screen. INT 16h and the machine will hand over a keystroke. INT 33h and the machine will tell it where the mouse is and which buttons are down.

That is the whole contract. Every game from 1991 to 1994 is written against it, and it never changed.

I have been reading DOSBox's interrupt layer properly for this article, and it turns out to be one of the most carefully built parts of the emulator — and one of the parts this port has had to think about hardest, because a touch screen is not a mouse and a phone is not a PC.

So here is the map.

WhereQ-DOSBox 1.0.0.13: a restored save keeps the time it was made

· 阅读需 6 分钟
WhereQ-DOSBoxWhereQ-DOSBox

"Just now"​

You come back to the game after lunch. You tap the slot that said you saved it five hours ago. The game loads exactly where you left it — the boss, the health bar, the room you were in.

And the slot now says "just now".

The save is the save you made. The game is the game you left. Only the timestamp lies, and it lies in the direction that makes the app feel like it cannot be trusted with the one thing it is supposed to remember.

That is the whole of 1.0.0.13. It is the smallest release I have shipped and the only one where the fix is three lines long.

WhereQ-DOSBox user guide: put a DOS game on your phone in five minutes

· 阅读需 17 分钟
WhereQ-DOSBoxWhereQ-DOSBox

The guide I wanted and could not find​

Here is a thing I noticed while I was testing the app on my own phone. Every DOSBox guide I have ever read was written by somebody who already knew what a .zip bundle was. They start at the interesting part — the sound chips, the save-state format, the JIT — and assume you have been running DOS since 1994.

That assumption is wrong for most people holding a phone. The hardest part of putting an old game on a modern phone is not the emulator. It is the first five minutes: getting the game onto the phone at all, in a shape the app can start.

So I wrote the guide I wanted instead. Seven steps, one screenshot of every screen, and no assumption that you have ever seen a command prompt.

WhereQ-DOSBox 1.0.0.10: the sound survives the save state

· 阅读需 10 分钟
WhereQ-DOSBoxWhereQ-DOSBox

The music that stayed behind​

You freeze a game in the middle of a fight. The music is loud, the boss is doing something unpleasant, and you put the phone down to answer a message.

You come back two minutes later and load the state.

The fight is exactly where you left it — the sprites, the health bar, the position of the boss, all of it. The music, though, is somewhere else entirely: it was never frozen with the rest of the machine, so it carried on playing while everything else went back. And the beeping that was coming out of the PC speaker is still going on in the background, droning at nobody.

That was 1.0.0.9. The snapshot was very good, and it was missing the sound.

WhereQ-DOSBox: Yesterday's Computing. Today's Pocket. Tomorrow's Possibilities.

· 阅读需 6 分钟
WhereQ-DOSBoxWhereQ-DOSBox

Remember when computers had no app stores, no touchscreens, no cloud accounts, and somehow we still managed to spend entire weekends playing games? 😂

We used to type commands like C:\GAMES\DOOM.EXE and consider ourselves computer experts.

Well, DOS never really left. It was just waiting for a smaller computer.

Today, we're taking a meaningful step in bringing that world to Android with WhereQ-DOSBox.

Not a DOS emulator running inside a browser. Not a remote desktop connecting to an old PC. It's a native Android application with the actual DOSBox emulator core running as a native library inside the APK.

And there's quite a bit more behind it.

WhereQ-DOSBox 1.0.0.8: save the whole machine, and a Resume button that resumes

· 阅读需 8 分钟
WhereQ-DOSBoxWhereQ-DOSBox

The button that lied​

Two releases ago I gave the launcher a Resume button. It looked like a promise: press it, and you are back in the game you were playing.

It was not. It started the last game from the beginning, every time.

I did not notice it myself, because on my desk the emulator process was still alive — the game had never really stopped, so there was nothing to resume. Then somebody on a phone pressed the button, lost an hour of progress, and told me plainly: the Resume button restarts the game.

They were right, and the fix was not a one-liner. It took a whole-machine snapshot.

WhereQ-DOSBox 1.0.0.9: the keyboard becomes a handheld console

· 阅读需 9 分钟
WhereQ-DOSBoxWhereQ-DOSBox

A compromise, wearing the shape of a keyboard​

The DOS picture is 4:3. A phone in landscape is 20:9. The difference is two black bars, one on each side of the picture, and for two releases those bars were where the keys lived.

They were not bad bars. The arrows went into the inverted T of a real keyboard, the modifiers and the editing keys into the other side, and the picture kept the whole middle of the screen. It worked.

It was also the wrong shape for the thing it was standing in for. A DOS game is played with the left thumb on the arrows and the right thumb on the keys, and every one of those keys was a long way from where a thumb expects it.

WhereQ-DOSBox 1.0.0.7: your own DOS games, a real JIT, and a launcher that fits on a phone

· 阅读需 10 分钟
WhereQ-DOSBoxWhereQ-DOSBox

The emulator was the easy part​

Yesterday I put WhereQ-DOSBox out into the world: a native Android port of DOSBox, the emulator core running as a real libdosbox.so inside an APK.

The announcement made a promise: your own DOS games, on the actual machine in your pocket.

A promise like that is cheap to make with an emulator that boots to a C:\> prompt. It gets expensive the moment someone tries to actually use it — because then the emulator is the smallest part of the problem.

So here is what six releases, v1.0.0.2 through v1.0.0.7, actually fixed.

WhereQ-DOSBox: bringing the DOS era back to your phone

· 阅读需 8 分钟
WhereQ-DOSBoxWhereQ-DOSBox

The machine in the corner of the room​

I remember the fan first.

Not the games, not the arguments with the diskette drive — the fan. A beige tower in the corner of my parents' living room, its fan whirring like it was thinking about something, and a green-ish CRT screen that was somehow a window. When that machine was on, the whole room changed temperature. It was the loudest thing in the house, and it was mine.

Then came the blinking cursor.

C:\>

That prompt was an invitation. It didn't explain itself; it waited. And if you were willing to learn its language — cd, dir, copy, mkdir — it would do exactly what you asked. I didn't know it yet, but that was the first time a computer felt like a tool rather than a appliance you consumed.