Document Diablo's bugs
Currently documented bugs: The DSF Buglist for Diablo v1.09 (Lurker Lounge)
The goal of this issue is to document any new bugs we come across while examining the code that are native to the original game. This will help us fix them later on when we make mods/ports.
New bugs discovered (last update 06/24/18)
- When casting a town portal in a quest level, leaving, and then going down into the dungon, the town portal will be placed in the dungeon. For example,
Chamber of Boneis quest level 2, so the portal would appear on dungeon level 2 at the same X/Y coordinate. - Diablo is supposed to be immune to the squelch radius, however, the game checks the AI for Diablo's monster type, thus always failing.
monster.cpp -> ProcessMonsters
Are these bugs going to be fixed in devilution after devilution development becomes stable or is the devilution source code gonna be a pure documentation update including leaving in the vanilla bugs?
The Purpose section of the readme has the answer.
Ah ok, I did read this like a week ago but I guess I forgot ;D.
The pull request above is basically a copy of the text from the original posting with some Markup for formatting. Is something like this is what is being requested?
We can definitely make use of your copy in case the original one goes down. However, this issue is to track new bugs that haven't been documented anywhere else, so that we can fix them in the future.
(Not Devilution of course, but mods based on)
As a rule for any bug published can we have the save file for this? I would like to have something to make this more easy to replicate...
because I am thinking on looking at the TP sequence and the Chamber of bone locations... because Technically TP is working but it's not marking the chamber of bone as a different map , if I am not mistaken...
EDIT:
I am probably completely wrong on that one. The dungeon map array looks ok for the most part...
Perhaps the Portal setting and getting is wrong? Perhaps it's not specifying the correct map for special maps?
Ok . Which memory map (showing address locations) is the most accurate for the origional diablo? Do you have it ? All the addresses I am seeing appear to be inaccurate.
@ApertureSecurity check Support/surgery.xls for a spreadsheet containing addresses.
Found another one while testing the world.cpp refactor. This bug is also part of vanilla.
EDIT: This bug was Devilution only https://s33.postimg.cc/w9y0yf6ov/doorflip.png
Brevik himself talked about this bug in an interview once. The Caves were entirely hardcoded and many fixes added per-tile:

@galaxyhaxz is this in the origional game or are we going to add this to our bug list?
Well, it looks like the door issue mentioned above was devilution specific. However, these pieces are saved with the character so it becomes bugged when loading the character in a vanilla game. https://github.com/diasurgical/devilution/commit/ee5675108eb0b8e169b5f154ccc4dee8a11d4abe
Well, it looks like the door issue mentioned above was devilution specific. However, these pieces are saved with the character so it becomes bugged when loading the character in a vanilla game. ee56751
Interesting find. This is good to know when validating bugs in the future against vanilla Diablo. Basically, we can use the same seed for dungeon generation when validation, but we can't use save files.
There is an overflow bug in the dungeon algorithm of Cathedral that sometimes causes out-of-map pieces. Documented here.
I can confirm that Devilution works correctly (i.e. is bugged like vanilla). Current known seeds:
Cathedral:
2588
4743
7281
9345
15236
Eldritch Shrine Bug
The Eldritch shrine (turns healing/mana pots into rejuvs and full pots into full rejuvs) uses the player's holding item buffer to temporarily store the rejuvs. What could possibly go wrong here?........ xD xD
If you click on the shrine and then pickup an item from your inventory/belt, the item you're holding will get overwritten. When you place it back down, it turns into a rejuv. BEWARE!
As a side note, this can be exploited for an extra rejuv, grabbing say 1 piece of gold or some junk item.
Bugfix
The routine for this in OperateShrine should use a temporary buffer local to the function or the global temporary buffer curruitem to fix this. :)
As a side note, this can be exploited for an extra rejuv, grabbing say 1 piece of gold or some junk item.
Haha, great hack!
Edit: actually the spaces in yellow are spots where there aren't any pixels in the .CEL, so the game never draws anything there. The function responsible for drawing the void fills them black. The only way to fix this is to edit the CEL map and create pixels in the empty spots.

By chance I stumbled upon a broken tile on level 5. Here is the picture with seed and location:

It's great. We are gonna be able to create a version of Diablo that fixes all known bugs. Of course, Devilution will contain all original bugs to stay true to its origin.
Another bug where standing in certain spots overwrites the top left corner of the control panel:

Another bug where standing in certain spots overwrites the top left corner of the control panel:
Is this in vanilla too? Never seen the panel being incorrectly rendered before.
All your belt items also went invisible. Could be a miss calculated CelSkip/CelCap
@mewmew Yeah it's in vanilla. You won't notice the bug unless you hover your mouse over that spot in the control panel, it overwrites the panel graphic. I rewrote the whole render and discovered this bug while testing. It's likely caused by DrawMain not blitting all parts of the screen all the time.
@AJenbo The belt items is just a side effect of the new render, not in vanilla. If you notice there's transparency! <3
Edit: attached save file so you can test it. Load the game and place mouse over top left corner. single_4.zip
Interesting is that this bug doesn't happen in the debug release or prior. So it was caused by something changed in the render in 1.00.
@AJenbo had pointed this bug out awhile back, as it was thought to be caused by my render re-implementation. Actually, it's caused by the whole eflag system where for some reason, when walking south east, arches aren't drawn above the player. So the fix was to add separate drawing code outside of the render. I had to catch it mid action, but the spots in yellow are where eflag tiles are drawn. They overwrite the book case. IIRC this bug was fixed in the PSX version, since they ditched eflag entirely.

Nice catch, my print screen has a delay so getting shots like this is a pain :)
The other yellow box is causing issues when we upgrade the render to have per-pixel transparency because it renders the tile twice, resulting in 75% opaqueness instead of 50%
Here's another render issue:

https://github.com/diasurgical/devilutionX/issues/111
In the very tristram itself :)

Zoomed:

I'ts more obvious in tchernobog, that's what made me notice it :P
@AJenbo I believe that issue is the same one I reported above. There's a broken tile that can occasionally spawn in the caves that does that.
Here is a list of seeds for Caves with that broken tile and the coordinate of it:
seed 24, x 28, y 10
seed 206, x 19, y 27
seed 265, x 27, y 6
seed 534, x 26, y 20
seed 1714, x 24, y 25
seed 1980, x 12, y 14
Here is code to fix the tile by brute force. It should be ran during DRLG_L3:
for(j = 0; j < 40; j++)
{
for(i = 0; i < 40; i++)
{
if(dungeon[i][j] == 9 && dungeon[i - 1][j] == 13 && dungeon[i][j - 1] == 14)
{
dungeon[i][j] = 7; // set broken tiles to dirt instead of stalagmite
dungeon[i][j - 1] = 7;
dungeon[i-1][j] = 7;
}
}
}
Additionally, here are seeds for Catacombs that contain the broken wall tile:
550
2346
2377
2992
5162
6365
6500
6711
7152
7155
7462
And the code to fix it:
if(dungeon[i][j] == 15 && dungeon[i][j + 1] == 1) { /// add this check
dungeon[i][j + 1] = 8; // change left wall to left corner
}
Last but not least, some more seeds with the overflow bug in DRLG_L1 documented by @mewmew:
24627
29946
32559
Hi all, the latest changelog for The Hell 2 had me raise an eyebrow:
Fixed in-game menu animations, they would stop after machine spent 49+ days without rebooting (a rare original D1 bug, but we fix them all anyways);
Were you guys able to find this in the cleanup?
Yeah, tied to how the Windows API works, for DevilutionX it's instead 49 days after starting the game, so much less likely to happen. https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-gettickcount
so much less likely to happen.
Not on my watch!
There is also another annoying time bug where once you hit the year 2038 the random function overflows and returns a value past 0x7FFFFFFF (a negative number) and thus all randomness ceases and dungeon is the same.
There is also another annoying time bug where once you hit the year 2038 the random function overflows and returns a value past 0x7FFFFFFF (a negative number) and thus all randomness ceases and dungeon is the same.
Really? Have you tried it by setting the clock? Haha, would be a somewhat incredible way to cheat the PRNG :dagger: