Randy87 Posted January 11, 2018 (edited) For those who are interested, here is a command line utility to extract and convert GBA Doom 2 maps to PC format from a ROM file.gbad2_conv.7z The converted maps will require BSPing. I have provided a MAPINFO to match up the maps appropriately. GBA differences to note can be found on the wiki:Doom II for Game Boy Advance Edit: I should note if anyone is going to play through these maps, that I have no idea which maps work or don't. I do know the Grosse is not completable without re-tagging the exit door sector. The maps are direct conversions and come with any problems that the maps originally had. e.g. ghost secret sectors. Edited January 11, 2018 by Randy87 17 Quote Share this post Link to post
40oz Posted January 11, 2018 Nice! I saw videos of Industrial Zone A and Industrial Zone B but I've never gotten to play them. I'd love to play GBA Doom 2 as a PWAD. 0 Quote Share this post Link to post
VGamingJunkie Posted January 11, 2018 Is the reverse also possible, injecting custom maps into Doom 2 GBA? 1 Quote Share this post Link to post
Randy87 Posted January 11, 2018 Just now, MetroidJunkie said: Is the reverse also possible, injecting custom maps into Doom 2 GBA? Not without a lot more work and reversing more engine data. GBA Doom 2 uses a different engine and it shows in the data. I haven't been able to make much sense of what might be the BSP data, but then again I know nothing of BSP. 0 Quote Share this post Link to post
Avoozl Posted January 11, 2018 Amazing how this thread just turned up, the other day I was just thinking about what if there was a GBA Doom TC. 0 Quote Share this post Link to post
riderr3 Posted January 11, 2018 Thanks! I like this kind of hacking stuff. 5 hours ago, MetroidJunkie said: Is the reverse also possible, injecting custom maps into Doom 2 GBA? I think it's not yet... But I hope someday it will happen. But I know for GBA Doom 1 some people made a mod (hack) "GBA Doom Lost Levels" with some ID levels which not in official release. Though Doom 2 for GBA have different engine which more harder to hack. 2 Quote Share this post Link to post
Linguica Posted January 11, 2018 5 hours ago, Randy87 said: Not without a lot more work and reversing more engine data. I'm curious how this can be the case - if you have it figured out enough to convert GBA map data to PC map data, what is preventing you from doing the reverse? 1 Quote Share this post Link to post
jmickle66666666 Posted January 11, 2018 @Linguica probably because it's just pulling the lines etc. The bsp still needs to be built. Unless GBA doom uses the same bsp info as vanilla does it will require reverse-engineering that 2 Quote Share this post Link to post
Randy87 Posted January 11, 2018 (edited) I was surprised to find that most of the PC fields were in place and mostly the same. Unlike PC Doom, GBA D2 decompresses the map into memory and uses it in-place. It does not read field by field into target structs. There is a lot of unidentified zero space. Although, this space probably doesn't matter. I have yet to locate the pointer table for maps. I located the maps manually. We need this pointer table to do any replacements. Each map has 2 unknown chunks of data before the compressed geo/thing/bsp. The BSP format is unknown. There are still a few unidentified fields in the various map lumps and the header. Grosse doesn't open the exit door, but has a weird sector with a switch outside the level. How does GBA D2 open the door? I dunno, some kinda flag or scripting? I'm not saying it's impossible, its more that I don't care. I just wanted to grab the maps and check em out. Edit: I can zip up my notes if anyone wants to peek, but I doubt they are useful or particularly readable. uploading anyway. gbad2_notes.7z Edited January 11, 2018 by Randy87 0 Quote Share this post Link to post
SaladBadger Posted January 12, 2018 I have a hunch the pointer table is at 0x10FF08 within the ROM I have. The table contains 34 elements with four 32-bit values each, presumably. Its then padded out with a pattern of FFFFFFFF 00000000 FFFFFFFF FFFFFFFF to fill out the entire table (64 entries, if I recall correctly). Similar looking data in the Duke Nukem Advance rom has much less than 34 entries, the same as the amount of maps in that game. Would be neat to see if this tool works on those maps... 0 Quote Share this post Link to post
Randy87 Posted January 12, 2018 42 minutes ago, InsanityBringer said: I have a hunch the pointer table is at 0x10FF08 within the ROM I have. The table contains 34 elements with four 32-bit values each, presumably. Its then padded out with a pattern of FFFFFFFF 00000000 FFFFFFFF FFFFFFFF to fill out the entire table (64 entries, if I recall correctly). Similar looking data in the Duke Nukem Advance rom has much less than 34 entries, the same as the amount of maps in that game. Would be neat to see if this tool works on those maps... Interesting, I checked that area already in my note file BeforeMap01.txt. I guess by the point I didn't need the table anymore and didn't look very hard. However, it does appear to be the table. 0 0 231924 <-- 379 230348 230728 261572 <-- 1105 258672 259780 300340 <-- 1226 0xD8180/885120 + those values. 1 Quote Share this post Link to post
riderr3 Posted January 12, 2018 Some level design comparisons with the PC version in the screenshots, for those who are interested. Spoiler It seems that they took as the basis version 1.666, looking by these bars in MAP02 Inmost Dens for some unknown reason is truncated There are barriers in some levels, probably preventing visplane overflows (or slowdowns?) Industrial Zone and Chasm is divided into two parts each But overall, the design is very close to original Doom 2. 4 Quote Share this post Link to post
Randy87 Posted January 12, 2018 Does anyone know the best way to copy contents from one map to another? I gave it a try in GZDB, but it messed up some textures. I can probably handle that, but just wanted to see if there was an alternative. I'd like to get the split maps "merged" for vanilla play in Chocolate-Doom. 0 Quote Share this post Link to post
SaladBadger Posted January 12, 2018 I was hoping the block of text at 0xDBB800 would shed any light on the subject of Grosse's opening, but it seems not. The similar block in the DNA rom has some scripting commands here and there, but all the block for Grosse has is the normal key messages, secret message, and those four weird numbers which are 6:66 in most of the later maps. I'm guessing the keens are super hardcoded in a different manner, or there's another scripting block somewhere. If I can get a chance I'd like to retool this to work with DNA's maps, could be fun to see how they compare. 1 Quote Share this post Link to post
Randy87 Posted January 12, 2018 (edited) 9 minutes ago, InsanityBringer said: I was hoping the block of text at 0xDBB800 would shed any light on the subject of Grosse's opening, but it seems not. The similar block in the DNA rom has some scripting commands here and there, but all the block for Grosse has is the normal key messages, secret message, and those four weird numbers which are 6:66 in most of the later maps. I'm guessing the keens are super hardcoded in a different manner, or there's another scripting block somewhere. If I can get a chance I'd like to retool this to work with DNA's maps, could be fun to see how they compare. Well, the tool is mostly hardcoded and crap. I slap-dashed/copy pasted it to get it working and out the door. It would have taken me a couple more days to do it right. I figured it didn't matter as it was only going to serve one purpose against a single ROM. I know nothing about Duke Nukem 3D's formats, but I'll do some peeking. If you need any help with the code, I may be able to assist or adapt what I have from this tool. Edit: Also, the numbers may be difficulty specific par times? Edited January 12, 2018 by Randy87 0 Quote Share this post Link to post
Linguica Posted January 12, 2018 1 hour ago, Randy87 said: Well, the tool is mostly hardcoded and crap. I slap-dashed/copy pasted it to get it working and out the door. Every tool is hardcoded and crap... until it isn't. 1 Quote Share this post Link to post
Randy87 Posted January 12, 2018 Here is a map decompressor for the Duke Nukem Advance ROM. Seems like there are 19 maps and from what I've seen. But, this is probably getting off topic now. dna_map_decode.7z 2 Quote Share this post Link to post
Hendricks266 Posted January 13, 2018 5 hours ago, Randy87 said: Here is a map decompressor for the Duke Nukem Advance ROM. Seems like there are 19 maps and from what I've seen. But, this is probably getting off topic now. dna_map_decode.7z Very cool! 0 Quote Share this post Link to post
VGamingJunkie Posted January 13, 2018 7 hours ago, Randy87 said: Here is a map decompressor for the Duke Nukem Advance ROM. Seems like there are 19 maps and from what I've seen. But, this is probably getting off topic now. dna_map_decode.7z Keeps telling me it's an invalid rom. 0 Quote Share this post Link to post
WadArchive Posted January 13, 2018 42 minutes ago, MetroidJunkie said: Keeps telling me it's an invalid rom. Make sure it is the USA version. I got the same error with the European rom 1 Quote Share this post Link to post
Randy87 Posted January 13, 2018 In case there is any confusion, this decompresses the map data out of the ROM. The output data is only useful if you want to help reverse the map format. This does not convert the maps into anything playable. Also, yes, it works on the US version. 0 Quote Share this post Link to post
Randy87 Posted January 13, 2018 New Info. A cursory examination of the Duke Nukem Advance levels shows them to be identical to Doom 2 GBA's. Looks like the engine was hybrid and meant to support both games in a common format. That would explain a lot of the extra/unknown fields. I'm looking at the map geometry in slade right now. 3 Quote Share this post Link to post
SaladBadger Posted January 13, 2018 Yeah, they're both using the Southpaw engine, which was designed for GBA specifically, which is why I had mentioned DNA. I think DNA was the first game out. There's one other, Ice Nine, I've taken a cursory glance at it as well as ripped its graphics, I have no reason to suspect its much different. 1 Quote Share this post Link to post
Randy87 Posted January 13, 2018 The map format is clearly close to Doom's with some extra stuff layered on. I assume they started development of the engine for Doom and later realized they wanted DN3D support. The vertices and the lines referencing them make that clear. It is nothing like DN3D. Each enemy has it's own frame table that is VERY close to Doom's. The only thing similar to DN3D is maybe the thing types referencing the sprites. DNA is more like DN3D ported as a Doom mod than it is DN3D internally. It's also obvious since none of DN3D's maps are present. These are all hand made in this Doomish map format. Porting these maps to DN3D would be tedious and it lacks some features needed. I think the most viable solution would be a GZDoom mod. It support slopes and scripting. Ripping the maps and graphics would be the first step, both of which we can already do. I haven't looked, but I assume the frame tables are there and the same form as GBAD2. DECORATE could mimic these. Scripting? I don't know anything about it, but it's usage looks light and could be manually rewritten. However, DNA kinda sucks. Maps seem linear and rather bright and there are only 19 of them. I have no personal interest in porting these maps around. I will help out where I can if someone does decide to work on it though. Just PM me. 0 Quote Share this post Link to post
SaladBadger Posted January 13, 2018 I'd be willing to take a look at porting them. I extracted all the graphics ages ago so I have them on hand. The engine has some really strange oddities, both DNA and Ice-Nine have all their flats named the same as Doom and Doom 2 for whatever reason, which is confusing. I wonder if they used a Doom editor as a basis that had some weird limitations. I dunno. 0 Quote Share this post Link to post
Da Werecat Posted January 13, 2018 (edited) 18 minutes ago, Randy87 said: However, DNA kinda sucks. I think it's alright. The first thematic episode looks rather simplistic - I'm assuming it's because they wanted to kick the game off with a decent frame rate. The maps become more complex later, and there's even a few city levels, though of course they're nowhere near DN3D in terms of complexity and gimmicks. Frame rate predictably gets crappier too, but not to the levels of Serious Sam Advance. Edited January 13, 2018 by Da Werecat 0 Quote Share this post Link to post
Cacodemon345 Posted January 13, 2018 (edited) I believe the engine to be recycling a lot of map code from Doom engine. It feels like Amulets of Armor, where everything else other than the map and WAD format is from scratch. I personally would prefer people to work on porting this to PC. Edited January 13, 2018 by Cacodemon345 1 Quote Share this post Link to post
Dexiaz Posted January 13, 2018 On 12.01.2018 at 3:35 AM, riderr3 said: But I know for GBA Doom 1 some people made a mod (hack) "GBA Doom Lost Levels" with some ID levels which not in official release. I am the only one who did this. Anyway, this is unbelievable! I spent a lot of time to understand how to get those maps. Even more, how they work, which format they use, etc. I'm interested to do something like my previous "GBA Doom Lost Levels" project. Of course, they need to be ported into GBA Doom 2. As I can see there are no working tools to port PC maps into GBAD2 format. Anyway, looking forward for it! 1 Quote Share this post Link to post
loveless Posted January 14, 2018 What port is recommended to play this with? PrB+, GZDoom? 0 Quote Share this post Link to post
NoCaloriePepsi Posted January 14, 2018 This is pretty interesting. But who would really wanna play GBA Doom levels? Aren't they for the most part just stripped down versions of the levels we all know and love? 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.