Jump to content
IGNORED

What's so fun about Adventure after beating it?


flammingcowz

Recommended Posts

Actually, I mentioned the different scenarios without taking the psuedo-random generator into account (locations based on what the given key's upper boundry limit allows). According to the programmer himself, there is only 1 unwinnable setup...and that is when the yellow key is assigned room number $12 (inside the yellow castle). I guess the only way to know for sure is to sit down with Stella running the original game and hit the ~ key immediately after starting a new game to examine ram contents...which would reveal the screen numbers chosen for the 11 random objects. The ram locations in question would be these:

$A4 = Red Dragon

$A9 = Yellow Dragon

$AE = Green Dragon

$B3 = Magnet

$B6 = Sword

$B9 = Chalise

$BC = Bridge

$BF = Yellow Key

$C2 = White Key

$C5 = Black Key

$CB = Bat

 

...and a map with the room numbers indicated is below. Correct about the black key, tho. I dunno where I got an upper boundry of $18 from (it's actually $12).

post-222-1217656202_thumb.jpg

Link to comment
Share on other sites

This seemed like an interesting question, so I decided to make a slight change to the original game which keeps the seed value selectable (it's bumped up upon revisiting the "number" screen only)...and started mapping out the starting locations. NOTE: this hack does not alter game logic in any way...it just uses a previously-unused ram location to keep track of the random seed (instead of using the framecounter). The ram location used for this is $EA...and it's bumped after it's been used (so Stella's debugger will show a value of seed+1).

 

When I reached seed value $0D, the yellow key was placed inside the yellow castle. However, seed value $0F will place both the yellow and white keys inside the black castle, with the black key inside the yellow castle! In fact, most of the other objects are also inside the castles as well (the magnet is outside the black castle, and the bat is outside the white - confirming the one ulij20 experienced). Clearly, there are more unwinnable scenarios than the programmer figured (and probably more initial game setups as well...since none of the first 16 are repeats).

 

Here's the variation map I'd begun:

seed | $A4-RD | $A9-YD | $AE-GD | $B3-Mg | $B6-Sw | $B9-Ch | $BC-Br | $BF-YK | $C2-WK | $C5-BK | $CB-Bt |
-----+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
$00 |  $04   |  $02   |  $06   |  $04   |  $07   |  $13   |  $06   |  $05   |  $04   |  $03   |  $04   |
$01 |  $02   |  $0B   |  $09   |  $02   |  $08   |  $13   |  $07   |  $06   |  $05   |  $04   |  $0B   |
$02 |  $05   |  $0A   |  $03   |  $03   |  $09   |  $13   |  $08   |  $03   |  $06   |  $05   |  $03   |
$03 |  $0F   |  $0C   |  $0B   |  $04   |  $0A   |  $13   |  $09   |  $08   |  $07   |  $06   |  $08   |
$04 |  $0E   |  $0D   |  $0C   |  $05   |  $0B   |  $13   |  $0A   |  $09   |  $08   |  $07   |  $02   |
$05 |  $10   |  $0D   |  $0F   |  $06   |  $0C   |  $13   |  $0B   |  $0A   |  $09   |  $08   |  $06   |
$06 |  $08   |  $10   |  $0C   |  $07   |  $0D   |  $13   |  $0C   |  $0B   |  $0A   |  $09   |  $08   |
$07 |  $05   |  $03   |  $10   |  $08   |  $0E   |  $13   |  $0D   |  $0C   |  $1C   |  $0A   |  $1C   |
$08 |  $12   |  $11   |  $10   |  $09   |  $0F   |  $13   |  $0E   |  $0D   |  $0C   |  $0B   |  $09   |
$09 |  $14   |  $12   |  $05   |  $0A   |  $10   |  $14   |  $0F   |  $0E   |  $0D   |  $0C   |  $0A   |
$0A |  $15   |  $15   |  $12   |  $0B   |  $11   |  $15   |  $10   |  $0F   |  $0E   |  $0D   |  $0A   |
$0B |  $16   |  $16   |  $14   |  $0C   |  $12   |  $16   |  $11   |  $10   |  $0F   |  $0F   |  $0F   |
$0C |  $13   |  $16   |  $15   |  $0D   |  $13   |  $17   |  $12   |  $11   |  $10   |  $0D   |  $0D   |
$0D |  $18   |  $15   |  $13   |  $0E   |  $14   |  $18   |  $13   |  $12   |  $11   |  $10   |  $09   |
$0E |  $19   |  $19   |  $14   |  $0F   |  $15   |  $19   |  $14   |  $13   |  $12   |  $11   |  $11   |
$0F |  $1A   |  $1A   |  $1A   |  $10   |  $16   |  $1A   |  $15   |  $14   |  $13   |  $12   |  $0F   |

 

 

...and the game hack used:

AdRnd.bin

Edited by Nukey Shay
Link to comment
Share on other sites

According to the map, room 11 is the outside of the yellow castle (not the inside).

 

That is correct. The inside is screen #$12.

 

Random seed $0D: Yellow Key = screen #$12. Remember that ram location $EA reflects the seed value + 1 if you are examining the debugger screen yourself with the hack ($EA=$0E after pressing reset in this case).

 

 

What this means is that if the framecounter just happens to be a value of $0D when you press reset in the original unaltered game (which it could, since the framecounter has the full range of 0-255), the yellow key ends up inside the yellow castle. If the framecounter was $0F, the only thing you'll find is the bat flying around with the magnet (everything else is locked up). This experiment appears to debunk the belief that Adventure only has 17 random setups.

Edited by Nukey Shay
Link to comment
Share on other sites

This experiment appears to debunk the belief that Adventure only has 17 random setups.

Well, so far you've only shown 16. What if that's all there are; i.e. the random seed is only using the lower 4 bits of the frame counter, or something equivalent to that such that the first hex digit of the seed has no effect, or an irrelevant effect (such as giving the same 16 games in a different order)?

Link to comment
Share on other sites

I already know that there are more. I just didn't add them to the chart yet. There are definately random games that place the magnet in castle screens, for example. Offhand from playing the game legitimately, I can remember 2 different (common?) placements for it inside the black castle's maze...screen $13 and $15. 16+ hours is a lotta time to devote to mapping them all out ;)

 

Back in the day, I tried doing this with the actual game. Of course, since the bat was flying around there was no way of knowing which objects might have been moved from their initial locations...so I limited the chart to areas that the bat didn't have access to (such as behind locked castle gates...or VV if the bat happened to be in a castle). I thought I messed up because I reached the 30's after only a few days' work. Apparently not 8)

Link to comment
Share on other sites

BTW I believe the rumor began because the programmer stated that the game has a 1 in 17 chance of being unwinnable, because the yellow key can appear in it's own castle (leading to a false conclusion that there's only 17 differing setups). 2 out of 34 is still the same odds. So is 3 of 51...etc. 15 out of 255 would be maximum if the odds are correct (which they probably aren't, because the programmer said nothing about a random placement that puts all 3 keys inside castles - that too is an unwinnable scenario confirmed to exist). Given that the game can use any 8-bit value as a base (with an LSR'ed "step value" between objects) before it's cut down to 5 bits, I think it's more random than it was given credit for.

Link to comment
Share on other sites

There's a number of places where 2 or more screens are successive. But also a number of places where room links are "unstable" (where you flip to different screens that do not join the first if you try to go back). There's at least 1 screen that can remove objects from the game entirely (going sideways from the green castle is joined to the game selection screen...in which there is no escape since it only links to itself in each direction).

 

Try playing around with this if you want spoilers:

After playing around with the "no collisions" binary I am surprised at how many "unstable" room links there are, and I am responsible for some of them!

Link to comment
Share on other sites

My memory may be fuzzy. But I vaguely remember watching one of those expo's where warren was present and I thought he said he deliberately limited the number of games so as to not create too many "unwinnable" situations.... :ponder:

 

The way to have done that (using this random generator) would be to trim the framecounter while the "number" screen is being displayed. Or better yet, renumber the inside room of the yellow castle so that it falls above or below the yellow key's random boundries (e.g. make it room #1 instead of $12, and use $02/$1D for the upper and lower bounds of the key).

 

I've mapped out the first 64 seed variations. Of those, 4 games are uncompletable (1/16 odds), and 4 games are repeats of other seeds. So I count 60 different setups so far!

 

 

| seed|$A4-RD|$A9-YD|$AE-GD|$B3-Mg|$B6-Sw|$B9-Ch|$BC-Br|$BF-YK|$C2-WK|$C5-BK|$CB-Bt|
+-----+------+------+------+------+------+------+------+------+------+------+------+
| $00 | $04  | $02  | $06  | $04  | $07  | $13  | $06  | $05  | $04  | $03  | $04  |
| $01 | $02  | $0B  | $09  | $02  | $08  | $13  | $07  | $06  | $05  | $04  | $0B  |
| $02 | $05  | $0A  | $03  | $03  | $09  | $13  | $08  | $03  | $06  | $05  | $03  |
| $03 | $0F  | $0C  | $0B  | $04  | $0A  | $13  | $09  | $08  | $07  | $06  | $08  |
| $04 | $0E  | $0D  | $0C  | $05  | $0B  | $13  | $0A  | $09  | $08  | $07  | $02  |
| $05 | $10  | $0D  | $0F  | $06  | $0C  | $13  | $0B  | $0A  | $09  | $08  | $06  |
| $06 | $08  | $10  | $0C  | $07  | $0D  | $13  | $0C  | $0B  | $0A  | $09  | $08  |
| $07 | $05  | $03  | $10  | $08  | $0E  | $13  | $0D  | $0C  | $1C  | $0A  | $1C  |
| $08 | $12  | $11  | $10  | $09  | $0F  | $13  | $0E  | $0D  | $0C  | $0B  | $09  |
| $09 | $14  | $12  | $05  | $0A  | $10  | $14  | $0F  | $0E  | $0D  | $0C  | $0A  |
| $0A | $15  | $15  | $12  | $0B  | $11  | $15  | $10  | $0F  | $0E  | $0D  | $0A  |
| $0B | $16  | $16  | $14  | $0C  | $12  | $16  | $11  | $10  | $0F  | $0F  | $0F  |
| $0C | $13  | $16  | $15  | $0D  | $13  | $17  | $12  | $11  | $10  | $0D  | $0D  |
| $0D | $18  | $15  | $13  | $0E  | $14  | $18  | $13  | $12  | $11  | $10  | $09  |<-DEAD
| $0E | $19  | $19  | $14  | $0F  | $15  | $19  | $14  | $13  | $12  | $11  | $11  |
| $0F | $1A  | $1A  | $1A  | $10  | $16  | $1A  | $15  | $14  | $13  | $12  | $0F  |<-DEAD

 

| seed|$A4-RD|$A9-YD|$AE-GD|$B3-Mg|$B6-Sw|$B9-Ch|$BC-Br|$BF-YK|$C2-WK|$C5-BK|$CB-Bt|
+-----+------+------+------+------+------+------+------+------+------+------+------+
| $10 | $03  | $0C  | $08  | $11  | $0A  | $14  | $08  | $06  | $04  | $02  | $12  |
| $11 | $03  | $0E  | $0C  | $12  | $0A  | $14  | $08  | $06  | $04  | $02  | $14  |
| $12 | $06  | $0C  | $08  | $13  | $0A  | $15  | $08  | $06  | $04  | $02  | $15  |
| $13 | $03  | $0C  | $08  | $14  | $0A  | $14  | $08  | $06  | $04  | $02  | $1B  |
| $14 | $03  | $0C  | $08  | $15  | $0A  | $14  | $08  | $06  | $04  | $02  | $1B  |
| $15 | $03  | $0C  | $08  | $16  | $0A  | $14  | $08  | $06  | $04  | $02  | $18  |
| $16 | $03  | $0E  | $0C  | $17  | $0A  | $14  | $08  | $06  | $04  | $02  | $19  |
| $17 | $03  | $0C  | $08  | $19  | $0A  | $14  | $08  | $06  | $04  | $02  | $19  |
| $18 | $03  | $0E  | $0C  | $19  | $0A  | $14  | $08  | $06  | $04  | $02  | $17  |
| $19 | $03  | $0C  | $08  | $1A  | $0A  | $14  | $08  | $06  | $04  | $02  | $13  |
| $1A | $03  | $0E  | $0C  | $1B  | $0A  | $14  | $08  | $06  | $04  | $02  | $0C  |
| $1B | $10  | $0E  | $0C  | $1C  | $0A  | $14  | $08  | $06  | $04  | $02  | $10  |
| $1C | $12  | $03  | $0C  | $1D  | $0C  | $14  | $0A  | $08  | $06  | $04  | $0F  |
| $1D | $16  | $12  | $10  | $02  | $0E  | $16  | $0C  | $0A  | $08  | $06  | $08  |
| $1E | $14  | $12  | $10  | $02  | $0E  | $16  | $0C  | $0A  | $08  | $06  | $08  |
| $1F | $14  | $12  | $10  | $02  | $0E  | $16  | $0C  | $0A  | $08  | $06  | $08  |<-$1E

 

| seed|$A4-RD|$A9-YD|$AE-GD|$B3-Mg|$B6-Sw|$B9-Ch|$BC-Br|$BF-YK|$C2-WK|$C5-BK|$CB-Bt|
+-----+------+------+------+------+------+------+------+------+------+------+------+
| $20 | $14  | $12  | $10  | $02  | $0E  | $16  | $0C  | $0A  | $08  | $06  | $08  |<-$1E
| $21 | $15  | $13  | $11  | $03  | $0F  | $17  | $0D  | $0B  | $09  | $07  | $07  |
| $22 | $16  | $14  | $12  | $04  | $10  | $18  | $0E  | $0C  | $0A  | $08  | $02  |
| $23 | $17  | $15  | $13  | $05  | $11  | $19  | $0F  | $0D  | $0B  | $09  | $07  |
| $24 | $1A  | $16  | $14  | $06  | $12  | $1A  | $10  | $0E  | $0C  | $0A  | $03  |
| $25 | $19  | $17  | $15  | $07  | $13  | $13  | $11  | $0F  | $0D  | $0B  | $0B  |
| $26 | $1A  | $18  | $16  | $08  | $14  | $15  | $12  | $10  | $0E  | $0C  | $0A  |
| $27 | $1B  | $19  | $17  | $09  | $15  | $13  | $13  | $11  | $0F  | $0D  | $08  |
| $28 | $1C  | $1A  | $18  | $0A  | $16  | $15  | $14  | $12  | $10  | $0E  | $03  |<-DEAD
| $29 | $1D  | $1B  | $19  | $0B  | $17  | $13  | $15  | $13  | $11  | $0F  | $10  |
| $2A | $03  | $1C  | $1A  | $0C  | $18  | $15  | $16  | $14  | $12  | $10  | $0F  |
| $2B | $01  | $1D  | $1B  | $0D  | $19  | $13  | $17  | $15  | $13  | $11  | $0D  |
| $2C | $06  | $03  | $1C  | $0E  | $1A  | $15  | $18  | $16  | $14  | $12  | $06  |<-DEAD
| $2D | $16  | $13  | $10  | $0F  | $0D  | $19  | $0A  | $07  | $04  | $01  | $01  |
| $2E | $18  | $15  | $12  | $10  | $0F  | $15  | $0C  | $09  | $06  | $03  | $12  |
| $2F | $16  | $13  | $10  | $11  | $0D  | $19  | $0A  | $07  | $04  | $01  | $13  |

 

| seed|$A4-RD|$A9-YD|$AE-GD|$B3-Mg|$B6-Sw|$B9-Ch|$BC-Br|$BF-YK|$C2-WK|$C5-BK|$CB-Bt|
+-----+------+------+------+------+------+------+------+------+------+------+------+
| $30 | $18  | $15  | $12  | $12  | $0F  | $15  | $0C  | $09  | $06  | $03  | $15  |
| $31 | $16  | $13  | $10  | $13  | $0D  | $19  | $0A  | $07  | $04  | $01  | $13  |
| $32 | $18  | $15  | $12  | $14  | $0F  | $15  | $0C  | $09  | $06  | $03  | $16  |
| $33 | $16  | $13  | $10  | $15  | $0D  | $19  | $0A  | $07  | $04  | $01  | $19  |
| $34 | $18  | $15  | $12  | $16  | $0F  | $15  | $0C  | $09  | $06  | $03  | $18  |
| $35 | $16  | $13  | $10  | $17  | $06  | $19  | $0A  | $07  | $04  | $01  | $19  |
| $36 | $18  | $15  | $12  | $18  | $0F  | $15  | $0C  | $09  | $06  | $03  | $18  |
| $37 | $16  | $13  | $10  | $19  | $0D  | $19  | $0A  | $07  | $04  | $01  | $16  |
| $38 | $18  | $15  | $12  | $1A  | $0F  | $15  | $0C  | $09  | $06  | $03  | $0C  |
| $39 | $16  | $13  | $10  | $1B  | $0D  | $19  | $0A  | $07  | $04  | $01  | $10  |
| $3A | $1B  | $18  | $15  | $1C  | $12  | $15  | $0F  | $0C  | $09  | $06  | $09  |
| $3B | $19  | $16  | $13  | $1D  | $10  | $16  | $0D  | $0A  | $07  | $04  | $0F  |
| $3C | $01  | $1B  | $18  | $03  | $15  | $15  | $12  | $0F  | $0C  | $09  | $03  |
| $3D | $1C  | $19  | $16  | $01  | $13  | $16  | $10  | $0D  | $0A  | $07  | $07  |
| $3E | $01  | $1B  | $18  | $03  | $15  | $15  | $12  | $0F  | $0C  | $09  | $03  |<-$3C
| $3F | $1C  | $19  | $16  | $01  | $13  | $16  | $10  | $0D  | $0A  | $07  | $07  |<-$3D

 

Dead (uncompletable) variations or repeat #'s are indicated where they occur.

Link to comment
Share on other sites

What should be considered is that (in my experience, anyway), each rendition of Adventure offers different random set-ups than the others. For instance, the original cartridges -- Atari and Sears, all labels -- contain a set of Game 3 deployments that anyone who frequently played the game eventually became so familiar with, it was practically like playing Game 1 or 2 in terms of predictability.

 

I was happy to find that in the emulated game, played on the latest version of Stella, there were a few configurations that I'd never come across before. I still play that one, because of the new set-ups I'm not used to. Maybe the possibility of further Game 3 configurations was opened up by the slightly different-acting random seed, considering that it's "inside" a VCS that's actually being emulated on a PC?

 

Finally, the PS2's anthology of old Atari games (VCS and coin-op -- can't remember at the moment if it's called Atari Anthology, but yeah, that one) offers a great many additional Game 3s. This seems intentional, almost as if it's been hacked (in spite of nothing else in the game being different).

 

Incidentally, I'd be curious to know how many Game 3 set-ups are possible in Misadventure Revised (or the underrated Adventure Country), but that would probably be extremely difficult to find out, apart from any author memories of deliberate intentions from the outset.

Link to comment
Share on other sites

There's still 192 valid random seeds that I haven't mapped yet. If the current odds hold, it could have as many as 224 unique winnable patterns (that's assuming 16 unwinnable and 16 repeats). If you notice from the ones already done, many of them are near-repeats with only 1 or 2 objects being placed differently as you go down the list...and many more are total repeats if you don't count the dragons or bat (those are impossible to track playing the original game on actual hardware). Those 2 aspects make the game appear to be less random than it truely is.

 

Once a complete list is compiled, a hack can be made to skip dead or repeat seeds (and perhaps make the seed selectable as an onscreen option - an idea posted in the 2-player thread).

Link to comment
Share on other sites

What should be considered is that (in my experience, anyway), each rendition of Adventure offers different random set-ups than the others. For instance, the original cartridges -- Atari and Sears, all labels -- contain a set of Game 3 deployments that anyone who frequently played the game eventually became so familiar with, it was practically like playing Game 1 or 2 in terms of predictability.

As mentioned above, assuming that the dragons and bat are irrelivant greatly cuts down on the number of patterns...as does a slightly-differing placement of a single object. It's still more than 17, tho ;)

 

 

I was happy to find that in the emulated game, played on the latest version of Stella, there were a few configurations that I'd never come across before. I still play that one, because of the new set-ups I'm not used to. Maybe the possibility of further Game 3 configurations was opened up by the slightly different-acting random seed, considering that it's "inside" a VCS that's actually being emulated on a PC?

That would happen if the program code itself was behaving unpredictably...which is no longer the case due to emulator improvements. Whether it be played on emulator or the real thing, the seed is initialized at zero on powerup and is bumped once 3 display frames have been drawn (3, because that is how many it takes for Adventure to execute all of it's subroutines).

 

 

Finally, the PS2's anthology of old Atari games (VCS and coin-op -- can't remember at the moment if it's called Atari Anthology, but yeah, that one) offers a great many additional Game 3s. This seems intentional, almost as if it's been hacked (in spite of nothing else in the game being different).

If it's been hacked, anything goes. A change in the formula or sort order of the objects would basically render the above chart useless.

 

 

Incidentally, I'd be curious to know how many Game 3 set-ups are possible in Misadventure Revised (or the underrated Adventure Country), but that would probably be extremely difficult to find out, apart from any author memories of deliberate intentions from the outset.

Fortunately, Stella allows you to "peek under the hood" in any game. So the number of patterns could be counted if you take the time to map them out. Unless the random routine differs greatly, it's more likely that you'll find more unique setups than the original game has (because there's more objects to scatter).

Link to comment
Share on other sites

Incidentally, I'd be curious to know how many Game 3 set-ups are possible in Misadventure Revised (or the underrated Adventure Country), but that would probably be extremely difficult to find out, apart from any author memories of deliberate intentions from the outset.

Are you sure you didn't mean overrated? :ponder:

 

I used the same randomizing routine in Adventure Country as I did in Missadventure Revised. I actually borrowed it from another game. I just stuck it in there and it seemed to work better than the original one did so I used it.

Link to comment
Share on other sites

Now that I have a reasonably large number of seeds to verify, I tried writing a program to do this for me (in Atari BASIC). But for some odd reason, the values are goofy. Sometimes they match, other times they don't. Anyone know what I am doing wrong here?

 

1 DIM H$(16)
2 H$="0123456789ABCDEF"
10 I=1536
11 READ J
12 IF J<0 THEN 20
13 POKE I,J
14 I=I+1
15 GOTO 11
20 FOR I=0 TO 255
21 POKE 203,I
22 J=USR(1536)
30 ? "SD RD YD GD MG SW CH BR YK WK BK BT"
31 K=I
32 GOSUB 800
40 K=PEEK(1536+164):GOSUB 800
41 K=PEEK(1536+169):GOSUB 800
42 K=PEEK(1536+174):GOSUB 800
43 K=PEEK(1536+179):GOSUB 800
44 K=PEEK(1536+182):GOSUB 800
45 K=PEEK(1536+185):GOSUB 800
46 K=PEEK(1536+188):GOSUB 800
47 K=PEEK(1536+191):GOSUB 800
48 K=PEEK(1536+194):GOSUB 800
49 K=PEEK(1536+197):GOSUB 800
50 K=PEEK(1536+203):GOSUB 800
60 ? 
70 NEXT I
799 STOP 
800 ? H$(1+INT(K/16),1+INT(K/16));
801 J=K-INT(K/16)*16
802 ? H$(1+J,1+J);" ";
803 RETURN 
900 DATA 104,160,30,165,203,74,74,74,74,74,56,101,203,133,203,41,31,217
901 DATA 42,6
902 DATA 144,237,217
903 DATA 43,6
904 DATA 240,2,176,230,190
905 DATA 41,6
906 DATA 157,0,6
907 DATA 136,136,136,16,219,96
908 DATA 185,19,26
909 DATA 164,1,29
910 DATA 169,1,29
911 DATA 174,1,29
912 DATA 182,1,29
913 DATA 188,1,29
914 DATA 191,1,29
915 DATA 194,1,22
916 DATA 197,1,18
917 DATA 203,1,29
918 DATA 179,1,29
919 DATA -1

 

 

An .atr with the BASIC program (file ADRND)...the randomize subroutine can be examined by looking at page 6 after it's been run (A8WIN use F8 to enter monitor mode, then D 0600). The added PLA at the top is necessary when moving from BASIC.

Dos2.5.zip

Link to comment
Share on other sites

Incidentally, I'd be curious to know how many Game 3 set-ups are possible in Misadventure Revised (or the underrated Adventure Country), but that would probably be extremely difficult to find out, apart from any author memories of deliberate intentions from the outset.

Are you sure you didn't mean overrated? :ponder:

 

I used the same randomizing routine in Adventure Country as I did in Missadventure Revised. I actually borrowed it from another game. I just stuck it in there and it seemed to work better than the original one did so I used it.

 

Adventure Country? Have I missed something? Is this a new hack?

Link to comment
Share on other sites

Incidentally, I'd be curious to know how many Game 3 set-ups are possible in Misadventure Revised (or the underrated Adventure Country), but that would probably be extremely difficult to find out, apart from any author memories of deliberate intentions from the outset.

Are you sure you didn't mean overrated? :ponder:

 

I used the same randomizing routine in Adventure Country as I did in Missadventure Revised. I actually borrowed it from another game. I just stuck it in there and it seemed to work better than the original one did so I used it.

 

Adventure Country? Have I missed something? Is this a new hack?

It's in the 2600 hack forum.

 

http://www.atariage.com/forums/index.php?showtopic=121258

 

I had the idea of an Adventure world where if you go in one direction long enough you wind up back where you started. The end result had something missing imo so I didn't finish it.

Link to comment
Share on other sites

I think it's fun, in its own context -- it's like Adventure with the freedom of Superman, basically. The only unfinished part I know of is the catacomb inside the black castle, but it doesn't prevent you from getting to every screen within. Misadventure Revised is more thorough, certainly, but the screen links often simulate "getting lost," so it's not as straightforward; depends on what kind of mood you're in. I love 'em both, because I'm nuts for good Adventure hacks (i.e. not only changed graphics). :)

Link to comment
Share on other sites

  • 4 weeks later...
Think of a block of ROM memory...the 4k contents of a single "bank" in an 8k game. This 4k is divided into 16 pages, each 256 bytes long. Page crossing occurs when something is defined in 2 pages rather than 1. This can lead to errors in the display kernal, because loading data beyond a page break adds a machine cycle difference between data that does not cross the boundry...it takes the loading instruction just a little longer than it's supposed to whenever it occurs.

 

To fix it in an assembly file, just keep a maximum of 256 bytes in each page. Some people use the ALIGN 256 instruction for Dasm. I just use ORG's...as in:

 

	ORG $1500
RORG $D500

;256 bytes of data

ORG $1600
RORG $D600

;256 bytes of data

;...etc

 

You need to rearrange room gfx tables so that they always fit between the ORG's. Adventure uses 21 bytes to define each of it's screens...so you can fit 12 screens in each page with 4 bytes left over (these 4 bytes can be used for small data tables, or data that does not matter if it crosses a page - i.e. stuff not used in the display).

I was looking at this today and got stuck (no big surprise :)) on the numbers. I was looking at the Adventure 8k assembly and the ORGs for graphics went something like this: 1900 D900, 1A00 DA00, 1B00 DB00, 1C00 DC00. It seemed to skip 1E00 DE00 and went to 1F00 DF00. After that was 1FF8 and DFF8. So my question is, what is after 1F00? Would it be 1F10 or do I have to go higher than 1FF8 and DFF8?

Link to comment
Share on other sites

The reason for the skip in the numbers is because one the the data tables (RoomDataTable) is greater than 256 bytes long. There was no way to fit it in a single page. Fortunately, most of the data tables in Adventure can cross pages with no problem (just the screen and sprite definitions are critical...if they cross pages, you wind up with glitches when the display kernal fetches them - taking a single cycle too long whenever it occurs).

 

 

More stuff you might already know...

 

 

About ORG (origin) definitions:

In a 4k game that has all bytes in the block occupied, Dasm really only requires 1 ORG statement (the one at the top of the file that instructs the assembler to what base address that the binary code will occupy). The first hex digit is of little consequence, so long as it is set to an ODD number (1, 3, 5, etc). If an even number was chosen, Dasm would use addresses reserved by RAM for the resulting ROM binary. Recall that the 2600 only uses 13-bit addressing - the first digit can only be odd or even in the address line. To the console, address $1F23 "looks" the same as address $FF23 (both first digits are odd, and the rest are identical between the two. Regardless of the block number used, the rest of the digits must be zero for the introductory ORiGin.

 

If all 4096 bytes are not defined in the assembly, an additional ORG is required near the end to place start and interrupt vectors at the precise locations where the console expects to find them ($xFFC/D and $xFFE/F respectively).

 

Thus, Dasm will generate a binary file that is exactly 4096 bytes long taking the above into account. All ROM code is assembled to odd-numbered addresses (as far as the 13-bit address line is concerned).

 

 

 

However, an F8 game occupies more than a single 4k block of rom. If only 1 ORG was used, the assember would end up using an even-numbered block for addresses that go beyond the first 4k of code. $1FFF+1 = $2000. Sure, you could add an ORG below the first 4k of code...but there's a problem with that:

 

ORG $1000

(4k of code here)

ORG $3000

(4k of code here)

 

...will create a binary that is 12k long. Though no code is given between the 2 blocks, Dasm will assume that an additional 4k exists at $2000 due to using odd-numbered blocks only. It would automatically fill in missing sections with byte value $FF.

 

 

ORG $1000

(4k of code here)

ORG $2000

(4k of code here)

 

...will not work, because the ROM code must not use addresses reserved for RAM ($2000-$2FFF are assumed to be RAM addresses $0000-$0FFF by the console's 6507 processor, due to the 13-bit address line "losing" the upper 3 bits).

 

 

 

Fortunately, Dasm has a solution...

ORG $1000

RORG $1000

(4k of code here)

ORG $2000

RORG $1000

(4k of code here)

 

This keeps both sides happy. The ORG's run consecutive, so that only 8k of binary code is generated...and the RORG's instruct Dasm to use the odd-numbered blocks that the 2600 hardware requires.

 

Note about the above:

Typically, the last 4k block of memory is assigned an ®ORiGin of $F000...with each preceding block using the previous odd digit. This makes it easier to trace problems during development and bugfixing (otherwise, it would be impossible to know at a glance which 4k bank of memory the program was executing at the time). This is not a requirement...just a general guideline to make things easier down the road. It makes no difference at all to the console...you can call both of them $F000, one of them $3000 and the other one $B000, whatever odd digits you choose. If the program encounters an instruction to jump to $F3A6, it's still only going to "see" JMP $13A6.

Edited by Nukey Shay
Link to comment
Share on other sites

Where did you learn all this stuff anyway?

 

Right here, basically. Anyway, the gist of it is to insure that screen and sprite bitmaps do not stretch over from any address $xxFF to $xx00, because the display kernal would burn an extra cycle when it happens for that scanline...an extra cycle that the kernal doesn't have to spare in many cases. Some people just use the ALIGN 256 command to instruct Dasm will fill up the current page with unused bytes. I prefer to use ORG's (set up consecutive page ORG commands and dump a lotta stuff between 'em). If Dasm reports an error, it will also report how many bytes attempted to cross the page (so take a table or group of tables consisting of that many bytes and move it someplace else).

 

 

 

 

In answer to your other question...what comes after $1FF8...the answer for an F8 binary ROM is:

 

$xFF8/$xFF9 = Bankswitch hotspots. Any access whatsoever to these addresses will cause one of the two 4k blocks of ROM to be "seen" by the hardware just as if you physically removed one 4k cartridge and plugged in another. Care must be taken that the program instructions intended to follow exist immediately after the bankswitch instruction's address in the other bank. $xFF8 will activate the first 4k block, $xFF9 will activate the second. Because the 2600 is in an unknown state when powering up, the console is capable of a cold start in either bank...so the boot code (where the start vector points at) must anticipate this.

 

$xFFA/$xFFB = NMI vector (unused in the 2600).

 

$xFFC/#xFFD = Cold start vector (address to jump to when powering up).

 

$xFFE/$xFFF = BRK interrupt vector (address of the subroutine to use when a BRK opcode is encountered).

 

Nothing follows $xFFF (because the contents of a bank can only exist from $x000 to $xFFF - exactly 4096 bytes, the maximum that the 2600 can "see").

 

 

Because the hardware vectors and bankswitch hotspots must exist right at the end of the binary, what I usually do is place an ending ORG there (hence the ORG $xFF8), place another ORG above it (ORG $xF00), dump a lotta junk between them, and edit it down if Dasm reports an error. If more data tables remain, I repeat with the previous page - place an ORG $xE00 above ORG $xF00 and move stuff in - and so on. Cuts down on wasted space, with cycles only being burned wherever it's unavoidable (as in the RoomDataTable matrix) :)

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...