Jump to content
IGNORED

Sabre Wulf


Asmusr

Recommended Posts

OK, I counted them now... the total size of all metatiles combined is 1082 tiles, so only 61 tiles seem to be duplicated. At that rate it doesn't pay off to divide the metatiles into tiles, I think.

 

Yes, I guess that was also my reasoning. BTW, you avatar looks quite similar to the snake from Sabre Wulf. Any connection?

 

post-35226-0-49871200-1414082942.png

 

Link to comment
Share on other sites

Just out of curiosity, I tried to find out how the map data is represented in the original ZX Spectrum version... and I found a disassembly here:

 

http://opensourcezx.untergrund.net/files/sabrewulf/sabrewulf.txt

 

The disassembly author even seems to have worked on it a bit because some variables and labels have meaningful names, for instance, look for "MapLayout" near the start of the code. The map layout seems to be defined as I described it... as one byte entries into another table immediately below, "Screen Table". This one contains addresses of the screen definition. The screen definitions follow from L6200 on and seem to work similar to the TI version... only that there's no length word at the start, but instead each descriptor is terminated by a "0000" word. Before that, there seems to be an address (probably of the metatile definition) followed by coordinates where the metatiles go... with basically the same memory consumption as in the TI version, only they somehow manage to get away with a bit less words per screen. Maybe some of the metatiles that are separate in the TI version are connected to one in the Spectrum version... I didn't look into the metatile definitions themselves, however, because those are in one big data block, and you can't tell at which address a new definition starts because the addresses aren't given except for the start of the block.

 

As for my avatar, I didn't know there was a snake like that in Sabre Wulf. My avatar actually is rather related to Centipede although I might have seen similar snakes in Tutankham before I drew it up. My avatar is actually the logo of a virtual "radio station" called "Radio Worm". I used the name to do some shows some years ago which could only be heard by me and my parents because I have no broadcasting license. The worm was chosen because my parents were often complaining about the shows I put up, so it's the duty of the "worm" to creep around the floor, trying not to be seen and not to be stomped on, quickly to escape if attacked because of its smallness and sneakyness (or something like that).

  • Like 1
Link to comment
Share on other sites

Whoa, there is a disassembly! I extracted the graphics directly from the map, and later I ripped the sprites from the binary program files.

 

Anyway, here's the first cartridge version (the same that I posted on js99er.net). I have added the remaining sprites and some opening music. I replaced the 2UP score with the LAST score since I'm not going to implement a 2 player mode.

 

The cartridge loads the program into RAM, so a 32K is required, but unlike the cartridges for my other games all major data are kept in ROM. This leaves lots of RAM for the program. The source code, which contains all data and can be assembled using WinAsm99, is included, but in order to turn the object file into the cartridge file a special loader is required.

 

Note that the opening music sounds rather bad on my copy of Classic99. So if you have the same problems I suggest to try it out on MESS using the RPK file. If you have a 64K cartridge you can also program an EEPROM and try it on the hardware where it looks and sounds even better.

SabreWulf-cart-1.0.zip

  • Like 3
Link to comment
Share on other sites

Just tried the cartridge file on Classic99, music is playing fine and is actually a very nice rendition of the original. I would go as far as to say that this is the best version of the game on any of the early eighties systems.

 

There is only one thing I actually miss from the original Spectrum version-that strange kind of clicky sound when the bad guys regenerate, but I digress, this pisses all over the Spectrum version.

 

Congratulations on a job well done(again).

Link to comment
Share on other sites

I think I've found an error in the disk version... I got into this error multiple times, but it only seems to appear after playing a number of games. Today I got it after a "blue" state of my player. Suddenly my player was in a no-escape state, in a small empty zone at the right of a screen where you go only to the right, to another small empty zone at the left of the next screen. But the enemies, in this state, also behave strangely, some flicker all over the place and explode without having reached the border. I don't know how to describe it further... it all seems to go havoc somehow.

 

I don't know how useful this may be, but I saved a state in MESS while being in this state, and I've attached it to this post. I've zipped the file because I'm not permitted to post a STA file here. However, that file is only 5K, so I don't know what has actually been saved here.

 

Just tried to load it in MESS, and it doesn't seem to be very useful, actually.

 

Now trying the cartridge version...

0.zip

Link to comment
Share on other sites

Seems like the error mentioned above also is there on the cartridge version, sadly. However, I just found another error in the cartridge version... there is a place pn the right of the screen on the lower right corner of the map where you can go upwards, but on the screen above it there's just bushes, so if you spawn there, you're stuck and can't even die because the animals and other creatures can't reach you in this place. In the original Spectrum map, there's a small strip of mountains in that empty place on the lower right corner, so you can't go upwards there.

Link to comment
Share on other sites

Seems like the error mentioned above also is there on the cartridge version, sadly. However, I just found another error in the cartridge version... there is a place pn the right of the screen on the lower right corner of the map where you can go upwards, but on the screen above it there's just bushes, so if you spawn there, you're stuck and can't even die because the animals and other creatures can't reach you in this place. In the original Spectrum map, there's a small strip of mountains in that empty place on the lower right corner, so you can't go upwards there.

 

Thanks, I will check it. If it's just an omission in the map it should be easy to fix.

Link to comment
Share on other sites

Kurt, is the STA file a MESS state file? Since I rewrote the TI emulation two years ago the state save of the TI-based systems does not work anymore. I'll have to fix that some time, but priority has been too low till now.

Yes, it is a MESS state file... precisely from MESS 0.135 (unless I updated it without changing the directory name, but I don't think I did that). Sorry, I didn't take into account there are of course newer versions of MESS which I could have used.

Link to comment
Share on other sites

I've now tried the cartridge version that's currently included on js99er.net, and it crashes there as well, nearly in the same was as on MESS 0.135. Not immediately, but after playing some games. However, js99er doesn't provide state saving at all, so I can't provide you with a dump. Anyway, what I'm doing is to keep the fire button depressed at nearly all times, unless it's necessary to leave the screen (which is sometimes the case, especially when the player's blue). This may be related to the bug. Just before it happened in js99er.net, I couldn't leave the screen on the top end. Then I released the fire button (in this case, the mouse button with the mouse pointer on the fire icon), and then several screens flashed by in rapid succession. After that, one screen stayed on, but there was an explosion-like sound and nothing further happened.

Link to comment
Share on other sites

Here's a screenshot of js99er.net after the crash occured again. Don't know how it got there, though... but maybe you can get some hints by the register values which part of the program the crash is leading to. At this time, the contents of R0 and R9 are jumping wildly around while the PC mainly shows AF34, AF36 and sometimes AF32. All other values seem to be static.

post-8393-0-38669000-1414257222_thumb.png

Link to comment
Share on other sites

Here's a screenshot of js99er.net after the crash occured again. Don't know how it got there, though... but maybe you can get some hints by the register values which part of the program the crash is leading to. At this time, the contents of R0 and R9 are jumping wildly around while the PC mainly shows AF34, AF36 and sometimes AF32. All other values seem to be static.

 

Thanks, I will try to reproduce it.

Link to comment
Share on other sites

I think I've found an error in the disk version... I got into this error multiple times, but it only seems to appear after playing a number of games. Today I got it after a "blue" state of my player. Suddenly my player was in a no-escape state, in a small empty zone at the right of a screen where you go only to the right, to another small empty zone at the left of the next screen. But the enemies, in this state, also behave strangely, some flicker all over the place and explode without having reached the border. I don't know how to describe it further... it all seems to go havoc somehow.

 

I believe I have fixed a problem to do with the blue speed state in this version. I don't know if it's the exact same problem that Kurt describes, but I when I moved to a new screen in the blue state I sometimes ended up in the wrong screen trapped inside the plants. This doesn't seem to happen any longer in the attached version. I also added a small delay when you die so you will see the game over screen even if you have fire pressed.

SabreWulf-cart.1.0.2.zip

SabreWulf-1.0.2.zip

  • Like 1
Link to comment
Share on other sites

Sorry, but I got that error again. This time I played a few games in MESS 0.146 (the latest version I currently have) with your latest RPK version in European mode (50 Hz)... but PAL or NTSC doesn't seem to matter. I played the longest game I ever had at over 22 minutes and 17715 points, and I must have completed about 60% of the game, but then I still lost all my lives near the top of the map. One of those big animals which can only be chased away was on screen, and on dying, that animal turned into "---", while the other enemy sprites and also the player sprite was briefly obfuscated before the "Game over" message appeared. On starting a new game, I couldn't leave the starting screen with the button depressed, then I let go of the button and left the starting screen with the same result - some screens flashing by, then the explosion noise and seemingly the same location on the bottom of the map. Sadly, MESS 0.146 doesn't allow to spontaneously enter the debugger unless you set it first when entering emulation, so I can't give you any "hard data" this time, but it seems like some part of the memory got corrupted on losing the last life. Common to the last time I got the crash, I attempted to leave the screen going upward.

Link to comment
Share on other sites

Moving down from one screen to the next can be awkward sometimes. If you're on the left-side of a vertical path and moving down, you seem to get caught on something which won't let you leave the screen. (Almost like you're bumping into the top edge/corner of the adjacent tile on the next screen down.)

 

This makes it easy to be killed in a struggle to leave the screen.

 

I played the heck out of the ZX Spectrum version, finishing it without maps a handful of times, yet I don't remember there being problems moving from one screen to the next like this.

 

Still, it's a great game and the only system I've played Sabre Wulf on (other than my ZX Spectrum back in the day) is the BBC Micro and Rasmus' version beats the pants off the blocky Acorn port - heck, it nearly beats the ZX Spectrum original! (Nearly. It doesn't matter how good this version gets, pure nostalgic sentiment will always stop it beating the original in my mind. Sorry.)

 

...It would be nice to be able to leave the screen on a vertical path without a joystick-waggling session though.

 

Edit: I've not experienced any other problems so far and this includes the problem(s) Kurt is experiencing. I'm playing on a real hardware though, from a nanoPEB, if this makes a difference?

Edited by UKRetrogamer
Link to comment
Share on other sites

Here's another crash report... I've again played the version included in JS99'er, and again got the crash near the starting point in the map. At that point, I switched to the debugger, so here are the register values and the disassembly listing from the point in the loop on. Apparently, it sits in a loop from AF32 to AF36. I've located this loop in the source code, it's near the middle of bank0.a99, and normally, its purpose would be to build a RAM map of the screen at coordinates @SCRNX, @SCRNY, as the source code says, more specifically, to add a metatile to it, and the address AF32 corresponds to the label BLDMA3. This loop has multiple outer loops with R9 as the inner counter (for the width), R13 as the middle counter (for the row) and R5 as the outer counter (for the number of meta tiles left). However, something seems to have gone wrong here... R9 contains $B83B, R13 contains $FFE3 and R5 contains $83DC, which actually would be an address in CPU Scratch Pad RAM if I'm correct, so all these aren't valid values for loop counters which should be much smaller (maybe in the 1-byte range each). However, I don't know how those values got there. Maybe an incorrect map location was given which would make the program read the data from somewhere completely different where the values aren't in the range valid for the loop counters. Obviously, there are several levels of indirection at work here which make an error like this easy to happen, but hard to find.

 

One hint could be the fact that before this crash happens, several other screens are shown in rapid succession... seems like the player leaves the first screen, then the next screen gets redrawn, but the player position inside of it seems to be immediately "out of bounds" again, so the next screen gets fetched... the question is, how are the player coordinates on entering a screen determined, which coordinates cause a screen flip, and which coordinates would cause an invalid screen flip (i.e. landing in an unexpected screen or even out of the map)?

 

Maybe a hint on how I'm playing the game... I keep the fire button depressed nearly all the time (since doing so doesn't have any negative effects), and sometimes when I enter the screen and see it's a dead end or there's nothing there to collect, I immediately go back to the screen I came from.

post-8393-0-80294400-1414406987_thumb.png

Edited by Kurt_Woloch
Link to comment
Share on other sites

One hint could be the fact that before this crash happens, several other screens are shown in rapid succession... seems like the player leaves the first screen, then the next screen gets redrawn, but the player position inside of it seems to be immediately "out of bounds" again, so the next screen gets fetched... the question is, how are the player coordinates on entering a screen determined, which coordinates cause a screen flip, and which coordinates would cause an invalid screen flip (i.e. landing in an unexpected screen or even out of the map)?

 

Maybe a hint on how I'm playing the game... I keep the fire button depressed nearly all the time (since doing so doesn't have any negative effects), and sometimes when I enter the screen and see it's a dead end or there's nothing there to collect, I immediately go back to the screen I came from.

 

I think your analysis may be spot on, and indeed there was a discrepancy between the y cooordinate that I checked when leaving the screen at the bottom (160) and the coordinate where I placed the man after going through the screen at the top (176). I fixed the same kind on issue the other day but in the horizontal direction. So when you feel like another go at reproducing the error please try this new version or the one in Js99'er, which has also been updated now (remember to reload the page).

SabreWulf-1.0.3.zip

SabreWulf-cart.1.0.3.zip

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