We're using cookies to ensure you get the best experience on our website. More info
Understood
@thunderstruckRegistered July 1, 2011Active 4 days, 17 hours ago
1,114 Replies made

I think Soviet Union 2011 is a pretty good homebrew, even better then the Blox games.

I got bored so I looked into the what the game writes into the BGMaps. I already saw once that the levelmenu has the numbers 1 to 5 on a BGMap. I thought that was strange because there are only 4 stages. A closer look showed that there is also an additional image for a fith stage. I attached a screenshot.

Attachments:

Well, today I fixed the score… kind of. I thought fixing the score wasn’t possible for a long time as I don’t see a way to replace the 1234567890 on the credit screen with actual score. The reason for that it is an image (at least I assume it is) and I don’t see a way to replace it with a method that writes the score there.

However, I took a far simpler approach to display the score. After you beat a level the game displays a score-screen that shows the points you made in the level as well as the sum of those points. I simply change the game that way, that it displays the sum of all points you made in the current stage. If you die or beat a stage this is reset to 0.

This way the score-screen of x-14 always displays the final score for the current stage. Fixing the score this way was actually pretty simple to pull of. I think this is an acceptable compromise.

I just played it on Hardware and it works just fine. Cool game.

I added the song selection to FacEdit and it works fine. I also tested it on hardware. The music works fine but I experienced some slow downs. That may be caused by somthing else though.

Ok, I did what I talked about yesterday and everything seems to work fine now. I still have to test it on hardware and in every single level.

After that I will add everything to FacEdit.

Lester Knight wrote:
thunderstruck,
if you are able to change the stage audio, what about sound efx? i realize the game only has a handful of them, but it would be great if we could make custom sounds for running and the gun.

Well, I don’t add music. I just use what is hidden in the ROM. All of the sound effects are stored in one song which starts at 0x1B86A8. I think I saw another pointer array somewhere that points to the single sound effects within this song (somewhere around 0x1C3314). If you want to change them you will have to reverse engineer how the music is stored in the ROM and the write a tool that converts your new effects to this format. Please tell me if you figure anything out.

Well, I started changing everything an hour ago. Everything worked out very well. A different song per level can now be loaded without any problems. However, another problem popped up. If you die my custom level counter is not reset properly. The result of this is that the the music in level 1-1 is the one of the last level if you died (or finished the game).

To fix this I have to find some place in the stage-select screen to reset my level counter. That’s a task for tomorrow.

ok, so basically the custom song loading logic works fine. There is just one problem: stuff is loaded in the wrong order meaning the game loads the music first and then loads the current level to the wram. As the game reloads the music during a level the music loads the wrong song when this happens.

I tried through some solutions to fix this without any luck so far. However, I made a new plan to to solve this problem. I found the place in the ROM that loads the score screen. This means I can add some code there that counts up every time a level is finished. That way I’m independent from what the rest of the game does.

I’m pretty tired today so I guess I will start with this tomorrow or so.

ok, I wrote everything into the ROM and it kind of works. The pointer to the current music is now depending on the current stage and level loaded from an pointer array I created. I encountered on problem though.

I discovered the place in the WRAM where the current level is stored a while ago as I needed this for hacking the maze loading logic. During the running game the music is reloaded if you for example come close to an enemy. In this case the position in the WRAM does not contain the current level anymore and the wrong music is loaded. I already have a plan how to fix this. Probably gonna try it out tomorrow.

I started hacking the song loading logic. The results look good so far. I managed to replace the current song with a different one by jumping out of the original code, checking if song 6 is going to be played, replacing the respective pointer if song 6 is going to be played and jumping back to the original code. However, I hard-coded the pointer that replaces the original one. So the music still changes for all levels.

The next step is to check the current level/stage and load pointers somewhere out of the ROM depending on those values.

I started looking at the sound loading logic and made a plan how to hack it. The basic problem is that I’m not really good in assembler so I have to check out examples and the tech-scroll all of the time. It is kind of a tedious work and takes me allot of time. However, I think I know what to do next. I guess I will start next week or so to actually hack stuff.

bigmak wrote:

thunderstruck wrote:
HorvatM recently figured out how to deactivate the debug-menu. He told me how to do it so I included it into the level editor.

Woo Woo

Really wanted this done, so people wouldn’t just people to cheat thru all of the hard work you’re doing.

-Eric

I knew you would like this. I barely did anything though. For me this seemed really complicated (much more then changing the mazes). Luckily HorvatM figured it out.

HorvatM recently figured out how to deactivate the debug-menu. He told me how to do it so I included it into the level editor.

Make sure you have the linker script from this thread http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=4483&post_id=20963#forumpost20963 referenced in your makefile.

Are you using the linker script dasi published?

I was busy with something different yesterday but I just had a brief look into how the sound is loaded. It seems kind of complicated though. It will be more complicated then what I did with loading the mazes. However, I will check if I find a simple solution. There are not too many songs after all so maybe it will just be a different song per stage in the end.

I was forced to give it a try yesterday. I like hoe you organized everything and the custom button bar is great. Good job.

jrronimo wrote:

thunderstruck wrote:

jrronimo wrote:
That’s awesome and fantastic work! It sounds like you’re working towards being able to pick what tune you want to play for each level? Perfect. 😀

I’d be very interested to see what the music “looks” like, programmatically. But maybe that’s impossible without the source code. I feel like something like that would go a long ways towards writing some sort of synth program or a tracker or something.

If you are intrested in sound I could go ahead and polish/comment the sources oh my midi player so that it can be released. It is still not perfect but maybe a good starting point.

That’d be great if you’ve got some spare time to do it! Not a high-priority project by any means — I’m super-noobish and it’ll be a long time before I do anything with it.

I will put it on my agenda then. The last time i released my sound engine people didn’t seem to be too interested into it, that’s why I haven’t taken the time to release the improved version yet. However, I think it is about time. I did something incredible stupid lately though causing me to loose some of my work-in-progress. Hopefully I will be able to recover my svn, otherwise I will have a serious problem.

jrronimo wrote:
That’s awesome and fantastic work! It sounds like you’re working towards being able to pick what tune you want to play for each level? Perfect. 😀

I’d be very interested to see what the music “looks” like, programmatically. But maybe that’s impossible without the source code. I feel like something like that would go a long ways towards writing some sort of synth program or a tracker or something.

If you are intrested in sound I could go ahead and polish/comment the sources oh my midi player so that it can be released. It is still not perfect but maybe a good starting point.