News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: FINISHED: Twin Bee "Remastered" (MESEN HD patch)  (Read 7990 times)

imkrut

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« on: May 15, 2020, 07:10:30 pm »
INTRO

Hello again friends!

Here's my latest! project (6th one!), while doing the tedious missing backgrounds for my previous project Battle City, I started working on this! This time it's a graphic makeover for Twin Bee for NES.




This is a great little game, and often cited as being responsible for creating the entire "cute-em-up" genre alongside Fantasy Zone (It's still pretty fun to play minus some questionable hitboxes, and I feel that it doesn't get enough praise in the west [despite having quite a few sequels, soft-reboot and even a full-fledged remake for the PSP] ) it has a 2 player co-op mode  (with a quite curious mode where P1 and P2 can combine their shots, something that's not often seen), and it's not too challenging!

With this I tried to strike a balance between old and new, and trying to keep the charm of the original, and even tho I did actually make an alt sprite with the classic colors for TwinBee, I feel is hard to pass on the charm of the Detana revision (and the actual arcade colors)



For this I would very much like to add a foreground UI with maybe a portrait of both Twinbee and Winbee, a more charming Title screen that showcases the characters, and ideally, I'd love to add moving animation to the sprite which do not exist (if player presses left-right on d-pad as a condition) and also tinker with custom music and add something like this bitching remix by Magical Trick Society in their album Shooting Battle Arena https://www.youtube.com/watch?v=1dc7lbF7ONA to the game but to be honest I'm quite lost as to where to start so far.


Also, I didn't find any patches that enhance the game, but if someone wants to work on a 3 player mode and add GwinBee I will absolutely support it and add graphics to it!

Anyway, here is some media, and no download at the moment!

COMPARISON IMAGES











NO PATCH YET, SORRY!




Anyway, here are some images










So, today I abused the fact that MesenHD dumps an entire new tileset (when it's basically the same tiles with slightly different colors), so now level 3 has sort of shifted into something quite different than the original. I took existing elements like bone bridge, mountains, dirt tiles, etc that were already part of the original, and gave it a more coherent theme.

So it went from this:



To this



This is very appealing to me, because the original Twin Bee was very limited on what it could offer visually, with all the levels looking fairly similar, despite trying to have variance (so I could offer a very spring-like 4th level, with pink colors, which I feel is the direction they wanted to take)

Problem with this is that even tho it's infinitely more pleasing visually (imo) it leads to a new set of problems:
1) Now enemies (even tho it's a very wacky in tone-game) feel a bit out of place there now, since the tone of the stage is so specific. The "theme" of the enemies for that stage is "animals" (from cockroaches to, crabs, lobsters, to whatever the hell is the gray thing with wings that shows up later) which already is super broad and felt kinda weird (not to mention that some of them are rocket-like creatures with wings, while others are merely "flying" animals.

At this point I'm toying with the idea of actually shifting some of the enemies around in different stages or even creating new ones that fit the theme better (something I already did to a certain point) hell, even make the end bosses thematically coherent (like, say on the first stage, all the enemies are fruits and vegetables, so make the "Onion King" ship, actually an onion...and not just something that remotely looks like it), so in this case, take all the enemies of stage 3 and make them consistent and thematically coherent (like cave-lava related, like bats and stuff) or in the proposed example of the 4th stage, make the enemies insect or flower related.... but I feel that it might be straying waaaaay out of the original if I did those things.

The alternative is to go back and just stick strictly to the original (so no lava level theme) and just keep everything the same.

An even more hardcore alternative would be to have a "faithful" pack that sticks to designs of the original and have a "Remix" version that basically takes the concept further.

Thoughts?

Also still looking for help on how/where to start with the audio/song in case someone can chip-in


« Last Edit: May 22, 2020, 02:13:55 am by imkrut »

mikeprado30

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: UPDATE: Twin Bee \"Remastered\" (MESEN HD patch) -in progress-
« Reply #1 on: May 17, 2020, 01:17:06 pm »
WOW!  It looks highly promising.  Keep going with this project.  Good luck! :thumbsup:

Vanya

  • Hero Member
  • *****
  • Posts: 1885
    • View Profile
Re: UPDATE: Twin Bee \"Remastered\" (MESEN HD patch) -in progress-
« Reply #2 on: May 19, 2020, 06:48:10 am »
I think giving the enemies more appropriate skins is fine.

The new volcanic theme looks great, but...
Why are the paths lava?
Shouldn't they still be paths of some sort since they lead to bridges?
Just my initial thoughts.

Great job so far!

kya

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Re: UPDATE: Twin Bee \"Remastered\" (MESEN HD patch) -in progress-
« Reply #3 on: May 19, 2020, 09:12:41 am »
You may try to use this very basic proof-of-concept sound replacement pack for TwinBee:

https://yadi.sk/d/1JC1vJMPNoLB8g

The sounds are completely unrelated, it is just a test.
I'm not sure, if the patch replaces the music also.
I'm sorry, but you'll have to test the oggs one by one to find out which sound is which.
I'm not even sure there are 58 sounds total, maybe there are more. There may be up to 255 of them.

The patch won't load, if your ROM's sha1 does not match the one from hires.txt.
In this case, you'll have to calculate the sha1 checksum for your ROM and insert it into your hires.txt
« Last Edit: May 19, 2020, 09:18:52 am by kya »

imkrut

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
Re: UPDATE: Twin Bee \"Remastered\" (MESEN HD patch) -in progress-
« Reply #4 on: May 19, 2020, 06:42:00 pm »
You may try to use this very basic proof-of-concept sound replacement pack for TwinBee:

https://yadi.sk/d/1JC1vJMPNoLB8g

The sounds are completely unrelated, it is just a test.
I'm not sure, if the patch replaces the music also.
I'm sorry, but you'll have to test the oggs one by one to find out which sound is which.
I'm not even sure there are 58 sounds total, maybe there are more. There may be up to 255 of them.

The patch won't load, if your ROM's sha1 does not match the one from hires.txt.
In this case, you'll have to calculate the sha1 checksum for your ROM and insert it into your hires.txt

Awesome, I'm downloading right now to take a look at it!

Edit: Yeah, unfortunately like you mentioned it only replaces some of the sounds and not the music (which is the main focus to be honest) I tried matching the music to some sounds but it just becomes a mess.

How does one go around making something like this tho?  thank you so much  Kya!
« Last Edit: May 19, 2020, 07:06:29 pm by imkrut »

kya

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Re: UPDATE: Twin Bee \"Remastered\" (MESEN HD patch) -in progress-
« Reply #5 on: May 20, 2020, 05:20:29 am »
Okay, then this patch should replace both music and sfx:

https://yadi.sk/d/3fwNDb5kz2sZEQ

It's still quite hacky and most likely will have issues.
It considers eveything that uses channel 2 to be music,
so these tunes will replace each other (only one of them may play at the same time),
and each of them will loop indefinitely until replaced by another.
You'll have to add long pauses to those tunes, which are not supposed to loop.
Fortunately, ogg compresses silence very effectively.

The tunes that only use channel 1 (and 4?) are considered sfx.
They are not looped and there may be a multitude of them playing simultaneously.

As for how to make these patches, mkwong98 explained it quite well previously.
You fire up Mesen's debugger, you set a breakpoint on writes to APU registers ($4000-$400F).
As soon as the breakpoint is reached, you check out the call stack.
Somewhere there will be an entry to a sound processing routine.
You go to the beginning of that routine and note registers or memory values it reads at its very start.
Most likely one of these will be the number of a music track or an effect to play.

Then you barbarically overwrite this routine, sending this value to an appropriate Mesen HD audio register
using something like this for music:
LDA $your_found_value
STA $4105
or for sfx:
LDA $your_found_value
STA $4106
and save your edits as .ips (an outstandingly handy feature of Mesen!)

That's it. You just have to learn the basics of 6502 assembly, which is not such an impossible task.
There are even online 6502 tutorials these days, where you can write and debug your code in a browser window.
« Last Edit: May 20, 2020, 08:03:09 am by kya »

imkrut

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
Re: UPDATE: Twin Bee \\\"Remastered\\\" (MESEN HD patch) -in progress-
« Reply #6 on: May 21, 2020, 10:54:35 am »
Okay, then this patch should replace both music and sfx:

https://yadi.sk/d/3fwNDb5kz2sZEQ

It's still quite hacky and most likely will have issues.
It considers eveything that uses channel 2 to be music,
so these tunes will replace each other (only one of them may play at the same time),
and each of them will loop indefinitely until replaced by another.
You'll have to add long pauses to those tunes, which are not supposed to loop.
Fortunately, ogg compresses silence very effectively.

The tunes that only use channel 1 (and 4?) are considered sfx.
They are not looped and there may be a multitude of them playing simultaneously.

As for how to make these patches, mkwong98 explained it quite well previously.
You fire up Mesen's debugger, you set a breakpoint on writes to APU registers ($4000-$400F).
As soon as the breakpoint is reached, you check out the call stack.
Somewhere there will be an entry to a sound processing routine.
You go to the beginning of that routine and note registers or memory values it reads at its very start.
Most likely one of these will be the number of a music track or an effect to play.

Then you barbarically overwrite this routine, sending this value to an appropriate Mesen HD audio register
using something like this for music:
LDA $your_found_value
STA $4105
or for sfx:
LDA $your_found_value
STA $4106
and save your edits as .ips (an outstandingly handy feature of Mesen!)

That's it. You just have to learn the basics of 6502 assembly, which is not such an impossible task.
There are even online 6502 tutorials these days, where you can write and debug your code in a browser window.


Awesome! Toying around with your patch, this is what I've figured out (on attached file only 26,27 and 31, 32 are added), and tho not perfect, it does a pretty ok job, there are some issues because both the main theme and powerup theme have an intro and a looping part, but they seem to play at the same time, so I added a silence/delay to the looping part, so it doesn't overlap the intro. Power up loop is tricky tho, because in game it's meant to loop up to a point and then transition back to the main theme. I guess I could add the transition and the main theme loop into the same file and have it loop a couple of times, but it will bug out at some point and play the powerup portion and again (not to mention increase the filesize noticeably) main problem with this is that after each death music is meant to reset to the main theme instead.


Music:

54= start jingle

26= pre-main theme?
27= main theme?

31 = pre-powerup theme
32 = powerup theme




SFX:

3= shot
4= double shot
5= bomb
6 = Triple shot

49= game over?

23= respawn jingle ?
51= death


10= enemy explosion
11= bomb ground explosion

15=  shoot bell
16 = Grab bell

21= ambulance?

Also after clearing stage 1, #n24 becomes the main theme (not sure after stage 2)

heres a test version in case you want to try it out

https://www.dropbox.com/s/g15d6ngcvzdnpva/TwinBee%20%28Japan%29.zip?dl=0

May 22, 2020, 02:09:46 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Hey guys!

In case anyone is following this; first of a little disclaimer. I got contacted by the mods, apparently my threads have been reported by several people here and the mods have some concerns themselves regarding me posting too much or something along those lines. I replied with my thoughts on the matter last monday, so I'm still waiting to see what's their final call on this.

On the meantime I wanted to share what I've decided regarding this particular project:

Next release will be the "Remastered" version and will be based mostly on the original designs (tho heavily based on the NES version, also takes some inspiration of the Arcade), both Twinbee and Winbee will be based on their original designs and enemies will stick closely to their original spritework.

When the next version of Mesen comes out (that includes foreground support) I'll add more goodies like portraits, easter eggs, redesigned enemies and bosses and even an "ending" to the game. That will be the "Twinbee Remix" version.

Right now Kya is helping a lot trying to add custom music to the game, and for the most part it seems to be working out, so maybe that will be included too.

Anyway, here are some images






« Last Edit: May 22, 2020, 02:09:46 am by imkrut »

kya

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #7 on: May 22, 2020, 09:04:20 am »
Concerning sound replacement, basically, there are 2 issues.
1. Intro+looping
2. No regression from power-up to normal music after loosing a life

I've started with the first one, thinking that I have got a lot of space (remember, I obliterated the original sound engine).
I've come with an algorithm to solve the issue, but it occupies 48 bytes of ROM.

Then I've started exploring the second issue, and it turned out that the regression happens deep in the original sound engine.
So I had to bring it back. And now I only have 28 free bytes for my code.

Here's an updated patch, which keeps the original sound engine intact (solves issue 2):
https://yadi.sk/d/IIqbqTBH-NvAWA
Issue 1 is left unsolved. I'll try to figure out something about it next week.

In the meantime, I don't think it's a fatal flaw, because (as you wrote yourself) you may extend your tracks to be 10-15 minutes long.
That's exactly what I did for Castlevania (for those tracks which have an intro part).

mkwong98

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #8 on: May 22, 2020, 11:14:40 am »
Maybe ask Sour to add the ability to one of these:
set loop points in the hires.txt file
set two music files as a single track with one as introduction and one as looping
use specific tags in the ogg file as loop points info like https://rpgmaker.net/tutorials/1341/


Aclectico

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #9 on: May 22, 2020, 05:18:14 pm »
Quote
Maybe ask Sour to add the ability to one of these:
set loop points in the hires.txt file
set two music files as a single track with one as introduction and one as looping
use specific tags in the ogg file as loop points info like https://rpgmaker.net/tutorials/1341/

This would be a great feature. I have also run into intro music + looping music problems and the workaround I've used is to alter a .ogg file so that the music starts with an intro. Then, I loop the remainder of the song within the .ogg file itself by copy/pasting the desired loop section a large number of times (sounds like imkurt may have tried something similar). The obvious downside is the inefficiency issue. A looping feature would be a welcome enhancement to avoid this type of workaround.
« Last Edit: May 22, 2020, 06:36:20 pm by Aclectico »

imkrut

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #10 on: May 22, 2020, 06:50:34 pm »
 
This would be a great feature. I have also run into intro music + looping music problems and the workaround I've used is to alter a .ogg file so that the music starts with an intro. Then, I loop the remainder of the song within the .ogg file itself by copy/pasting the desired loop section a large number of times (sounds like imkurt may have tried something similar). The obvious downside is the inefficiency issue. A looping feature would be a welcome enhancement to avoid this type of workaround.

I've been vouching for a feature to have "alt" sheets randomly displayed by a %.

So let's say you have "Chr_00_0" that contains tilesets, so you create a copy of it, and link it on the hires file.

<img>Chr_00_0a, 50 (could be, b, c, d, etc, and "50" = to whatever % of every instance of the tile being shown instead of the original)

With this simple mechanic you could exponentially greatly improve graphics by adding more tilesets.

I think it's a very neat feature with lots of potential.

What do you guys think?

Aclectico

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #11 on: May 22, 2020, 07:04:38 pm »
I can't speak for what Sour may be willing to take on, but I am curious- are you thinking the random calculation would be done everytime the game boots up? Or, are you thinking the random calculation is done everytime a new 8x8 tile or sprite is shown?
« Last Edit: May 22, 2020, 07:10:36 pm by Aclectico »

imkrut

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #12 on: May 22, 2020, 07:51:06 pm »
I can't speak for what Sour may be willing to take on, but I am curious- are you thinking the random calculation would be done everytime the game boots up? Or, are you thinking the random calculation is done everytime a new 8x8 tile or sprite is shown?

Could be either tbh, they both would prove useful. It could be true random (pick any tileset if present, which I assume would be less intensive) or random with a % attached to each tileset.

lyonhrt

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #13 on: May 23, 2020, 11:28:44 am »
Maybe sour could add something as simple as it generating a random number or a specific number between values stated when it loads the pack, and then add the condition for that so if it matches the number it will do said action, would be the easier option to implement. Could bring variety or even randomly have day or  night or day levels or easter eggs that appear rarely.

kya

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #14 on: May 24, 2020, 10:21:34 am »
Here's an updated version of the sound patch, that (almost) solves the first issue.

https://yadi.sk/d/7FT2Ffel5lmxbw

Now you can have an intro part and a looping part of the music tracks.
You specify the intro part as an sfx, and the looping part as a bgm.
If a specific track does not have the looping part (play start, game over), you should remove the appropriate <bgm> line from hires.txt.

The downside is that the music track switching occurs abruptly (the original sound engine has a nice fade),
and sometimes not exactly in time (the powerup track is a bit delayed when losing a life).

But I believe, with my limited skill and with available ROM space I won't be able to do more/better.

EDIT:
Found some more space in the ROM. Now stopping music when the original engine commands to.
https://yadi.sk/d/oBZ_xIDyTiGz1w

Yet this does not solve the problem of shutting down power up music in time.
« Last Edit: May 25, 2020, 02:55:59 am by kya »

imkrut

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #15 on: May 27, 2020, 07:03:44 pm »
Here's an updated version of the sound patch, that (almost) solves the first issue.

https://yadi.sk/d/7FT2Ffel5lmxbw

Now you can have an intro part and a looping part of the music tracks.
You specify the intro part as an sfx, and the looping part as a bgm.
If a specific track does not have the looping part (play start, game over), you should remove the appropriate <bgm> line from hires.txt.

The downside is that the music track switching occurs abruptly (the original sound engine has a nice fade),
and sometimes not exactly in time (the powerup track is a bit delayed when losing a life).

But I believe, with my limited skill and with available ROM space I won't be able to do more/better.

EDIT:
Found some more space in the ROM. Now stopping music when the original engine commands to.
https://yadi.sk/d/oBZ_xIDyTiGz1w

Yet this does not solve the problem of shutting down power up music in time.

That's awesome!! I'm editing the tracks right now to fit the current edit and it seems to work quite well (other than it kinda not playing if you happen to save state/load, but that seems more like an emulation thing)

do you think it's feasible to only allow those music tracks to be replaced? or ideally, that it defaults to the original audio/sfx if the tracks are not found?

Also there's a small delay between the Powerup fanfare and the powerup theme, I think it's still  present in the original, but not that noticeable not a big deal at all tho...the illusion sort of breaks if you die while the powerup fanfare is playing  tho (but before  powerup theme plays) because they both play at the same time. I think that's a bit more significant.

Awesome work mate.
« Last Edit: May 27, 2020, 07:17:55 pm by imkrut »

kya

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Re: FINISHED: Twin Bee "Remastered" (MESEN HD patch)
« Reply #16 on: May 28, 2020, 05:04:05 am »
I am  unable to replace just music and leave sfx intact. The fanfares are actually sfx, so I'd have to process them separately from other sfx. Another problem is a noise channel - it is shared between music and "explosion-type" sfx in a non-straightforward manner.

As for the powerup fanfare problem, I've made a fix (link below), which shuts down all sfx (including fanfares) just before the ship explosion sound starts. That's the best I can do.

https://yadi.sk/d/10Sr1pkdT1yljw