Jump to content
Jet Set Willy & Manic Miner Community

Norman Sword

Contributor
  • Posts

    596
  • Joined

  • Last visited

Posts posted by Norman Sword

  1. On 5/2/2024 at 5:07 PM, Rev. Stuart Campbell said:

    BTW if we're doing requests, would love to see these POKEs added which provide a sound effect when you collect an object, as per other versions.

    POKE 36742 , 82
    POKE 36743 , 147
    POKE 37714 , 58
    POKE 37715 , 115
    POKE 37716 , 128
    POKE 37717 , 14
    POKE 37718 , 128
    POKE 37719 , 211
    POKE 37720 , 254
    POKE 37721 , 238
    POKE 37722 , 24
    POKE 37723 , 95
    POKE 37724 , 62
    POKE 37725 , 144
    POKE 37726 , 145
    POKE 37727 , 71
    POKE 37728 , 123
    POKE 37729 , 16
    POKE 37730 , 254
    POKE 37731 , 13
    POKE 37732 , 13
    POKE 37733 , 32
    POKE 37734 , 240
    POKE 37735 , 195
    POKE 37736 , 254
    POKE 37737 , 144

     

    (I've added them myself and they work, but it'd be nice to have them in the proper TAP file, not just a snapshot.)


    The above pokes - demystified into actual Z80 code

     


    opcode                    address                 address                  comment
                                    hex #8F85             decimal 36741    ; note:- listed one byte earlier
    call #90fe               ;#cd,#fe,#90                                      ; the original call to the score routine
    changed to
    call #9352              ;#cd,#52,#93         ;205,82,147         ; note:- the call opcode is included here


    this routine is a copy of the Item collect sound in Jet Set Willy

    opcodes                ;address              ;address
    ;                             ; hex                     ; decimal
    ;                             ;#9352                 ;37714


    ld a,(#8073)          ;#3a,#73,#80      ;58,115,128              ; get border colour
    ld c,#80                 ;#0e,#80              ;14,128                   ; set loop counter (duration)
    sfx:
    out (#fe),a             ;#d3,#fe              ;211,254                  ; set border + ear + mic
    xor #18                  ;#ee,#18              ;238,24                   ; toggle ear + mic bits
    ld e,a                      ;#5f                     ;95                          ; save the border + ear + mic state in {e}
    ld a,#90                 ;#3e,#90             ;62,144                    ; calculate a pitch
    sub c                      ;#91                    ;145
    ld b,a                      ;#47                   ;71                            ; the calculated pitch to {b}
    ld a,e                      ;#7b                   ;123                          ; restore border + ear + mic back from {e} to  {a}
    sfx_loop: 
    djnz sfx_loop          ;#10,#fe             ;16,254                   ; loop (delay) for the pitch
    dec c                       ;#0d                  ;13                           ; decrease the time counter
    dec c                       ;#0d                  ;13
    jr nz,sfx                   ;#20,#f0           ;32,240                    ; keep looping till out of time, {c}=0


    jp #90fe                 ;#c3,#fe,#90     ;195,254,144            ; jump to the score routine

     

    Addendum.
    the JSW sound routine uses absolute address's for picking up the border colour. The actual routine uses relative jumps thoughout. This means this routine can be placed at any address, without having to change any of the routines data. The only change would be calculating the actual address that the routine sits at.

    Addendum 2
    A re-write can shorten the above 24 byte routine by 3 bytes. (I have not listed the re-write)
     

  2. 13 hours ago, jetsetdanny said:

    My intuitive reply to the question that forms the subject of this thread - "Why was Manic Miner never properly optimised?" - would be: because people who would have been able to do it were not interested, and people who may have had interest in doing it were not able to.

     

    Which is my understanding of the problem.

    I will ignore the rest because it evolved into criticism of the journey I undertook to write the code. Followed by Defending a program that was not criticised. I simply made a statement in response to Spider extolling the said program..... It does not optimise MM and is just a simple editor. The same as I write this text in a simple editor that does NOT optimise MM.  ---- Show me where that statement criticises the text editor I am using to write this text? 


     

  3. Apologies to the original person who modified Matthews code. (see below)


    Last week I wondered why Manic Miner has been left languishing as a little used format for code change. It seems the vast majority of game edits use the 64 room game version of Jet Set Willy as the basics for new games, and Manic Miner seems to have, in the main, been ignored.

    The limited scope of Manic Miner might be the reason, just 20 caverns, whilst JSW manages a max of 64 (on a 48k zx spectrum)


    I wondered if it was or would be easy to write a piece of code that compacted the game slightly. I personally have no need for such gimmicks. If I need more space, I will just rewrite the code. A quick rewrite as demonstrated in Manic 40 Miner takes very little effort. But I task myself with just writing code for the sake of writing code so, how hard is a universal compaction piece of code for Manic Miner?


    The answer is it took me a couple of hours to write a routine that compacted the game. It was at that point I delved into archives looking for versions to try my code on. That was when I discovered that the great multitude of Manic Miner versions I wanted to test my code on did not exist.  

    I modified Matthews original code with no problem.
    I modified some other version - but that had no need of the addition I added (e.g. the font change)
    I knew of a recent listed modification of Matthews Manic Miner and that was used as a basis for demonstrating what the code I wrote could do.


    The version I decided to modify was Manic Person (human Version).

    So included here is a demonstration of the game -- Manic Miner -- Modified by a simple (for me) piece of code that does basic code modifications to the game.

    The demo does go a bit further and uses the freed space. The text added is deliberately long winded --- (it is just a demo of what can be done)

    The included demo - will be deleted in a week. It is NOT a version that is available for general public release. 

     

    and has now been deleted -----  New code has been added (see addendum)- the new code is just the original Manic Miner

     

    Let the demo play through to the final cavern and on---


    Ending the post.
    The universal code I wrote is in a format that will modify the basic code of Manic Miner and then return to Basic or Enter the modified game code and play the game.
    That code is not included here.

    The big question I ask myself is. Why has no one bothered to do this simple task? As stated elsewhere the code took just a few hours.


    ADDENDUM.
    Since this was missing a file demonstrating what I was talking about.  A non edited version of Manic Miner has been run through my optimisation routine.
    Wait until the end of the 20 caverns to be displayed in the demo mode.  THE text is in addition to other optimisations that have been performed. Note - this program has not been edited to fix any other code- so the pause bug and any other original problems, may still exist.
     

     

    MANIC-C.TAP

  4. Manic 40 Miner


    Manic 40 Miner

    This file is posted elsewhere --- 

    Moved here because I found it very difficult to find --- 



    After I stopped developing the JSW128  VK VL VM   engine. I spent a week writing a version of Manic Miner called  Manic 40 Miner.
    This does not contain any new rooms. They are the original and Ligans rooms.

    This means this version contains 40 caverns, starting with the original 20 caverns, then continuing on with another 20 caverns originally desisigned by Ligan. (of those 20 caverns, some have been redesigned by me)

    NOTE this runs in 48k the same as the original.

    This has a built in part game editor ---- Not enough space to add more scope, when the room/cavern count has been doubled.

    ----------------------------------------------------------------

     

    post-125-0-22687300-1580996814_thumb.png

     

     


     

  5. 18 hours ago, IRF said:

    The most glaring example of that is that it is MUCH easier to access 'Under the Drive' / 'Tree Root' thanks to the immunity - just drop down through one of the Security Guards (twice, first time will kill you but you can survive the second time if you do it fast enough).

    Doing the drop through the Security Guard gains no advantage.  The Wine Cellar still needs to be completed. And can not be completed in reverse.So what exactly are the benefits of using a life to gain no advantage.

     

  6. Manic Miner with automatic play


    An extension for the automatic play version. In this version the game can be played in mono or as a block and block mono. 
    Created around may 2021:

    To access the extended modes press "K" on the title screen. The keys in the option screen are all clearly shown.
    V=version - either bug byte or software Projects graphics and logic
    Z or X = change selected cavern
    L = play this cavern automatically
    H = play this cavern by scripted human play (still automatic)
    Enter = play as normal
    J = change the extended modes




    In the mono screens the colours can be changed by pressing 1 to change the background (paper), and pressing 2 to change the foreground(ink). The code will stop the ink and paper being the same.

    All the normal game keys


     

  7. The JSW title screen has a lot of code creating the variances on the JSW logo. The colours (inks and papers) are mixed up by a randomising routine. Which just for the back ground penrose triangle can give 210 differing  colour combinations. On top of those colour changes the text has differing effects and colour changes. So the colour combinations for the title screen should run into the thousands. 

    all the blues.png

    jsw main1.png

    jsw main2.png

    JSW MIAN3.PNG

    JSW MAIN 3.PNG

    ss.png

    ss1.png

    ss2.png

    ss3.png

    ss4.png

  8. Manic Jet Set Willy V3


    The last version I do of the combined Jet set Willy and Manic Miner. Time wise I only spent a few weeks on the main code. Overall I just kept on changing the file and adding bits and pieces to the game. No overall attempt at changing the original game play. 

    This file runs on a standard 48k spectrum and could have been released at the same time as the originals were released.

    997590336_loadedtitlescreen.png.c16e23cce7fbdfcea7d7683ce266b684.png

     

    Keys on title screen -
    <1>                                  =change playing mode ,
    <enter>                           = start game

    game keys -
    <enter>                          =  toggle music on/off,
    <H>                                =  faster game play, shorter music notes
    <J>                                 =  slower game play, longer music notes
    <ASDFG>                       =  pause, - display the high score
    <QETUO>                       =  Move left,
    <WRYIP>                        =  move right,
    <ZXCVBNM>+<space> =  jump.

    objective collect the flashing keys, and accumulate monies

    Difference from normal JSW and MM - A heavy fall or touching sprites or baddies will cost monies from Willies ready cash.

    The solar beam will cost a lot of monies on contact with Willy.
    Dropping Kong gains a lot of monies.

    But do keep an eye on your ready cash - when it has all gone - it is game over. 

     

    This game is the compaction of Jet Set Willy and Manic Miner both originally 48k games. The compaction of the games allows for both to run (modified) in 48k.
     

     

     

     

     

     


     

  9. When I finished version 1 of Manic Jet Set Willy. I was already aware of a problem - which was subsequently mentioned by others.

    The problem was caused by the editor having a column mode. Which I use occasionally to copy data and very rarely to delete data. The problem with using the column mode is the editor allows hard tabs and spaces to exist in the same text. The column mode struggles to understand where the visual columns are and as a result can do strange things. What it highlights and what it does are two differing things.

    At some stage during the last release of MJSW (Manic Jet Set Willy) I deleted a great quantity of old code and at the same time deleted a good deal of the comments that, due to editing, meant nothing for the code displayed.

    So I casually deleted a great deal of obsolete comments by using the column select and delete method. What I had not noticed was the delete has a bug in it. Which is different to the mess it normally creates. When a column is selected the program deletes all the data and can delete an extra byte on the last line. So it will correctly delete a column of 40 comments, but for the last comment deletes one byte extra. 

    This was not noticed by me, and as I was at that time unaware of the problem (It was unusual usage from me) and it went undetected.

    What this did was it deleted a bit from a binary value. So:- (as an example)

    h_common:
        ld    a,d                       ; transfer        
        cp    e                         ;  limit  
        jr    nz,h_move           ; 
    h_reset:
        ld    a,(ix+#00)         ; data
        and    %000$11111  ; mask
          
    is edited by the block delete to    
        
    h_common:
        ld    a,d            
        cp    e            
        jr    nz,h_move
    h_reset:
        ld    a,(ix+#00)    
        and    %000$1111    
        
    which does not look a great deal different amongst 15,000 other lines of data and code.

    It does however create a bug.

    Since I had already stated I was not updating the code for a year. It also meant I was not updating the code I had written with a fix. 

    --------------------------------

    A few days after the release I decided to undertake a revamp on the method of compression. (not explained here)

    The revamp on the compression method allowed more free memory to be released. 

    The chance to change the method of play and integrate the two parts was my next challenge. So a new version was undertaken at the end of December 2021 and completed before the end of the month in 2021. Since I was not releasing an update of V1    I decided that V2 would not be released until 12 months after V1. 


    Since it is now December 2022, the file I wrote is included here. 

    This file should have a loading picture. I have not attached the loading picture to the game update. I include here only a .PNG image of the loading picture taken from a zx spectrum screen. 

    -------------------------------

    Mid 2022 I was casually playing with data and sprites - and wondered if I could implement a new method of drawing the sprites which would also store the data differently. Over a couple of days I implemented the new method in JSW and in MJSW. It proved the concept worked and it also released more free memory. I have spent the last 6 months with the help of Spider changing V2 and adding a lot more data and graphics. The new version is known as V3.  V3 is probably more in keeping with what I had originally planned on doing. V3 will be released Next year (probably Jan 1st 2023)  
     

    Note - game wise V3 is only modified slightly from v2 - 4 more rooms and slight edits in some rooms- This was not meant to change the game play. The scope of the changes was adding graphics and making the transistions between screens more flowing. These versions contain both Manic Miner and Jet Set Willy. V3 contains more graphics than either of the original game versions. So the Manic Miner part of MJSW has all the necessary graphics of the original version. In a similar way the JSW part of MJSW has more graphics than the original JSW. In fact the JSW title screen has far more variaties than the same JSW title screen, and yet both the games of JSW and MM  and comapcted to fit into the 48k of the original games.

     

    ------------------------------

    Due to circumstances - this is my next to last game file post and the posting of V3 will be my last.

    ADDENDUM - I have found the original .scr spectrum screen for the .png picture. So I will add on here the .scr picture - should be attached to the start of the file and displayed as the primary loading screen.
     

    PICCY 1.PNG

    MJSw_v2.tap

    MSJS_PIC.scr

  10. Contended memory stretches timing cycles. It has a big impact.

    Note this code is designed to waste time - it rotates a block of memory and then copies the block of memory to the screen. Most of the work is done by the rotate part, but be aware that if it is displayed on the screen then a large chunk of the routine that is  moving data into contended memory is being hampered by the contended memory problem.

    The routine starts by changing the border colour (at the top of the video screen) and when finished changes the border again (bottom of the screen). On my pc the border colour change is aligned with the  bottom of the screen for both parts.

    The routine running in contended memory,  loops and rotates 625 bytes.   (border BLUE - ends when the border turns RED)

    The 2nd routine running in uncontended memory, loops and rotates 625+88=713 bytes E.G it loops 713 times (Border MAGENTA, ends on GREEN)

    The timing of both routines is near enough exactly the same. Yet one has managed 625 loops and the other 713 loops.

    The difference is very measuarable.

     


        org    #7fA0


    amount        equ    625
    high_amount    equ    625+88

    low_s        equ    #7000
    high_s        equ    #9000


    start:
        LD    HL,#4000
        LD    (HL),0
        LD    DE,#4001
        LD    BC,192*32
        ldir
        ld    bc,24*32-1
        ld    (hl),7
        LDIR
        ld    sp,#ffff
    part1
        ld    hl,low_s
        ld    bc,amount
        ld    a,1
        call    init
    loopy    push    bc
        halt
        ld    a,1               
        out    (254),a   ;<<<< set the border BLUE
        ld    bc,amount
        ld    hl,low_s
        push    hl
        push    bc
    loop    rlc    (hl)
        inc    hl
        dec    bc
        ld    a,b
        or    c
        jr    nz,loop
        pop    bc
        ld    de,#4000
        pop    hl
        ldir
        ld    a,2
        out    (254),a   ; Set the border RED
        pop    bc
        djnz    loopy
        jp    part2


    init    ld    e,l
        ld    d,h
        inc    de
        ld    (hl),a
        ldir
        ret

        org    #8000
    part2:
        ld    hl,high_s
        ld    bc,high_amount
        ld    a,254
        call    init
    high_loopy:
        push    bc
        halt
        ld    a,3
        out    (254),a    ; set the border MAGENTA
        ld    bc,high_amount
        ld    hl,high_s
        push    hl
        push    bc
    high_loop:
        rlc    (hl)
        inc    hl
        dec    bc
        ld    a,b
        or    c
        jr    nz,high_loop
        pop    bc
        ld    de,#4000
        pop    hl
        ldir
        ld    a,4
        out    (254),a    ; set the border GREEN
        pop    bc
        djnz    high_loopy
        jp    part1

        end    start

    Contended memory the upper border is BLUE, when the routine finishes it turns RED

    Uncontended memory the upper border is MAGENTA when the routine finishes the border turns GREEN

     

     

    The 2nd file - sets the loop counter to be the same  (in contended and uncontended) (e.g. it loops 625 times in contended and loops 625 times in uncontended) , the amount of time saved is shown by the movement of the border change.  



     

    CONTEN~1.tap

    Contend_same amount.tap

×
×
  • Create New...

Important Information

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