Jump to content
Jet Set Willy & Manic Miner Community

jetsetdanny

Administrator
  • Posts

    3,229
  • Joined

  • Last visited

Everything posted by jetsetdanny

  1. Yes, I'll probably change some of them. I'll meditate on it in the coming days :) .
  2. I am wondering about the six bytes from A3F9 to A3FE. IIUC, they would be guardian 7F in JSWED, but it doesn't exist. SkoolKid says in his disassembly, The following entity definition (127) - whose eighth byte is at A3FF - is copied into the entity buffer at 8100 for any entity specification whose first byte is 127 or 255; the first byte of the definition (255) serves to terminate the entity buffer. So A3F8 is out of the question, because it has to be FF, and A3FF is out of the question, because it is the index of the first item. However, the six bytes in-between - are they used by *anything*, for *anything* at all? Any thoughts on this?
  3. As mentioned above, I have applied the fix in the Special Edition of "Willy's New Mansion". I decided to make use of the spare byte which emerged after the mode modifications. In order to do that, I did the following: The 'new' code is from #9BD2 to #9BE9 (for reasons related to the code distribution in "WNM SE") and it goes like this: 7e e6 38 c2 f2 91 dd 7e 01 e6 0f c6 38 e6 47 4f 7e e6 38 a9 4f c3 fd 91 The existing code at #91EE to #91FC has been edited as follows: c3 d2 9b 00 dd 7e 01 e6 07 4f 7e e6 78 a9 4f Therefore, I believe that thanks to the change in the C2 instruction in the 'new' code the spare byte, currently placed at #91F1, is omitted by the whole routine and can be safely used for other purposes (I have moved the music flags there from 85E2). If I have missed something and there is a flaw in the above solution / reasoning, please let me know! :)
  4. Thanks a lot for your explanations, Ian! You've done a great and clever job designing the fix! It's much appreciated :) .
  5. Ian, the bug fix is working fine AFAICT :) . Just one question. The modification you suggest to the original code at 91EE-91F0 makes the program jump to the new code located elsewhere. The instruction at the end of the new code makes the program jump to one byte *after* the modified original code. So it looks like all of the modified original code (after the jump instruction) is simply *bypassed*. How come it plays some role in the whole affair?
  6. I don't know and I would be surprised if he was. Having said that, it's probably high time to get him interested in "JSW" again :) . After all, he wrote on his website: And do I have any plans to create a third JSW game? No serious plans, no; but, for the sake of nostalgia, I do let the possibility run through my mind from time to time. I still have a few good ideas for rooms, and I sometimes think it might be quite fun to create another game. So, in the 'unofficial' words of James Bond: never say never again! :)
  7. Thanks, Ian! A link to Richard Hallas's article about music was already there in my post, but I guess there's never too much quoting (or linking to) such a classic :) .
  8. The original "Jet Set Willy" has a number of addresses which are unused and can be utilised for "higher purposes", such as inserting new code. A list of these addresses is included in SkoolKid's disassembly: http://skoolkid.github.io/jetsetwilly/maps/unused.html (in hex) http://skoolkit.ca/disassemblies/jet_set_willy/maps/unused.html (in decimal) Apart from the addresses mentioned in the list, there are other places in the original code which can be modified safely, such as e.g. everything that pertains to the colour code protection scheme. There are also some places where the original code can be optimised to gain a byte or three. I do not intend to describe all of them now (due to time constraints), but I would like to start a thread in which all the pertinent information can be placed, so that new pieces of information can be added as they emerge. While working on the Special Edition of "Willy's New Mansion" today I have discovered the following instances of possible optimisation of the original code: [the addresses below are in hex and refer to the original "JSW"] 8892 - 8894 The JP NZ instruction can be changed to JR NZ, saving one byte. 8898 The DI instruction is unnecessary (it disables interrupts which are already disabled; IIUC at 8400) - it can be NOPped out. 88AE - 88B0 The JP NZ instruction can be changed to JR NZ, saving one byte. That's a gain of three bytes altogether :) .
  9. Some more technical stuff: http://www.icemark.com/dataformats/mirrors/JSW%20Tech%20Page_files/tech.html http://www.seasip.info/Jsw/jsw2room.html http://www.oocities.org/andrewbroad/spectrum/willy/mm_format.html http://hallas.net/Software/music.htm
  10. Personally, I believe in the players' freedom. If someone manages to record an RZX walkthrough of the game, I don't think anybody should try to stop them from publishing it on RZX Archive. However, since you've asked about it, Metalmickey (thanks for asking!), it gives us some legitimation to express our preferences as to your sending your recording to RZX Archive right now or not just yet. I understand the rationale behind asking you to hold it for a while. However, it is possible that while you are waiting, someone else (who may never even post anything on this forum, so we don't even know the person is at it right now) will send their recording to RZX Archive and it will get published there instead of yours (first come, first serve). In such case your satisfaction from completing the game and documenting it with a published recording (thanks to being the first one to do it) will be lost. So, while I have no strong opinion on the subject, I would say, go ahead and send your recording to RZX Archive (especially if it's a good one in that you have completed the game without loss of life). I think that everyone realises that RZX recordings are spoilers. So once it's published, someone who wants to tackle the game and its mysteries themselves will know that they should not download the recording (or refrain from watching it if they do download it), while those who are curious about how the game can be solved without actually wanting to have a go at it themselves will have the freedom to fulfil their desire.
  11. Thanks a lot for playing and for your kind comments, Metalmickey! I am very glad you enjoyed the game... and congratulations on completing it successfully! :)
  12. And one more reflection about inserting two "main" patch vectors. While probably possible technically (why not?), I think it simply wouldn't make much sense. A patch vector is a subroutine, a chunk of code, which does something special in the room, and the two bytes in the room data point to where the patch vector for this particular room should be activated from (where it starts). The patch vector may include various elements, including calls to other subroutines. So, once you have been able to call a patch vector, you can make it perform all the tricks you want for this room. So you don't need a second patch vector. Having said that, perhaps with two patch vectors you could save some space. You need 3 additional bytes in the main loop and 5 additional bytes for the second "main" patch vector, that's 8 extra bytes altogether, not much. And then, if you have a patch vector for room A, and a patch vector for room B, and you want to apply both of them in room C, you could do it without sacrificing any more bytes, by calling them both, I think (thinking aloud, kind of). Perhaps it's not such a bad idea, after all...
  13. You could use these two bytes to determine some room-specific elements. In "Willy's New Mansion" Special Edition, for example, nnED is used to set the in-game tune by room and the nnEE and nnEF are used for patch vectors. If I wanted to add another element set by room using a special routine, e.g. which character Willy should be playing as in any given room, I could use one (or both, depending on the situation) of these additional spare bytes. Something to be kept in mind for the future...
  14. I agree with this. Moreover, if John Elliott's "new adjacent ropes patch" protects these bytes from being overwritten, this could be mentioned, too, if it falls within Richard's "policies" of supplying additional information.
  15. This is certainly true about the original, unmodified game engine. However, JSWED offers the possibility of applying John Elliiott's "new adjacent ropes patch", which eliminates the need to have a blank guardian in the guardian list after a rope. In other words, you can have a "regular" guardian after a rope in the guardian list, including another rope, I believe. So theoretically you can have a room with eight ropes. John Elliott once explained to me that the patch "relocates a couple of bytes of rope state to within the rope's guardian table entry, rather than the following guardian's entry." So the question arises whether applying the patch would protect the addresses 8141-8143 from *ever* being overwritten by ropes, even if a rope is the last guardian in the guardian list. It's a question to John, I guess. It would be interesting to know the answer for sure for future projects :) .
  16. It's not impossible, I believe. You *could* have eight ropes in the same room ;) . And no, the corruption of the in-game tune at some development points in "TNE" was not related to the ropes in any way. It was due to mistakes in the code determining the tunes for certain rooms.
  17. They may be unused, indeed. There are question marks next to them in Arsen Torbarina's document.
  18. Perhaps. I am not aware that it has been tried before. I guess the main patch vector would have to be modified, or there would have to be two CALL instructions in the main loop to call two separate main patch vectors, each of which would work just like the one in Geoff Eddy's games. Which are the unused bytes in the room data apart from ED, EE and EF?
  19. This is just a quick note to let you know that I am working on the Special Edition of my first JSW game "Willy's New Mansion". If all goes well, it will be released on 10 May, eleven and a half years after the release of the original edition. It will feature two new rooms and a lot of other enhancements (custom loader and loading screen, "advanced" title screen, a lot of patch vectors, teleportation, several in-game tunes, a serious challenge concerning the time limit, two separate Game Over screens [one for losing all lives, the other for running out of time] and other elements), including some things which have never been seen, TTBOMK, in any JSW game before. The download link will be announced in this thread on the release day :) .
  20. Back in 1999-2002 Geoff Eddy released four games which used a modified JSW48 game engine (by JSW48 I refer to the original game engine of "JSW", as distinct from the game engines later developed by John Elliott, known as JSW128 and JSW64). The game engine of the first three games ("J4 (The Fourth Remix)", "Willy the Hacker" and "Willy Takes a Trip") came to be known as Geoff Mode 1, and the game engine of the fourth game ("ZX Willy the Bug Slayer") as Geoff Mode 2. One of the characteristic features of these game engines is that they use the so-called patch vectors. As Geoff himself explained over a decade ago: "Two bytes within the room data specify the location of a subroutine which is called every tick, after Willy and all the guardians, items and arrows have been displayed but before the room data is finally copied to the screen. This subroutine, which may be different for each room, is known as the 'patch vector', for now-forgotten reasons." Geoff's website has sadly been offline for a while, but it can still be accessed on the Wayback Machine, e.g. at: https://web.archive.org/web/20031012234840/http://www.cix.co.uk/~morven/jsw/ https://web.archive.org/web/20030818082654/http://www.cix.co.uk/~morven/jsw/geoffmode.html https://web.archive.org/web/20030701143111/http://www.cix.co.uk/~morven/jsw/geoff_dis.html The above pages basically give all the information one needs to apply patch vectors. I used them in recent months while working on the Special Edition of my 2004 game "Willy's New Mansion" (to be released on 10 May, if all goes well). There were some things I had to understand before applying the patch vectors, however, and so now that I have been through it, I would like to share the information a little more "manual-style" than Geoff did in his notes, so that anyone interested can apply these changes in their own projects. First of all, what I call "the main patch vector" (which Geoff simply calls "the patch vector", but they are all patch vectors, so I think it's good to distinguish this one from all the other, room-speficic ones) has to be called from the main game loop. Geoff does it at #89F5-#89F7. I'm not sure if it has to necessarily be in this very spot, but I have just followed what Geoff did and placed it there and it works fine. So at #89F5 you have to insert the following code: CD x y CD is the CALL instruction, and x y are the two parts of the address where your "main patch vector" will be, in reversed order. So, for example, if you place the main patch vector at #8141, the CALL instruction at #89F5 has to be: CD 41 81 Now, in order to be able to insert the call instruction at #89F5, you need to have three bytes of unused space there. These are easy to achieve in a non-modified JSW48 game, because there is code which is unused at #8A0B - #8A25. So my suggestion is to (for example): - Move the code at #89F5-#8A0A three bytes down to #89F8-#8A0D (this frees up #89F5-#89F7). - Insert "CD 41 81" at #89F5-#89F7. - NOP out (set to zeroes) the addresses #8A0E-#8A25. In this case, the main patch vector is set to be at #8141. This address is the beginning of unused space which extends until #81FF in an unmodified JSW48 game. The main patch vector is 5 bytes long and it is the following code: 2A EE 80 E9 C9 So you need to insert this code at #8141-#8145. It could be inserted somewhere else where free space is, of course; in such case the CALL command at #89F5-#89F7 would have to be adjusted accordingly (to show the correct address). Now, as quoted before, the main patch vector uses two bytes within the room data of each room to specify the location of a subroutine which will be called to achieve some special effects. These bytes are always at #nnEE and #nnEF in the room data. So, for example, they would be at #C0EE and #C0EF in "The Off Licence" in the original "JSW". Incidentally, the preceding byte within the room data (at #nnED, so for example at #C0ED in "The Off Licence") is also unused by an unmodified game engine. It can be used for other purposes. Andrew Broad used it to determine Willy's character in each room in his game "Jet Set Willy: The Lord of the Rings". It has also been used to determine the in-game tune in each room in "Jet Set Willy: The Nightmare Edition" and in the soon-to-be-released Special Edition of "Willy New Mansion". Now, after applying the instruction to call the main patch vector and the main patch vector itself, the value of the addresses #nnEE and #nnEF in *every* room has to be modified adequately, i.e. it has to hold the address of the patch vector meant for this room or - if no patch vector is meant for this room - it *has* to point to the address where the C9 (RET) instruction is in the main patch vector. So in the example we are discussing, in every room where no patch vector is to be applied, the value of #nnEE and #nnEF *has* to be 45 81 - because the instruction C9 at the end of the main patch vector is at 8145. Otherwise the game will crash upon entering a room where this has not been set properly. In the rooms where specific patch vectors are to be applied, the value of #nnEE and #nnEF should point to the addresses where these patch vectors start. So, for example, using the free space extending between #8141 and #81FF, we we could insert a patch vector which will do something special in "The Off Licence". We could place this patch vector right after the main patch vector, starting at #8146. So the value of the addresses #C0EE and #C0EF would have to be, respectively, 46 and 81, to point to the address 8146 where the patch vector for this room begins. [EDIT: Additional info added following Ian's advice]: Every patch vector should end with a RET (C9) instruction, so that after executing it the program jumps back to the main loop. It has to happen at the very end of the patch vector, of course: some patch vector themselves call subroutines with CALL instructions within them; others may comprise several chunks of code with JP instructions in-between them. The important thing is that at the end of everything a patch vector is supposed to do there must be a return to the main loop or else the program will (most probably) crash. This is all concerning the general rules of how to apply patch vectors. Now, what can be achieved using them, can be seen in Geoff Eddy's games. It will also be very apparent in the Special Edition of "Willy's New Mansion", where the majority of the rooms (62 out of 66) will have specific patch vectors, both copied from Geoff's games (and modified in some cases) and of my own design :) . In fact, I believe the Special Edition of "Willy's New Mansion" will be the most-patch-vector-intense game ever released (among the ones using the JSW48 game engine, at least). I hope this is helpful. If you have any questions, I will try to answer them to the best of my knowledge :) .
  21. Please post an RZX. It's interesting. I tried it on Spectaculator 7 (I have 8 as well, but I prefer the display in 7) and I *think* I tried it with the music off and without jumping and still didn't notice it. Having said that, my test may have been not comprehensive enough (I also tried it on Spin and I couldn't guarantee right now that I tried all the possible options [music on jumping, music off jumping, music on non-jumping, music off non-jumping, etc.] on *both* emulators).
  22. Thanks for your feedback, Metalmickey! What emulator are you using? I have tried to check the quirk you mention in that collecting an item leaves the border at a different colour until Willy jumps. However, I don't see it happen either in Spin or in Spectaculator! :unsure:
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.