Jump to content

evandixon

Administrator
  • Posts

    5910
  • Joined

  • Last visited

  • Days Won

    84

Everything posted by evandixon

  1. 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
  2. It seems that Blue Rescue Team's offsets are off by a few bytes. Here's an experimental version of Sky Editor with support for European Red/Blue saves. You'll have to use File- > Open (Let me choose the save type), and you'll currently only be able to edit the Pokémon. Debug.zip
  3. If you could upload your save file, I can take a look at it, to see if I can get it at least partially working.
  4. Speculating, I'd say that the internal names are left over from development. Especially seeing that most of them are only a ~14 character substring of what would logically be the file name. It could be that upon compiling the ROM, the music names were replaced with numbers.
  5. I mean like Diamond/Pearl... If you're using Pokémon Diamond, you can try this code: 94000130 FCFF0000 B21C4D28 00000000 B0000004 00000000 0000AA3C EDB88320 2000AA68 00000007 D2000000 00000000 Press L+R then walk into a Pokemart.
  6. You would need a code that resets the used wondercard IDs. There's also a code for Diamond/Pearl that makes a delivery man appear in the Pokemart with the egg, no wondercards needed. What specific game are you using?
  7. If you have the patch you can upload it. It's just against the rules if you upload the patched ROM.
  8. 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.
  9. 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.
  10. You'll have to look around the internet, see if you can find a mirror.
  11. Sorry, but you'll have to get one yourself from a participating Gamestop.
  12. 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
  13. That's odd, they work fine for me. They're standard forum attachments hosted on this website. Were you given any error message?
  14. 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.
  15. That's a weird bug in 3.1, and I'm sure I fixed it long ago. Sky Editor 3.2 Beta 1 fixes that, and should work fine. The only reason it's a "Beta" is because language support isn't complete, and I now like to have more polished releases.
  16. 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!
  17. 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.
  18. 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).
  19. As long as you're restoring it to the original cartridge, you should be able to.
  20. Are you sure it's that pattern, and not square blocks? Perhaps there's some sort of positioning section like in .bgp, telling the relative location of each tile. (Having not looked in a while, I don't know, just something to consider.)
  21. 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.
  22. 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.
  23. 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.
  24. 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.
  25. 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
×
×
  • Create New...