Jump to content
IGNORED

Adventure... with a hot-air balloon


e1will

Recommended Posts

You know when, in Adventure, you're eaten by a dragon, then the bat picks up the dragon with you in it, and takes you on a tour of the kingdom? Back in the early '80s, I thought that was the coolest thing in the world.

 

The only problem was, while you could sometimes pick up the bat and move it around, it was difficult to really control where to go, especially at the edge of the screen. I thought the perfect addition to the game would be an object you could pick up that would let you float above the walls and explore the kingdom. So my first try at a hack, back in 2003 or so, was to add a hot-air balloon to the game. If you found the hot-air-balloon and pick it up, you could float above the walls.

 

While I was at it, I tweaked a couple of the room layouts and added a room in the white castle (it always bugged me that there was an "exit" in there that didn't lead anywhere.)

 

Now, this was back before I figured out how to actually assemble, so the changes I made were extremely tedious: instead of just disassembling, adding some code and reassembling it, I was actually using a hex editor to hack in the instructions using machine language (e.g. $4C $7E $F6 to jump to a patched-in subroutine).

 

So even though I came up with some more ideas after that (like having the dragons breathe fire at you; adding a shield the player could use to defend against the fire, adding a torch to see better in the catacombs), the idea of hacking in all those instructions, byte by byte, was so daunting I just shelved the idea.

 

I did submit the hot-air balloon hack here a few years ago, but I made a fairly dumb rookie mistake in making the hot-air balloon so darn hard to find that it wasn't obvious to a casual player that it was even in there.

 

So tonight I'm finally fixing that mistake. Attached is the new-and-improved Adventure hack, with a much easier-to-find hot-air balloon. Enjoy.

 

(On a related note, a few months ago, I figured out how to compile assembly, and wrote a whole new game to make use of the fire-breathing, shield and torch (flashlight now) ideas. Except they're fire-breathing ducks, instead of fire-breathing dragons. If you like this hack, you might like that game too.)

 

--Will

Adv28B.bin

post-23222-126291946596_thumb.png

post-23222-126291947253_thumb.png

  • Haha 1
Link to comment
Share on other sites

  • 1 year later...

Old thread, I know...but I've been toying with the CYOA (Create Your Own Adventure) program and wanted to learn some of the assembly language stuff (so I've been toying with that as well) to try to change some of the internals of the game itself.

 

One change I would like to employ is if a dead dragon is picked up by the bat, it becomes resurrected. It should be a relatively simple change to the program, but so far, all my attempts to change the variable have resulted in a non-functional game upon assembly.

 

Any suggestions?

Link to comment
Share on other sites

Are you trying that with CYOA or something else?

 

I'm using CYOA to generate the code, then I play with the code in a text editor.

 

Basically (or, BASICally), the logic check should be something like this:

 

BAT pickup code

IF "item = dragon" and "state = dead"

THEN "state = alive"

Edited by keithbk
Link to comment
Share on other sites

By the way, if you look at my signature there is a thread for an Adventure hack called "MissAdventure Revised." In the first post is an 8k Adventure Assembly that Nukey Shay made. It is commented and is very nice for hacking. He also has newer versions of Adventure assemblies floating around AA.

Link to comment
Share on other sites

Since the dragons are all the lowest object numbers (of the ones carriable by the bat), the method above can be reduced to 10 bytes...

MoveBat:
    LDX    BatR+5 ;use X as a pointer
    CPX    #GDragonR ;compare to whatever the last dragon is
    BCS    MoveOn ;object not a dragon
    LDA    #$00 ;restore normal state...
    STA    $04,X ;to the applicable dragon
MoveOn:

Edited by Nukey Shay
Link to comment
Share on other sites

Since the dragons are all the lowest object numbers (of the ones carriable by the bat), the method above can be reduced to 10 bytes...

MoveBat:
    LDX    BatR+5 ;use X as a pointer
    CPX    #GDragonR ;compare to whatever the last dragon is
    BCS    MoveOn ;object not a dragon
    LDA    #$00 ;restore normal state...
    STA    $04,X ;to the applicable dragon
MoveOn:

Nice!

Link to comment
Share on other sites

It's shorter if the check is done in the pickup code. Only 6 bytes because X is already loaded and A is known to be zero.

 

       AND    #$F8                ;2 Is the Bat within Seven Pixels?
      BNE    MoveBat_4           ;2 If not, No Pickup Possible
      STX    BatR+5              ;3 Store Object as Being Carried

;===========added portion...
      CPX    #GDragonR ;compare to whatever the last dragon is
      BCS    MoveOn ;object not a dragon
      STA    $04,X ;revive applicable dragon
MoveOn:
;===========

      LDA    #$10                ;2 Reset the Bat Fed Up Time
      STA    BatR+6              ;3
MoveBat_4: ;Move Object Being Carried by Bat

Link to comment
Share on other sites

It's shorter if the check is done in the pickup code. Only 6 bytes because X is already loaded and A is known to be zero.

 

       AND    #$F8                ;2 Is the Bat within Seven Pixels?
      BNE    MoveBat_4           ;2 If not, No Pickup Possible
      STX    BatR+5              ;3 Store Object as Being Carried

;===========added portion...
      CPX    #GDragonR ;compare to whatever the last dragon is
      BCS    MoveOn ;object not a dragon
      STA    $04,X ;revive applicable dragon
MoveOn:
;===========

      LDA    #$10                ;2 Reset the Bat Fed Up Time
      STA    BatR+6              ;3
MoveBat_4: ;Move Object Being Carried by Bat

 

This is great, guys! One of the things about the original Adventure that I always found lacking was that you can only encounter 3 monsters and nothing else. Once the three dragons are dead, there really is no more challenge to the game. By giving the Magic Bat the power of resurrection, the game becomes a bit more challenging and unpredictable...you may not want to so quickly dispose of that sword ;)

Link to comment
Share on other sites

Yet again, every time I do a compile with the changes I make, I get errors and the code will not play. I remove the code I inserted, compile it, and it works again...

 

I've been reading through all the programming 101 stuff and I'm trying to find out what I'm doing wrong...very frustrating.

 

This is the area I have been working with, trying to insert in the following area:

 

;See if Bat Can pick up Object.

LDA VBLANK,X;4 ;Get the Object's X Coordinate.

SEC ;2

SBC $CC ;3 ;Find the differenct with the Bat's

CLC ;2 ;X coordinate.

ADC #$04 ;2 ;Adjust so Bat in middle of object.

AND #$F8 ;2 ;Is Bat within Seven Pixels?

BNE LF908 ;2 ;If not, no pickup possible.

 

LDA WSYNC,X ;4 ;Get the Object's Y Coordinate.

SEC ;2

SBC $CD ;3 ;Find the Difference with the Bat's

CLC ;2 ; Y Coordinate.

ADC #$04 ;2 ;Adjust.

AND #$F8 ;2 ;Is the Bat within Seven Pixels?

BNE LF908 ;2 ;If not, No Pickup Possible.

 

;Get Object

STX $D0 ;3 ;Store Object as Being Carried.

LDA #$10 ;2 ;Reset the Bat Fed Up Time.

STA $D1 ;3

Link to comment
Share on other sites

Are you putting these lines of code

 

      CPX    #GDragonR  ;compare to whatever the last dragon is
      BCS    MoveOn     ;object not a dragon
      STA    $04,X      ;revive applicable dragon
MoveOn:

right after this line of code?

      STX    BatR+5        ;3 Store Object as Being Carried

 

There is no "BatR+5" in the code, so do I need to define this somewhere?

 

 

I am trying to edit a txt file, just for clarification.

Edited by keithbk
Link to comment
Share on other sites

Yet again, every time I do a compile with the changes I make, I get errors and the code will not play. I remove the code I inserted, compile it, and it works again...

None of the user ram is labelled in your example. What disassembly were you using? It should be one of the text files that has all of the user ram defined up top. Otherwise, you'd have to adjust all the ram and rom pointers for any additions you make to the code.

 

I'd recommend looking at one of the previous threads on the subject that has a lot of source code and examples of sprite additions...like this thread:

http://www.atariage.com/forums/topic/50191-turning-adventure-into-an-8k-game

 

If you want to build a 4k game, there's a couple of files at posts 42 and 43 that has a bunch of romspace free.

 

 

A newer thread features tricks to "mix and match" display modes and resolutions, so you can create more detailed screens which costs no additional ram (in fact, some more was saved to use wherever you want).

http://www.atariage.com/forums/topic/134439-adventure-playfield-manipulation-midscreen

 

 

Any of those disassemblies will execute quicker/more efficient than the original game did...and makes adding new objects or screens very easy.

Link to comment
Share on other sites

I am using the CYOA (Create Your Own Adventure), which generates a text file and editing the text file.

 

It's nice because I can quickly change room graphics and I've done a bit of redesign of the sprites and rooms. Unfortunately, the text file that it generates is not the same as the one you were working on, so I'm trying to find the similar strains of code and work by comparing and altering.

Link to comment
Share on other sites

...which is more difficult than just using one or the other. Trying to find correlations between them is always a nightmare costing you unnecessary time.

 

Okay, I've been tinkering with your adventure_8k.zip file and put the code in the section (example follows):

 

BNE MoveBat_4 ;If not, No Pickup Possible. ;2

;Get Object

STX BatR+5 ;Store Object as Being Carried. ;3

CPX #GDragonR ;compare to whatever the last dragon is

BCS MoveOn ;object not a dragon

STA $04,X ;revive applicable dragon

MoveOn:

 

At this point, I am just trying to get the bat to revive the dragon in the game and have not altered any other code. I have been playing Game 2 and both times, the green dragon is killed, the bat takes the dragon, but the dragon does not revive. Am I doing something wrong?

 

It's definitely not a compile issue, as the game compiles properly and plays, but it does not produce the desired result.

Edited by keithbk
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...