IRF Posted March 7, 2021 Report Share Posted March 7, 2021 (edited) On 2/2/2020 at 2:59 AM, jetsetdanny said: The data in question is at #C480 - #C49A and it is similar to the code in the original "JSW" (described by SkoolKid here). However, I think there is some difference in the earlier code which handles this data. WRITETYPER in the original "JSW" is coded in the following way: 1f 1f no keys pressed 1d 1f w 17 1f r 1f 1b i 0f 1f t 1b 1f e 0f 1f t 1f 0f y 1f 1e p 1b 1f e 17 1f r If the data in JSW128 corresponded to what happens in the original "JSW", the input would have to be (AFAICT): 1f 1f no keys pressed 1d 1f w 17 1f r 1f 1e p 1f 1b i 1f 1f no keys pressed 17 1f r 1f 1f no keys pressed 17 1f r 1f 1f no keys pressed 1f 1d o 1b 1f e 1f 17 u 1f 1f no keys pressed That's a big assumption in bold above. (Depending on your browser, you might need to expand out the quote to see the bit I've highlighted in bold.) To assist further, I've struck out the erroneous databyte from the second table above with a strikethrough font (and I've also highlighted it in italics). Now Danny, if you were to rearrange your table of data above with the correct number of databytes (to correspond with what is to found in the code at #C480 to #C49A, would there be something about the table of data that might make you question your assumption in bold? Edited March 7, 2021 by IRF Quote Link to comment Share on other sites More sharing options...
IRF Posted March 7, 2021 Report Share Posted March 7, 2021 (edited) EDIT: Danny, if when you read this post you have a 'lightbulb moment' and decide that you want to fully solve the 'superuser' puzzle for yourself, then please refrain from reading the following two posts before you have done so. Actually, I'll have a go at rearranging Danny's table of data myself to see what happens, just for fun. Using the same assumptions and methodology that Danny used first time round, but deleting the erroneous byte, this is what you get: 1f 1f no keys pressed 1d 1f w 17 1f r 1f 1e p 1f 1b i 1f 1f no keys pressed 17 1f r 1f 1f no keys pressed 17 1f r 1f 1f no keys pressed 1f 1d 1b w and i pressed simultaneously! 1f 1f no keys pressed 17 1f r 1f This byte has fallen off the end of the table! Clearly, something's gone wrong... Edited March 7, 2021 by IRF Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted March 7, 2021 Report Share Posted March 7, 2021 (edited) layout in groups of 3 value bits key1 key2 key3 1e 11110 q p a 1d 11101 w o s 1b 11011 e i d 17 10111 r u f 0f 01111 t y g 1f 1f 1d. s key3 1f 17. 1f u key2 1f 1e. 1f p key2 1b. 1f 1f e key1 17. 1f 1f r key1 1f 17. 1f u key2 1f 1f 1d. s key3 1b. 1f 1f e key1 17. 1f 1f r key1 laid out in a different way - - 1d. s - 17. - u - 1e. - p 1b. - - e 17. - - r - 17. - u - - 1d. s 1b. - - e 17. - - r Hope the above helps Edited March 7, 2021 by Norman Sword Clarification. IRF and JianYang 2 Quote Link to comment Share on other sites More sharing options...
IRF Posted March 7, 2021 Report Share Posted March 7, 2021 Spot on! Where Danny went wrong is that he arranged the data table into two columns, on the basis that that is how the data are arranged in the original JSW. But of course the reason that the data in original JSW is arranged in two columns, is because the WRITETYPER code draws on two half-rows of keys. Whereas in the JSW128 game engine, the fact that 'S' is one of the keys required indicates that three half-rows of keys are used, and therefore you need to arrange the data into three columns. The only question then is in which order the three half-rows are interrogated. The fact that the first three databytes are 1f 1f 1d, and once you knew that 's' is the first key in the sequence, tells you that A-G is interrogated after the first two half-rows (which follow the same order as in original JSW: Q-T and then Y-P). It was unfortunate that Danny made an error in transposing the data into his table - by adding an extra '1f' byte that doesn't exist, the dataset of 27 bytes became 28 and therefore fell into two columns. Once the errant byte is removed from the table, it should be obvious that the data doesn't fit into two columns. Hence my earlier comment that Danny should think about the: "implications... for the structure of the data". Quote Link to comment Share on other sites More sharing options...
jetsetdanny Posted March 7, 2021 Author Report Share Posted March 7, 2021 Thanks, Ian and Norman Sword! 👍 It is good that this issue has been explained at the code level and can be laid to rest. 🙂 I would NOT have spent another minute thinking about this code. I've spent enough time on this issue already. My approach to this topic is purely pragmatic. How to activate the cheat mode is something I believe should have been made public knowledge a long time ago, even more for the sake of game creators than players. Players can always POKE various things that make game easier into it. Creators, also the ones that only use JSWED and never dabble with the code, however, should be aware of how a feature of their game can be activated - or prevented from being activated - so that they can apply an adequate design (of room 046 in this instance). I created (co-created, to be exact, as these games incorporate a lot of other people's material) Jet Set Willy: The 2005 Megamix, Jet Set Willy: The 2010 Megamix and Jet Set Willy: Mind Control without knowing how to activate the cheat mode, and I wasn't happy about it. I did change the tunes in some projects, and I had no opportunity to test whether the data substitution I carried out (inserting a different tune as the cheat-mode in-game tune) actually worked flawlessly. I would have preferred that someone had revealed this secret so that I wouldn't have had to spend any time on it. Pursuing the issue of how to activate the cheat code was NOT something I enjoyed, it was something I felt NEEDED to be done, and so I dedicated some time to it which I would have gladly dedicated to other MM/JSW-related activities (and, had I not been successful in uncovering the secret [partially] through a combination of insight, brute force and educated guess, I would consider that time to have been wasted). Hence, once the mechanism of activation was revealed at the "player's" level (what needs to be done when playing the game to activate the cheat mode), I would not have bothered to spend any more time on trying to explain it at the code level. I'm glad it has been done, though, as it is better that such things are public knowledge 🙂. So I hope that Ian - or Norman Sword, perhaps? - will now reveal how to activate invincibility and antigravity. Ian already knows, as for Norman Sword - if he doesn't know, it would probably be a breeze for him to see what should be done by looking at the code. I believe this should be public knowledge, too, but I don't consider it as necessary as revealing how the cheat mode along with its special in-game tune should be activated, so I won't be spending any time on it, as I've got other MM/JSW-related things to attend to, far more important from my personal perspective... MtM 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted March 7, 2021 Report Share Posted March 7, 2021 (edited) 4 hours ago, jetsetdanny said: I would have preferred that someone had revealed this secret so that I wouldn't have had to spend any time on it. That isn't my recollection of your previous attitude, Danny. As I recall, after I had figured out the JSW128 cheat code (about 2 or 3 years ago), I offered to let you know what it was. But you asked me not to reveal it to you as you wanted to work it out for yourself. Then a year ago, you got so close (at least in respect of the 'superuser' code), that although you then invited me to fill in the details, I felt honour-bound not to deprive you of the satisfaction of working the rest out for yourself! And I still maintain that, if you had spent the two minutes it would have taken you to correct the unfortunate typo in your first attempt that I pointed out to you last year (see third post in this thread), then with a bit of lateral thinking you should have been able to solve the puzzle in a much more intellectually satisfactory manner - and consuming less of your 'precious Willy time' 😁 in the process - than the 'brute force' trial-and-error method that you eventually employed! No matter, it's done now. Quote So I hope that Ian will now reveal how to activate invincibility and antigravity. I didn't go into this earlier today, as I hadn't had the chance to refresh my memory about the precise details of how those features are activated. In fact, I still haven't had the chance to do that yet (i.e. dig out a JSW128 file and find the right part of the code). However, from memory, Forcefield and anti-Gravity modes can be toggled on and off by pressing the F and G key respectively, whilst simultaneously pressing one of the Shift keys (that's the part I can't recall exactly, whether it's Caps Shift or Symbol Shift?, and whether that translates as the SHIFT or the CTRL key on a laptop keyboard I can't recall either). But you should have enough information there to suss it out using trial and error, if you can't wait any longer to find out! 🙂 Edited March 8, 2021 by IRF jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted March 8, 2021 Report Share Posted March 8, 2021 (edited) 15 hours ago, jetsetdanny said: Creators, also the ones that only use JSWED and never dabble with the code, however, should be aware of how a feature of their game can be activated - or prevented from being activated - so that they can apply an adequate design (of room 046 in this instance). Or better still, so that game designers can edit the cheat code table of data, allowing them to have a bespoke activation code instead of 'superuser', for others to crack! Your latest challenge Danny, should you choose to accept it, is this: the next time you are designing a JSW128 or JSW64 engine game, think of another 9-character codeword that only draws on the same three half-rows of keys (i.e. Q-T, Y-P and S-G; 'A' is the pause key in JSW128/64 so is best avoided), and use what you have learned from Norman Sword's post above, to implement a novel alternative Cheat Mode key-sequence for your new game... Edited March 8, 2021 by IRF MtM 1 Quote Link to comment Share on other sites More sharing options...
MtM Posted March 8, 2021 Report Share Posted March 8, 2021 This is all too complicated for me 😉 Quote Link to comment Share on other sites More sharing options...
JianYang Posted March 8, 2021 Report Share Posted March 8, 2021 1 hour ago, IRF said: think of another 9-character codeword that only draws on the same three half-rows of keys (i.e. Q-T, Y-P and S-G I like stupidity IRF 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted March 8, 2021 Report Share Posted March 8, 2021 I did come up with the idea of doing a Fat Willy (oo-er missus!), with a really fat playing sprite (making it difficult to sneak past some of the guardians), and have the cheat code key sequence as SPARETYRE! 😁 But the 'A' key is used to pause the game, so the program would probably pause before 'A' gets detected for cheat code purposes, thereby disallowing that letter from being used. (Unless you tweaked the game engine so that, say, 'D' pauses the game instead of 'A'. N.B. 'F' and 'G' couldn't be used for pausing as they're used in activating the Forcefield/antiGrav features.) JianYang 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.