1942 - New Music! (v3.0)

minwah

Active member
Feedback
3 (100%)
Credits
238CR
cmonkey said:
I think I know what the problem is....

I'm pretty sure I bspatch'ed my already hacked sound rom, the one which I'd experimented with in replacing the in-game tune with a repeating major scale. If that's the case then the pointer at $107a would have already been altered to point to my new data at $2000. As bsdiff/bspatch work on the principal of difference subtraction when I applied the patch to my rom it made a mess of the pointer at $107a by subtracting wrong values from the adjusted pointer that was already there.

Excellent, that explains that then hopefully...

Still doesn't explain why I get bad stuttering and you don't, unless your tune data extends as far as $2000 in the rom (which I doubt as that would make you tune data 1.5Kb in size).

Well...my tune date does extend beyond $2000 (just) actually!
smiley2.gif


I couldn't tell you how big the tune data is, but it probably appears to be large because:

1) I've frequently used breaks/gaps between the data, not only between channel data but also between sections or passages of music. I've used jumps (7F) to bridge the gaps. This certainly isn't space efficient but it made it easier for me to work on in my dos hex editor.

2) I have repeated a lot of data (particularly the channel 2 bass pattern). While I know how to jump, I am unsure how to say 'the first time this is played jump to x, the second time jump to y' etc. Again, I am sure there is a more space efficient way of doing this.

Fortunately for me there was plenty of space to play around with!

Let me know how you get on after patching the unmodified rom...
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
Happy to report that this works PERFECTLY after patching the unmodified sound rom! No stuttering at all and all pointers pointing to the correct data. I'd go as far as saying this is one of the best game hacks I've seen for many a year. Huge kudos goes out to you for doing this as I know just how time consuming doing something like this really is. There won't be many people reading this thread who can truly appreciate what a momentous task it is to put new tunes into a game via hex editing. Welcome to the crazy club, population : you and me!

I have a couple of questions :-

1) what's this piece of music actually called?

2) did you have access to the sheet music for this piece or did you do it all by ear? (I had access to the sheet music of the Mario tune when I put it into Super Hang-On)

Well done!
smiley20.gif
 

Hurray Banana

Moderator
Staff member
vacBacker
Feedback
8 (100%)
Credits
2,721CR
cmonkey said:
Happy to report that this works PERFECTLY after patching the unmodified sound rom! No stuttering at all and all pointers pointing to the correct data. I'd go as far as saying this is one of the best game hacks I've seen for many a year. Huge kudos goes out to you for doing this as I know just how time consuming doing something like this really is. There won't be many people reading this thread who can truly appreciate what a momentous task it is to put new tunes into a game via hex editing. Welcome to the crazy club, population : you and me!

I have a couple of questions :-

1) what's this piece of music actually called?

2) did you have access to the sheet music for this piece or did you do it all by ear? (I had access to the sheet music of the Mario tune when I put it into Super Hang-On)

Well done!
smiley20.gif

It's the classic 633 squadron Ade
 

minwah

Active member
Feedback
3 (100%)
Credits
238CR
Great news, thanks to you both for trying it out. I am pleased (and relieved!) it works ok. I've played it a few times tonight and pretty pleased. There is one bit that sounds a little off (those off-tune notes I mentioned I think) so I might try to do something about that. Also I am imagining a harmony line on the melody that I could fit in the space on the third channel....

cmonkey said:
I have a couple of questions :-

1) what's this piece of music actually called?

2) did you have access to the sheet music for this piece or did you do it all by ear? (I had access to the sheet music of the Mario tune when I put it into Super Hang-On)

1) Yeah it's the theme from 633 Squadron.
2) No sheet music (I can't read music), I used a synth to help me work out the notes. I started by writing down the notes for the melody, and then changed those into 1-F hex notes. The main melody line didn't take too long as I could do a whole section in the same base note range. What took me a long time was the parts where I had to frequently alter the base note...not so easy.

Thanks again for your help, I never would have worked out the info you provided.
 

minwah

Active member
Feedback
3 (100%)
Credits
238CR
I've made a few tweaks. Altered the bit at the very end which grated a bit for me - I hadn't got the correct run of notes, but even corrected they sounded a bit shrill so I've lowered the pitch.

Also I've got the melody playing an octave up (at lower volume than the main melody channel) in the 3rd channel. This gives it a bit more meat & depth to the sound.

Assuming playtesting goes well and I'm happy with it, I'll put a new download up hopefully tomorrow...
 

RGP

Meeter & Greeter
Feedback
5 (100%)
Credits
2,039CR
Those who did work on this please put your names in the ROMs somewhere so they appear on the title screen, happy to replace the ROMs on the 1942 cabaret and let others experience it at shows.

Can't believe one of my crackpot ideas got taken seriously - nice work mate!

........ 1942 CRACKED BY THE MIGHTY UKVAC ....... ZAK REMIXED BY MINWAH ...... TIRELESS FREEPLAY MODES BY CMONKEY ......... GREETZ TO..........

*cough* scroller *cough*
 

minwah

Active member
Feedback
3 (100%)
Credits
238CR
minwah said:
Assuming playtesting goes well and I'm happy with it, I'll put a new download up hopefully tomorrow...

Much improved I think, much happier with this one. Please see the first post for v2.0 diff patch!
 

minwah

Active member
Feedback
3 (100%)
Credits
238CR
virtvic said:
I think Minwah is getting arcade superdude status on the podcast this week.

smiley1.gif


One other thing which bugs me a little bit is after losing a life you get a short tune (#12 or #13 it seems) before the main tune starts again. While the short tune is playing you get no sounds effects.

I would rather it just went straight to the main tune, with sound effects. I tried changing the lookup table for tune 12 to point to the address of tune 11 (main tune) instead. It didn't have the desired effect, there is just no music for (I guess) the duration of the now missing short tune - I think the game code must 'wait' for a period of time while the short tune plays before playing the main theme. However the sound effects do work during this period - I guess something in the tune data normally overrides the sounds effects.

Can anyone give me some Mame debugging tips? I though I would watch $6000 for the value of the tune to play, but doing 'wp 6000,1,w' doesn't result in any breaks of execution.
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
You won't be able to watch $6000 for writes on the audio CPU as the driver defines this as a read only byte :-

AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)

You've got two options :-

1) you can change the above to :-

AM_RANGE(0x6000, 0x6000) AM_READWRITE(soundlatch_byte_r)

in the sound CPU memory map and then recompile MAME

2) you can set up a watchpoint from the main cpu's point of view on the soundlatch byte, as so :-

wp c800,1,w,wpdata!=0xff

You need to exclude writes of 0xff to the latch (wpdata!=0xff) as the CPU does that every frame and if you didn't you'd drop into the debugger every frame. This way you'll only drop into the debugger when a new sound command is sent to the sound latch. Register A will contain the sound command when you drop into the debugger.

Hope that helps.
 

minwah

Active member
Feedback
3 (100%)
Credits
238CR
cmonkey said:
2) you can set up a watchpoint from the main cpu's point of view on the soundlatch byte, as so :-

wp c800,1,w,wpdata!=0xff

That works a treat, many thanks. Not sure if I'll be able to achieve much, but good to be able to see things happen. Need to learn more about using the debugger.

In other news, thinking of squeezing in a bit more into the tune. The C64 music is structured like this

Intro
Verse A
Verse B (same as A but a note higher)
Verse A
Verse B
Bridge
Verse A
Verse B
Verse A
Verse B
Bridge
Verse A
Finale
(repeat)

Currently my arrangement goes:

Intro
Verse A
Verse B
Bridge
(repeat from Verse A)

It's not worth trying to recreate the structure of the C64 tune, as a) it wouldn't fit in the duration of a level (not sure if all levels are the same 'length', but seems so in the early levels), and b) there's not enough rom space (at least with my limited ability to re-use sections of data).

However I'm pretty sure I could fit in:

Intro
Verse A
Verse B
Bridge
Verse A
Finale
(repeat)

I had quite a few goes on 1942 last night and really enjoy it more with this music. I do miss the 'finale' part from the C64 tune though, and think it might add a little bit of variety. Will see how it goes...
 
Top