Plutiedev's blog


Virtual Lab on the Mega Drive

Published on 2025-nov-03

This year marks the 30th anniversary of Virtual Lab's launch on the Virtual Boy! I've been working on a Mega Drive remake of it, and I've decided to put it up for download now:

Virtual Lab for Mega Drive (2025-nov-03)

If it looks familiar, it's because Megumi herself has played it before.

Screenshot of Virtual Lab. To the left, the grid, full of carefully arranged purple squiggly "intestines" which make the playing field. Indicators to the right: Score: 000020, Max: 01, Get: 01, Level: 01. Lisa is standing between Get and Level. The background is black, with some red and blue star outlines.

The game isn't finished though, largely due to one game breaking bug that I haven't been able to fix yet despite spending months on it:

If I ever figure out how to fix the bug, I may actually bother to finish the missing stuff.

Screenshot of versus mode. There are two grids, one to the left and one to the right. Below each grid is their own Max and Get indicators (both 00) as well as their own Lisas (red Lisa for the left player, blue Lisa for the right player).

Tutorial

What is implemented is a short tutorial telling you how to play. It only goes over the bare minimum you need to know, but it should clear up the most important things to actually get anywhere (they apply to the original game too!).

The game becomes a lot easier when you realize that you can use the walls as part of the loops. It actually kind of becomes required to actually survive.

Screenshot of the Virtual Lab tutorial. "Connecting myuu to the walls will work however!". Page 03/04. Left- previous page. Right- next page. Start- exit.

Why there's no Knuckles in Sonic 1

Published on 2025-oct-28

There have been a lot of theories about why you can't play as Knuckles in Sonic 1 while locked onto Sonic & Knuckles (like you can do with Sonic 2), including a lot of weird ones like the colors didn't work or that it crashed when gliding into conveyor belts or whatever. Obviously none of those are the real reason.

The actual reason

The most likely reason has to do with the way Sonic 1 and 2 are built:

The problem is that both Sonic 1 and 2 had two revisions on cartridge:

The way Knuckles in Sonic 2 works is that the entire code is replaced with a rebuilt one in a separate 256KB ROM, while reusing the rest of the data from the Sonic 2 cartridge (aside from object layouts which are in the main Sonic & Knuckles ROM).

But with Sonic 1 this would require checking which address to use for each revision, wasting a lot of extra code and time and also being extremely error prone. In other words, it just wasn't practical (besides, Sonic 1 would need its own extra patch which would have increased the cost of the cartridge even more).

Busting myths

Since we're at it:

Sprite mapping format thoughts

Published on 2024-oct-13

mdtiler can generate sprite mappings (manually) using the sprite instruction, which both reads tiles and generates a sprite mapping entry in one go. The format used by mdtiler looks like this:

And the list is ended with $8000.

But in hindsight, it's kinda wasteful: the upper 12 bits of the sprite size are never used (always 0). Even if you want to cram in flags in the unused space of the sprite table, the upper 8 bits are never used at all. Also, to check the end of the list, you need to check if X = $8000, which wastes cycles.

Probably a better idea would have been to do this:

And again the list ends with $8000 (or larger). Then the "end of list" condition comes for free when reading the sprite size since the sign flag will be set, avoiding wasting cycles on a cmp instruction.

Maybe one day I'll update mdtiler to support the new format, or even custom formats (where you specify the order of each entry).

F you, Movistar

Published on 2022-apr-18

Lots of swearing ahead.

OK so on February 10th some asshole thief cut off some cables from a pole in order to knock down a camera and in the process left us with no landline or internet.

Now, the telco in question used to be Telefónica (now Movistar) and they already had a reputation of taking their sweet time and leaving their customers two weeks without service upon any minor hiccup but wow, the new owners are much worse.

So we fill a complaint. No news, later we noticed that they marked the issue "fixed" without doing anything at all. We fill another complaint and they mark it fixed again within two days without doing anything. What the fuck? Whenever we'd get them to talk (nearly always at night, once they replied at midnight) they'd insist that there's an active report (yeah because we just reopened it you dumbass) and to keep waiting (one of them said to wait "12 work days" what the heck?) and would put different excuses each time (they even claimed the address was wrong) all this while consistently closing reports as "fixed" after 48hs (automated?). They did this shit six times in a row.

We found the address of their offices in Argentina and decided to directly pay a visit to force their hand… there was nobody in the lobby. The building was freaking empty. What the fuck, does anybody even work there?

Then finally after over a fucking month these assholes finally admit that the reason is that we're on broadband (because they refuse to do fiber in this zone) and that they don't have the required equipment anymore and that as such they wouldn't offer us internet service anymore ("but we're always improving" shut the fuck up) and that at most they'd offer us some device to make landline work. Oh, and they knew this since the first time they closed the report while marking it "fixed" instead of "won't fix" because they wouldn't tell us that they weren't going to bother at all. All this while demanding us to pay the monthly bill for the month where they kept actively refusing to provide service, by the way.

FUCK. OFF.

An angry iwis powerbooping a giant button non-stop extremely fast.

So there goes one month.

We finally convinced the landlady to switch to another company, and this still took over another month worth of waiting because, on top of the usual ISP shit that makes you waste time, apparently this crap went on through the whole area and the competing ISPs are short on staff to deal with the sudden surge in demand for them, because I guess that Movistar is happy to drop an entire neighbourhood.

Oh, and stop sending demands to pay the overdue bills when you already admitted you won't restore service and we already fucking cut you off, but I guess that you're a chronic bully who needs to punch every single idiot around for their lunch money, amirite? Because Movistar sent us a warning a few days ago over March where we didn't have any service at all. Yeah sure, GET THE FUCK OFF. NOW.

Now to catch up on a lot of stuff…

What to watch out for when making cartridges

Published on 2020-oct-15

With all these new Mega Drive releases lately we've had a lot of people complain about cartridges being of low quality and potentially putting consoles at risk. Shouting at a dying forum or something is not going to help any vendors realize what they're doing wrong, so I'm quickly putting together here what to look out for. This probably deserves a proper page with strict specs to follow some day.

5V vs 3.3V components

Yes, this thing again.

Mega Drive is a 5V machine and everything on the cartridge slot is 5V. Modern components are usually 3.3V instead (or even 1.8V). Now, using modern components is great, you can get cheap Flash memory that way! But you absolutely must not mix 5V and 3.3V signals as-is.

If you're using 3.3V (or 1.8V) components, you must use a voltage regulator and level shifters (the former generates 3.3V VCC out of 5V VCC, the latter converts signals between both voltages). Connecting 5V directly to 3.3V components risks damage long term, in particular to the latter.

Board beveling

The hot topic of the day!

Something that may be easy to overlook is that the bottom of the board should be beveled (i.e. thinned down). This is important to reduce risk of damaging the cartridge slot: if the board isn't beveled then there's little room for margin to maneauver and you risk pushing down the pins when inserting the cartridge, potentially damaging it permanently. With beveling the board is easier to insert and pins will be at most pushed a bit outward instead, which is much safer.

Here's how the bottom of the board should look like (based on that PDF called GEN-CART-BASIC-fabnotes.pdf that keeps circulating around), note that 0.063 inches is a common thickness for boards:

The thickness of the board at the top is 0.063 inches, while it becomes 0.017 inches at the bottom. The beveling is done at an angle of 30 degrees, giving the beveled surface a height of 0.040 inches.

Chamfered corners

Related to the above, the bottom corners of the board should also be chamfered in a similar way, making them more rounded instead of hard corners. This one isn't as critical at least (failing to do this simply makes it a bit harder to seat or unseat the board) but you should still try to do it.

Ground shield

This one is easy to miss if one isn't putting much thought into it, but ideally you should cover up any empty space in the board with a trace to GND. This acts as a RF shield and helps reduce risk of interference with other nearby electronics.

Bringing this up since I've seen a few boards without it.

One last note

Check the actual boards please. I'm seeing a lot of people going "they make shitty cartridges!" over stuff that was done wrong long ago but nobody bothering to confirm if their newest releases still do it, or what they are doing wrong (because without details we have to assume the absolute worst). It starts getting hard to trust those comments if we can't tell for sure if they're still true nowadays (they may be, but we can't tell).

This gets even more important as new issues are found. Board beveling is something that people only started paying attention like last year or so. I'm sure that we'll find yet more issues in the future that we're currently ignoring, and we're probably going to be slamming manufacturers for getting that wrong back when nobody was paying attention.

I suppose there's also some mea culpa for not having put together yet a page giving full specs for cartridges to follow. It's very easy to get everything wrong when there isn't any checklist to follow, after all!