Jump to content
Jet Set Willy & Manic Miner Community

IRF

Contributor
  • Posts

    5,112
  • Joined

  • Last visited

Everything posted by IRF

  1. I believe you have inserted some of your extra code into the vicinity of #96F4-97FF?
  2. I guess you could modify the code in the MM game engine. First thoughts: swap around the DEC A and INC A at #8E07 and #8E12 respectively, and then modify the y-coordinate at which Eugene comes to a halt (#8E14). I have a further suggestion for a modification to Eugene - in fact suggestions for all four 'special' MM guardians, in the JSW64 game engine - but they will have to wait for a future post, when I have the time.
  3. I think Geoff Eddy's games may take a similar approach. Certainly there's a room in which there are two ramps, drawn in opposite directions. However, getting both ramps to behave as they should in terms of Willy's movement along them (and the pixel-height at which he is drawn whilst on a ramp) requires a Main Loop Patch Vector approach, to vary the Ramp Direction Byte in the room buffer as Willy's horizontal coordinate changes within the room.
  4. I presume that should read "Jr z, L38163"? (Jumps forward by one byte to skip the EX HL, DE command.). EDIT: That should have read EX DE, HL. That would be a usefully-placed optimisation in Manic Miner, as it would allow the insertion in situ of a test of the Conveyor length ("Is it zero? If so, RET"). Thus allowing a cavern to have no Conveyor animation without corrupting the screen. (In the existing MM code, if you don't have a Conveyor in a cavern, then you have to insert a 'hidden' one, at least one byte in length, within an Air cell. Because the routine that animates the Conveyor interprets a Conveyor length of zero as a length of 256 bytes!)
  5. This isn't really related to AND, OR or XOR, but it's another impressive little trick of John Elliott's that I thought was worth mentioning somewhere: In the code that moves Skylabs in the JSW64 game engine, there's a cunning use of the CCF command (Complement the Carry Flag), as part of a code-efficient way of handling Skylabs that move upwards. ****** And on the subject of variations on classic Manic Miner 'specials' in JSW64, I haven't seen it explicitly pointed out anywhere in the manual or anywhere else, but it is perfectly possible to have an Angry Eugene that moves upwards until it stops (rather than downwards as in the original MM).
  6. I gather (correct me if I'm wrong?) that Mickey doesn't want the number to be known from the outset (as per the original, where you only knew that you had to collect "all the items"). The Item countdown kind of reveals that. But to spare the player from regularly having to return to the Master Bedroom to check whether or not Maria is still hanging around, activating the Screen Flash at the point when they're all collected could be a nice touch?
  7. You wouldn't need to tell the player how many items there are in advance, but I think it wouldn't do any harm to have a little visual clue that Willy has finished his mission and it's time for beddibyes!
  8. Oh, I also meant to say: if you take up the idea of activating the 'Screen Flash' routine at the point when Willy has collected all the items, you could make an intervention at #9429 (just after the LD A, #01) with a CALL to another spare space in the code, then at that new location, insert: LD (#85DF), A [this is the existing command relocated from #9429 to make way for the CALL] LD A, #08 [or #10, which in decimal is 16; I recommend a value that is a multiple of 8] LD (#85CD), A [set the Screen Flash Counter to that value] RET The Screen Flash Counter will then be decremented once for each pass through the Main Loop, as the screen PAPER cycles through the colours, until it reaches a value of zero and the flashing stops. :)
  9. Any savings you might make, may be eaten up by the extra code required to set up a loop to perform the repetitive bits?
  10. I think we might have changed it to him/his bed in The Nightmare Edition, although I haven't checked. It's an easy thing to change though. Edit: Thinking back, I think the main reason for the change was to free up one character, because we had replaced the word "midnight" with "high noon", which is one character longer. But thinking about the subtext, it does perhaps make more sense as his/him. The last character of the scrolling message (the final +) doesn't get used anyway (try replacing it with something daft and you'll see what I mean).
  11. ...except that might not work if you altered the Screen Flash routine, in the process of making recent changes to the AMI game file (such as doubling the clock speed)?
  12. Thanks for the latest code, Norman. I've tweaked and replaced the 'Norman' file attached to my post from last night (the one with three files attached for 'compare and contrast' purposes: unfixed, Ian's fix and Norman's fix). EDIT: In implementing your latest tweak, this time I have left the two additional spare bytes at the end of the screen-drawing code (instead of bothering to consolidate it with the six spare bytes at the start). They might be useful for some other purpose (such as adding an AND #80 prior to the nearby check of the internal 'ticker' [see #8A50], which has the effect of doubling the speed of the digital clock on the status bar).
  13. By the additional JR, I presume you are referring to the jump forward (on occasions when you're not copying the attributes) to the INC L and then the jump back to LOOP? (Whereas in your previous code, if it wasn't time to copy the attributes, you jumped straight back to LOOP.) Aside from that drawback, you could have implemented the above in the version with the XOR A command, thereby saving a further two bytes (no need to do the DEC L and INC L in order to set the Zero Flag at the end of the final iteration of the drawing loop)?
  14. If you try POKING 34253 to a value such as 8 or 16 whilst the game is running, you'll see the Screen Flash effect working. :) Either that, or play Manic Miner until you've collected 10,000 points.
  15. For the record, this is how I tweaked Norman's latest code (one additional byte compared with post no. 33, changes in bold): EDIT: Note that this method leaves six spare bytes very usefully located in the spare loop, just prior to the screen-drawing code (at #89F5-#89FA). That's enough to insert a CALL to the Screen Flash Routine (which would have to be reinstated elsewhere) AND a CALL to the Main Loop Patch Vector. :) org #89FB LD HL, 05C00H LD DE, 05800H EXX LD A, #04 ld HL, 08200H loop ld e,(hl) inc l push hl ld d,(hl) ld l,e ld h,d res 5,d ld bc,32 ldir pop hl inc l JR Z, #0E If L has reached zero, then jump forward to the code which doubles Willy's speed during the Toilet Dash inc a and 7 jr nz loop exx ld bc,32 ldir exx dec L inc L JR loop Jump back to draw the next pixel-row (always necessary at this point, as the attributes are copied midway through the drawing of each cell-row) ;---------------------------- ld a,(34271) ;23 ; this code is moved down in memory and 2 ;25 rrca ;26 ld hl,34258 ;29 or (hl) ;30 ld (hl),a ;31 jr 35377 ;33
  16. Okay, please see the three attached test files. (Ignore the fact that Willy jumps upon start-up, and walks backwards; those are relics from some earlier testing.) The 'Ian' fixed file has my latest iteration of a patch for the 'Delayed Attribute Effect', woven into Norman's original fix for the 'Jagged Finger Effect' as per my disassembly in post no. 32. I've also attached an unfixed file to allow for a Before vs. After contrast. The difference is striking, and the 'Delayed Attribute' is almost entirely eliminated. N.B. I tried to create an additional file, based on Norman's latest code (post no. 33), but that is still work in progress. Following Norman's code exactly (with the XOR A at the start) it worked okay, but the suppression of the 'Delayed Attribute' wasn't as effective as it is in my version (see previous discussion). So I tried to swap the XOR A for a LD A, #04. Alas, that caused the file to crash soon after the game started. So I need to look into what's going wrong (I know that it arose out of my minor departure from Norman's code, but I haven't yet figured out exactly why it doesn't work). EDIT: The screen is actually drawn prior to the crash, and I think that the problem is arising because the drawing loop doesn't know when to come to an end. That in turn is because the copying of attributes to the bottom cell-row doesn't follow on immediately after the final pixel-row has been drawn (i.e. the point at which L, the index to the table at #8200, has wrapped back round to zero). So the end of the outer loop might need to be tweaked a bit... UPDATE: I've also attached a 'Norman' file in which I've implemented Norman's fix from post no. 40 33, only I've modified it slightly so that As with my fix, the attributes are copied for each cell-row, mid-way through the process of copying the graphic bytes for that cell-row (i.e. after the first four pixel-rows have been drawn). Norman's fix required three (UPDATE: five) fewer bytes than mine, but I get the impression that the improvement in terms of the Delayed Attributes is slightly greater with my fix in place (EDIT: or maybe not?) However, there's not much in it, and both fixes offer a vast improvement in comparison with the 'unfixed' file. :) Jagged Finger & Delayed Attributes Ian Fix.z80 Jagged Finger & Delayed Attributes Bugs.z80 Jagged Finger & Delayed Attributes Norman Fix.z80
  17. There are a few instances in the JSW code where the following sequence of commands are used: LD A, (#0000) INC A LD (#0000), A That's seven bytes in total. This can sometimes be replaced with the following four bytes (saving three bytes): LD HL, #0000 INC (HL) e.g. the updates within the Main Loop to the game's internal 'ticker' (#85CB), or to the Music Note Index (#85E1). EDIT: And to the Jumping Animation Counter in Move Willy (1). N.B. This approach couldn't be used in circumstances where the HL register-pair is currently in use for another purpose (e.g. to update the Game Mode Indicator during the course of the 'Draw the items' routine), without bookending with PUSH HL and POP HL (which negates two of the three byte saving). EDIT: in circumstances where the program subsequently does something else with the updated variable, then you'd have to follow the above with LD A,(HL), thus reducing the saving to two bytes.
  18. Norman, thanks for your latest post (which crossed over with one of mine). Looking at my latest code, I believe there are four instructions that you would term 'extra overhead' (#89FB-#89FF in my latest disassembly, in post no 32). Would that slow down the game considerably? (I haven't tried it out yet.) Balanced against that, my understanding of your latest code which copies the attributes at the same time, is that all eight rows of graphic-bytes would be copied to a particular cell-row before its attributes are distributed. That means that there would be a delay caused by up to 256 graphic bytes being copied, before a bitmap in the top pixel-row of its cell-row is united with its associated attribute. Of course, the situation would be much better for the bitmaps in the bottom pixel-row of a cell-row, because only 32 bytes would have to be copied in the intervening period. But my latest effort is an attempt to 'evenly spread' the delays, because last night I came up with a similar solution to yours [EDIT: similar in terms of the sequencing, not the execution], but I noticed that there was still a residual (albeit improved) 'Delayed Attribute Effect' - particularly for (fast-moving) Arrows located in the top pixel-rows of their host cell-rows. EDIT: Would replacing your XOR A (at 35317+7) with a LD A, #04 achieve what I'm after? i.e. Copying the attributes after the four pixel-rows but before the bottom four pixel-rows, for each cell-row in turn? ****** Looking at the length of your code, I believe it pips mine to the post by one byte in terms of efficiency. :) EDIT: Or it would be exactly the same length if we were to set the initial value of A to #04.
  19. In contrast, in Matthew's original regime, there were considerable delays involved, which varied according to the position on the screen. Considering two extreme examples: - after the final graphic byte was drawn at the bottom-right corner of the playing area, there was a relatively short delay whilst the 512 attribute bytes were copied (as well as the time taken to enact the Toilet Dash double-speed effect and, if applicable, the 'Screen Flash' routine); - after the first graphic byte was drawn at the top-left corner of the screen, its associated attribute wouldn't get copied until every other graphic byte had been drawn - that's 32*16*8=4096!
  20. This should do it - with this 'regime' in place, the maximum delay between a graphic byte being drawn, and its associated attribute byte being copied to the screen, should be the length of time it takes to draw 128 graphic bytes (equivalent to four whole pixel-rows). So it should minimise the 'Delayed [or Premature] Attribute Effect' (as well as the 'Jagged Finger Effect'). It's a bit more efficient than my previous attempt so it also restores the three bytes spare for a CALL to the Screen Flash routine at the start. I'll try it out later: (Norman
  21. Danny, I've removed the files for now, so I can carry out further tweaking, and then re-upload a (hopefully) new and improved version. That'll save you from looking at various iterations, with slight improvements each time - it would be better for you to see the final article, and observe the greatest 'Before vs After' contrast in one hit!
  22. That's exactly what was happening during my previous 'semi-successful' attempt to fix the 'Delayed Attributes' bug. In fact, some of the arrows actually had red 'trailing edges' instead of red 'leading edges', particularly where an arrow occupied a pixel-row towards the bottom of its cell-row - the white attribute was being advanced ahead of the arrow's graphical bytes. A kind of 'Premature Attribute Update' effect, so to speak. I suppose the optimum fix would be, for each cell-row, to draw the top four pixel-rows, copy the attributes for that cell-row, and then draw the bottom four pixel-rows. That would balance out/minimise the 'delays' between any particular graphic byte and its associated attribute being distributed across the whole screen. It might further complicate the code though!
  23. Maybe it ended up impressive once I'd resolved a couple of silly mistakes! I'm still not convinced it's as byte-efficient as it could be though?
  24. Hopefully you won't need to be able to follow the details to appreciate the qualitative difference between the Before and After scenarios? The improvement in terms of the 'Delayed Attributes' is easily seen in the starting room (Swimming Pool), and it you wander left and then up the long staircase as far as Conservatory Roof, you can hopefully see the improvement in terms of the 'Jagged Finger' - watch Willy's sprite as he goes up the ramp (particularly as he passes from bottom to top half of the playing area), and the horizontal guardians in Conservatory Roof. EDIT: Other places to watch/compare/contrast: - watch Willy jump and fall in Front Door (highly noticeable improvement in there because the Air INK is Black against Cyan PAPER, both of which contrast well with Willy's customary White); - drop him down into Entrance to Hades; - observe the fast-moving vertical guardians in 'I'm sure I've seen this before', and 'Rescue Esmerelda'; also the beak of the horizontal Bird in both rooms, and the Arrows in the former.
×
×
  • Create New...

Important Information

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