Jump to content
IGNORED

Smurf - Rescue in Gargamel's Castle Disassembly


DEBRO

Recommended Posts

8 hours ago, DEBRO said:

Hi there,

 

Here is another one by the Workstead Design group. This one is credited to Henry Will, IV.

 

I've including switches to build NTSC, PAL50, and PAL60 versions. I did not include my code for the action button hack in this listing to try to keep it "pure". Enjoy

 

Smurf - Rescue in Gargamel's Castle

I can't get it to compile with:

  • Atari Dev Studio ( v0.7.1 )
  • dasm (release 2.20.14.1 - 20201109)
  • MACRO.H Version 1.09, 05/SEP/2020
  • VCS.H Version 1.06, 06/SEP/2020

 

--- Unresolved Symbol List
NO_ILLEGAL_OPCODES       0000 ????         (R )
--- 1 Unresolved Symbol 

smurf_rescue_in_gargamels_castle.asm (845): error: Value in 'negative ldx #<SmurfThemeSongAudioValues - BackgroundMusicAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (855): error: Value in 'negative ldx #<SmurfFallingAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (893): error: Value in 'negative ldx #<GameBackgroundMusicAudioValues - BackgroundMusicAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (949): error: Value in 'negative ldx #<SmurfJumpingAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (956): error: Value in 'negative lda #<RunningJumpPositionChangeValues - JumpingPositionChangeValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (968): error: Value in 'negative lda #<HorizontalStationaryJumpPositionChangeValues - JumpingPositionChangeValues + 1' must be <$100.
smurf_rescue_in_gargamels_castle.asm (976): error: Value in 'negative lda #<SuperJumpPositionChangeValues - JumpingPositionChangeValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1023): error: Value in 'negative ldx #<SmurfFootstepsAudioValues_00 - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1027): error: Value in 'negative ldx #<SmurfFootstepsAudioValues_01 - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1161): error: Value in 'negative ldx #<SmurfDrowningAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1172): error: Value in 'negative ldx #<SmurfCapturedBySpiderAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1179): error: Value in 'negative ldx #<SmurfDeathAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1197): error: Value in 'negative lda #<SmurfetteSprites - SmurfetteSprites + H_SMURFETTE' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1219): error: Value in 'negative ldx #<SmurfThemeSongAudioValues - BackgroundMusicAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1274): error: Value in 'negative ldx #<PlayerOneUpAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1278): error: Value in 'negative ldx #<PlayerTwoUpAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1288): error: Value in 'negative ldx #<SmurfetteRescuedAudioValues - BackgroundMusicAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1298): error: Value in 'negative lda #<RescuedSmurfetteSprite - SmurfetteSprites + H_SMURFETTE' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1333): error: Value in 'negative ldx #<GameSelectionAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1364): error: Value in 'negative lda #<SmurfetteSprites - SmurfetteSprites + H_SMURFETTE' must be <$100.
smurf_rescue_in_gargamels_castle.asm (1609): error: Value in 'negative ldx #<ExtraLifeAudioValues - BackgroundMusicAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (2221): error: Value in 'negative ldx #<FlyingObjectFlappingAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (2303): error: Value in 'negative ldx #<SnakeHissingAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (2346): error: Value in 'negative ldx #<SpiderAudioValues - SoundEffectsAudioValues' must be <$100.
smurf_rescue_in_gargamels_castle.asm (2580): error: Value in 'negative ldx #<BirdSquakAudioValues - SoundEffectsAudioValues' must be <$100.

Unrecoverable error(s) in pass, aborting assembly!
Complete. (5)
Exit code: 5

?

it compiles if the two Summands/Subtrahenders are enclosed in brackets. The compiled binary seems to work.

 

 

  • Thanks 1
Link to comment
Share on other sites

6 hours ago, Al_Nafuur said:

I can't get it to compile with:

  • Atari Dev Studio ( v0.7.1 )
  • dasm (release 2.20.14.1 - 20201109)
  • MACRO.H Version 1.09, 05/SEP/2020
  • VCS.H Version 1.06, 06/SEP/2020

Thank you. I've updated the code to assemble with the newest DASM.

 

5 hours ago, Thomas Jentzsch said:

Older versions of DASM were more forgiving, @DEBRO maybe you should update your DASM?

Thank you. I've updated my DASM. Now I need to update all my source files so they assemble with this release.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

10 hours ago, Thomas Jentzsch said:

Older versions of DASM were more forgiving, @DEBRO maybe you should update your DASM?

 

4 hours ago, DEBRO said:

Now I need to update all my source files so they assemble with this release.

"It is not a bug if people rely on it"

Linus Torvalds' rant on breaking user interfaces:

 

 

Link to comment
Share on other sites

22 hours ago, Al_Nafuur said:

The PAL60 version has (like the NTSC version) 263 scanlines and is because of an odd amount of scanlines only greyscale on PAL TVs

Thank you. Updated again...and my Stella has been modified for "PAL color-loss".

 

I guess I could have added the action button hack code if I modified the source for PAL60.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 9/17/2021 at 6:48 PM, DEBRO said:

Thank you. Updated again...and my Stella has been modified for "PAL color-loss".

 

I guess I could have added the action button hack code if I modified the source for PAL60.

I am sorry to bother you again, but the last room (Gargamel's castle) is still without color on my PAL TV..

 

sorry my fault. I had done some code to fix it and didn't removed it in this room..

Edited by Al_Nafuur
  • Like 1
Link to comment
Share on other sites

8 minutes ago, vitoco said:

I tried this game in the PlusCart and it is hard to master the jumps (short vs long diagonals). Any hints?

double pressing the joystick up..

 

.. maybe we should include the action button hack in the PlusROM-HSC version.

?

Edited by Al_Nafuur
Link to comment
Share on other sites

1 minute ago, Al_Nafuur said:

double pressing the joystick up..

It does a short jump at the first "click". No double press is alowed for a single jump.

 

It looks like there is a timer that starts at every jump, so the next jump is a long one if you just landed. So, you need to do a verical jump and then a second to just perform a long jump, and to wait a bit or to walk or duck if you want to do a short jump if you just did another jump.

 

Link to comment
Share on other sites

  • 6 months later...

Today someone observed issues in this game, which led me to trying it in Stella with the debugging features on ("drive unused TIA bits randomly".) I saw screen jumps and crashes. I was able to capture an errant bankswitch due to one of the many LDA (0,x) instructions that have no other purpose than to sleep 6 cycles in 2 bytes.

 

With the source posted in this thread, I was able to fairly easily fix the game. This relies on a small area that is marked as "unused" in order to redirect the "sleep" instructions to something that is safer. Note that I used some JSR/RTS and PHA/PLA tricks to waste cycles in a small amount of space, which relied on stack space being available, but it seems to function without issues.

 

Here is the source plus NTSC and PAL50 builds. Also includes a fix for 262 scanlines.

Smurf_fix.zip

  • Like 11
  • Thanks 1
Link to comment
Share on other sites

  • 9 months later...
On 4/17/2022 at 7:23 PM, batari said:

Today someone observed issues in this game, which led me to trying it in Stella with the debugging features on ("drive unused TIA bits randomly".) I saw screen jumps and crashes. I was able to capture an errant bankswitch due to one of the many LDA (0,x) instructions that have no other purpose than to sleep 6 cycles in 2 bytes.

 

With the source posted in this thread, I was able to fairly easily fix the game. This relies on a small area that is marked as "unused" in order to redirect the "sleep" instructions to something that is safer. Note that I used some JSR/RTS and PHA/PLA tricks to waste cycles in a small amount of space, which relied on stack space being available, but it seems to function without issues.

 

Here is the source plus NTSC and PAL50 builds. Also includes a fix for 262 scanlines.

Smurf_fix.zip 40.66 kB · 49 downloads

Tried the ntsc bin and it doesnt work in my concerto Cart :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...