IRF Posted April 20, 2016 Report Share Posted April 20, 2016 (edited) Question: Is there a way of seriously slowing down the JSW game engine, so that one can study the exact pixel placement of Willy at each stage during a jump? i.e. so the screen image is effectively still for a few seconds during every frame of animation? I was thinking some sort of command could be placed in the Main Loop which delays things? Placing him in a field of Water cells whose pixels consist of a grid of horizontal and vertical lines will also help with this task. Edited April 20, 2016 by IRF Quote Link to comment Share on other sites More sharing options...
Spider Posted April 20, 2016 Report Share Posted April 20, 2016 Emulators will usually run at about 60% without issue, any slower and you get odd effects. The one sensible place I guess would be 35343 (remove the jump there) and then you have a few bytes available. Let me take a look at this later if you are not able to come up with anything. Quote Link to comment Share on other sites More sharing options...
IRF Posted April 20, 2016 Author Report Share Posted April 20, 2016 (edited) Do you know a command that would have the effect of causing such a delay? EDIT: As it happens, over in a PM I've just been discussing the 'DJNZ' command. It works on the 'B' register. I'm now wondering if that was inserted after the register 'B' had been set to a high value (such as #FF), with the operand of the DJNZ set to itself, then maybe it could cause quite a delay? e.g. at 35343, insert 'LD B, #FF. Then at 35345, 'DJNZ 35345'. The command at 35345 would then take the value of B (which would be initialised to #FF each time the program passes through the main loop) and decrement it by one, then jump back to itself and keep decrementing B until it reached a value of zero, before proceeding with the rest of the program? Edited April 20, 2016 by IRF Quote Link to comment Share on other sites More sharing options...
Spider Posted April 20, 2016 Report Share Posted April 20, 2016 I tried a few methods, mainly a call at 35343 to 65000 so I could safely have enough space to put some code but I could not get it to work properly even when preserving the registers: org 65000MAIN:ld c, 3looper2:ld b, 127looper:push bcld hl, 0ld de, 1ld (hl), bld bc, 767ldirld a, 5loopy haltdjnz loopypop bcdjnz looperdec cjr nz, looper2ret hmm :unsure: Quote Link to comment Share on other sites More sharing options...
Spider Posted April 20, 2016 Report Share Posted April 20, 2016 OK sorted this, not quite as I wanted but... 35680 LD BC,3 Init duration delay counter Change BC value to 255 As that screws the sound up a bit ( ! ) you need to disable it: 35683, 35684, both 0 to remove the OUT (254) , A instruction. Summary: POKE 35681,255 or #8B61,#FF POKE 35683,0 or #8B63,#00 POKE 35684,0 or #8B64,#00 Adjust 35681 / #8B61 to adjust the um, 'speed' Toggling in game music on / off will turn this effect on or off. It only slows down when the in game music is "playing" (although you cannot hear it) Jumping sound not effected. :) IRF 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted April 20, 2016 Author Report Share Posted April 20, 2016 (edited) Thanks Andy, I'll have a play later. I wonder if I increase the value of 35682 (#8B62) from zero, to anything up to #FF, can I increase the delay further by a factor of up to 256(!)? Edited April 20, 2016 by IRF Quote Link to comment Share on other sites More sharing options...
Spider Posted April 20, 2016 Report Share Posted April 20, 2016 It might not tested. :) 255 / #FF is very slow though I think ? :unsure: IRF 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted July 18, 2016 Author Report Share Posted July 18, 2016 *Bump*!!! Quote Link to comment Share on other sites More sharing options...
Spider Posted July 18, 2016 Report Share Posted July 18, 2016 Is #FF not slow enough ? :) One way would be to do a jump out of the main loop to higher memory to a 'delay' routine, the jump back again. This could be a bit messy though. :unsure: Quote Link to comment Share on other sites More sharing options...
IRF Posted July 18, 2016 Author Report Share Posted July 18, 2016 I think #FF is slow enough! Spider 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.