-
Posts
5910 -
Joined
-
Last visited
-
Days Won
84
Content Type
Profiles
Pokédex
Portal
Technical Documentation
Pages
Tutorials
Forums
Events
Downloads
Gallery
Blogs
Everything posted by evandixon
-
Pokémon Mystery Dungeon: Blue Rescue Team (U) Action Replay Codes
evandixon replied to Demonic722's topic in RAM - GBA Cheats
Are the quick level up codes too potent for you? Here's a less powerful version of the player 1 level 30-40 one. It's 1/4 as effective. 0211544C 0000F424 -
black / white Pokémon Blaze Black & Pokémon Volt White
evandixon replied to Drayano's topic in ROM - NDS ROM Hacks
If you have the patch you can upload it. It's just against the rules if you upload the patched ROM. -
CURSE YOU IDENTICALLY NAMED UPDATE OF POKEGEN!!!! I had 3.1.13 then I downloaded the latest version (also 3.1.13) to find it was there. Anyway, that option doesn't seem to work for any supported game, at least in English. Perhaps it was in development, and the dev forgot to hide it when posting a secret bug fix.
-
Calm down, everyone. Pokegen doesn't edit events or general save info like Trainer Name and Money, so there's no Tools -> Savegame Editor. I don't know why you're seeing that option.
-
black / white Pokémon Blaze Black & Pokémon Volt White
evandixon replied to Drayano's topic in ROM - NDS ROM Hacks
You'll have to look around the internet, see if you can find a mirror. -
XY Event - Shiny Gengar in JPN/US/EU regions!
evandixon replied to Mega Sceptile's topic in Event Pokémon News
Sorry, but you'll have to get one yourself from a participating Gamestop. -
tool SDSME - Spiky's DS Map Editor
evandixon replied to Markitus95's topic in ROM - NDS Research and Development
Here's images 1 and 3. The 2nd image stopped working for some reason, but it was an in-game image of the first image, with the texture for the trees out of place, similar to the 3rd image. Images.zip -
tool SDSME - Spiky's DS Map Editor
evandixon replied to Markitus95's topic in ROM - NDS Research and Development
That's odd, they work fine for me. They're standard forum attachments hosted on this website. Were you given any error message? -
Yay, I'm helping! I think that would be stored in one of the GROUND\vXXpXXaXX.wan files. psy_commando's sprite tool can extract some tiles from them, and will probably support them much better in the near future. I was actually talking about the source you just posted. I compiled it and besides line 41 of smdRead.cpp, which doesn't seem to be used anywhere, some tracks like Beach Cave and Drenched Bluff (bgm0021 and bgm0022) both had some sort of int exception (I didn't look too far into it, just let the program continue running, which resulted in the position on the track it failed on holding the same note until the end of the song, while the other tracks play.) Out of curiosity, what compiler do you use? I'm not that familiar with C++ for the time being, and haven't found how to compile using the makefiles you included, I just put the cpp files into Visual Studio to let it compile them.
-
Good work! I've occasionally looked around the web to see if anyone did anything like this, and you're the first person to accomplish a (somewhat) working program in the many years the game's been out. On some tracks, there's some sort of integer exception that causes one or two tracks to be locked to the same note, but this is great progress nonetheless. Given more time, I'm sure you'll improve it. I must have mistyped that, I only see v21p02a1.wan now that I look at it. Once again, good work everyone!
-
Looking at it again, that's the problem, it's only a few pixels off, so part of the sprite is cut off and put on the next line. Is SIR0 + Sprite in CommonFileFormats.txt up to date? If so, I can take a look and see if I can find anything. Nothing from within the program, just the generic "ppmd_sprex_broken.exe has stopped working...". This time I chose to debug it, and the error message is: Unhandled exception at 0x00B5E74C in ppmd_sprex_broken.exe: 0xC0000094: Integer division by zero. This is GROUND/v21p05a1.wan. GROUND/v39p01a1.wan had some tiles come out before crashing.
-
Good work! A few of the Bulbasaur are a little odd, but unless there's something like in .bgp that controls an x or y flip (which I don't think would help), it may or may not be garbage. It may be beneficial to look at this site if you haven't already. The misaligned sprites didn't seem to appear on that sheet. The wan files in the FONT folder don't work with this tool, while in the GROUND folder, the aXXX.wan files store footprints (extracted as 4 images), and all the rest appear to be part of dungeons, which don't seem to make it all the way through this program, probably because of a slight file format variation (or something you haven't seen yet).
-
Looking at MAP_BG, I have absolutely no idea what the format for .bga and .bma is, and it's not possible to render the image without knowing that. .bpl is the palette, the same format as in the block in .bgp, and .bpc contains the chunks/tiles (whichever term you prefer) in the same format as in the block in the .bgp. As for the Pokémon sprite files, I can't tell where one block starts and another begins. Tomorrow, I'll take another look and re-read through your notes in case I missed something. The wan files would possibly be easier to figure out if I had some idea of what it actually contained. Not quite yet. In PMD, shiny Pokémon are considered different Pokémon We currently don't know how to extract Pokémon sprites, let alone change them. But we're making progress.
-
Each 8x8 chunk/tile has its own palette, 16 of the 256 colors, starting at a particular offset, possibly different for each chunk/tile. The MAP_BG files appear to have all the data in different files. I have no idea why. I'll have to look at it further, but each file is probably similar to the blocks in bgp.
-
I did it. For a while I thought there were only 4 palettes. There's actually 64 possible palettes, all 16 color sequential portions of the 256 color palette. The following code will convert a *.rawimg into a png: The next step will be to reverse the process to convert png's into a raw image, then bgp. That, or analyze other file formats.
-
I think the bgp files are the same format as the ground sprites you researched earlier. Besides the palate, there's the same issue with the inconsistent length of lines for the tiles. For the Nintendo logo and ESRB stuff at the beginning, it's definitely 4bpp, with some extra data before it. I'd imagine all that data is how all the chunks fit together, and perhaps the palate. 0x420-A1F may be how the chunks are located on the screen. The DS's resolution is 256x192, giving 49152 square pixels. Since each chunk is 64 square pixels, that gives 768 total chunks on the screen, and since the block I mentioned is 0x600 bytes, that gives 2 bytes per chunk to be located. (And seeing that most of the screen is white and most of that block is "01 00 01 00 01 00...") I'll test that later, but that may be how bgp files work. Update: Using the following VB code, I got close: Imports System.Drawing Module Module1 Sub Main() Const filename As String = "s09p05a" Dim file As Byte() = IO.File.ReadAllBytes("C:\Users\Evan\Desktop\sky\data\BACK\" & filename & ".rawimg") Dim imageData As Byte() = GenericArrayOperations(Of Byte).CopyOfRange(file, &HC40, file.Length - 1) Dim mapData As Byte() = GenericArrayOperations(Of Byte).CopyOfRange(file, &H420, &HA1F + 1) Dim chunks As New List(Of Bitmap) For count As Integer = 0 To imageData.Count - 1 Step 32 Dim i = (ChunkToImage(GenericArrayOperations(Of Byte).CopyOfRange(imageData, count, count + 31))) chunks.Add(i) 'i.Save("C:\Users\Evan\Desktop\sky\data\BACK\temp\" & count / 32 & ".png") Next Dim outputBitmap As Bitmap = ProcessMapping(mapData, chunks) outputBitmap.Save("C:\Users\Evan\Desktop\sky\data\BACK\" & filename & ".png") End Sub Function ProcessMapping(Data As Byte(), Chunks As List(Of Bitmap)) As Bitmap Dim i As New System.Drawing.Bitmap(256, 192) Dim g As Graphics = Graphics.FromImage(i) Dim dataIndex As Integer = 0 For y As Integer = 0 To 23 For x As Integer = 0 To 31 Dim index As Integer = Data(dataIndex * 2) If Chunks.Count >= index - 1 Then Select Case (Data(dataIndex * 2 + 1) Or &HF0) - &HF0 Case 0 g.DrawImage(Chunks(index - 1), New Point(x * 8, y * 8)) Case 1, 2 index = BitConverter.ToUInt16({Data(dataIndex * 2), (Data(dataIndex * 2 + 1) Or &HF0) - &HF0}, 0) If Chunks.Count > index Then g.DrawImage(Chunks(index - 1), New Point(x * 8, y * 8)) Else Console.WriteLine(index) End If Case 4 Dim icopy = Chunks(index - 1).Clone icopy.RotateFlip(RotateFlipType.RotateNoneFlipX) g.DrawImage(icopy, New Point(x * 8, y * 8)) Case 8 Dim icopy = Chunks(index - 1).Clone icopy.RotateFlip(RotateFlipType.RotateNoneFlipY) g.DrawImage(icopy, New Point(x * 8, y * 8)) Case &HC Dim icopy = Chunks(index - 1).Clone icopy.RotateFlip(RotateFlipType.RotateNoneFlipXY) g.DrawImage(icopy, New Point(x * 8, y * 8)) Case Else g.DrawImage(Chunks(index - 1), New Point(x * 8, y * 8)) End Select Else Console.WriteLine(index) End If dataIndex += 1 Next Next Return i End Function Function ChunkToImage(Data As Byte()) As Bitmap Dim i As New System.Drawing.Bitmap(8, 8) Dim g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(i) Dim colors As New List(Of Byte) For Each b In Data colors.Add(((b) Or &HF0) - &HF0) colors.Add(((b >> 4) Or &HF0) - &HF0) Next Dim colorIndex = 0 For y As Byte = 0 To 7 For x As Byte = 0 To 7 g.FillRectangle(Pen(colors(colorIndex)), x, y, 1, 1) colorIndex += 1 Next Next g.Save() Return i End Function Function Pen(Color As Byte) As Brush Dim out As New SolidBrush(System.Drawing.Color.FromArgb(255, Color * 16, Color * 16, Color * 16)) Return out End Function Public Class GenericArrayOperations(Of T) Public Shared Function CopyOfRange(ByteArr As T(), Index As Integer, EndPoint As Integer) As T() Dim output(Math.Max(Math.Min(EndPoint, ByteArr.Length) - Index, 0)) As T For x As Integer = 0 To output.Length - 1 output(x) = ByteArr(x + Index) Next Return output End Function End Class End Module The mapping chunk starting at 0x420 has two bytes for every 64 square pixel chunk. The first byte and lowest few bits of the second byte, for the most part, appears to be the index of the chunk. The second byte's greatest few bits are a bitfield of what operations to do, to flip on the x, y, or both axises. I haven't investigated the palate yet, this is a grayscale version. [update] There are 4 palettes in bgp files, each chunk can use one of the 4. Still investigating how that works.
-
Works great! We'll have to analyze the actual image encoding, but it couldn't have happened without that decompression. I can do some research tomorrow. It's probably similar to the sprite encoding implemented in the python file you linked to. Codeplex doesn't seem to have any weird license issues. For each project, there's a variety of licenses available, like Apache, GPL, MIT, and several others. If you post your source somewhere like that I may take a look, but I know only a very little C++ at the moment and couldn't do much with it. Having read up on it somewhat today, I may be familiar enough with it to understand what's going on, if not now, in a few days. Attached: image of a decompressed bpg from the BACK directory. Capture.zip