Jetpac to Microdrive

General software. From trouble with the Banyan Tree to OCP Art Studio, post any general software chat here. Could include game challenges...
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Jetpac to Microdrive

Post by Redgatemodels »

Hi, I guess this is a rookie question, but I am trying to get Jetpac onto microdrive and have failed.

Tried Trans Express but an invalid file error when running, so I merged the basic loader from tape and edited the load line to include the microdrive version of the command and now get an out of memory error at the point of the load command.

I guess the clear 32765 is the problem at the beginning of the loader code?

Can it be done?

Is this why there is a Tranz Am mdr out there but not a jetpac one?
dfzx
Manic Miner
Posts: 684
Joined: Mon Nov 13, 2017 6:55 pm
Location: New Forest, UK
Contact:

Re: Jetpac to Microdrive

Post by dfzx »

Redgatemodels wrote: Sun Apr 21, 2024 10:16 am Hi, I guess this is a rookie question, but I am trying to get Jetpac onto microdrive and have failed.

Can it be done?
There's a remarkably in depth discussion of this exact question from about a year ago here.
Derek Fountain, author of the ZX Spectrum C Programmer's Getting Started Guide and various open source games, hardware and other projects, including an IF1 and ZX Microdrive emulator.
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

I understand about 25% of that 🤣

Looks like I need lessons....

To complicate things I am using a VDriveZX rather than a traditional microdrive
User avatar
goodboy
Microbot
Posts: 143
Joined: Tue Jul 23, 2019 8:22 am
Location: Russia

Re: Jetpac to Microdrive

Post by goodboy »

in short ...
code block during loading is superimposed on the memory area that is needed for microdrive operation.
in addition, the game has several checks that must be excluded for correct work on a new device.
User avatar
TomD
Manic Miner
Posts: 381
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: Jetpac to Microdrive

Post by TomD »

Redgatemodels wrote: Sun Apr 21, 2024 12:19 pm I understand about 25% of that 🤣

Looks like I need lessons....

To complicate things I am using a VDriveZX rather than a traditional microdrive
If you are using a vDriveZX then you can use my Z80onMDR utility to create a microdrive cartridge with JetPac on which will do the conversion for you and remove the memory issue (https://www.tomdalby.com/other/z80onmdr.html). You can either create a Z80 snapshot yourself from a TAP/TZX (skoolkit or any emulator) or there are numerous sources on t'internet to grab a pre-built one.

Any issues send me a pm.

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
User avatar
TomD
Manic Miner
Posts: 381
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: Jetpac to Microdrive

Post by TomD »

Also although not the same game this is how TranzAm from Ultimate was transferred to Cartridge back in the day. Assume a similar approach could be taken for JetPac.

Image
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

TomD wrote: Sun Apr 21, 2024 2:11 pm If you are using a vDriveZX then you can use my Z80onMDR utility to create a microdrive cartridge with JetPac on which will do the conversion for you and remove the memory issue (https://www.tomdalby.com/other/z80onmdr.html). You can either create a Z80 snapshot yourself from a TAP/TZX (skoolkit or any emulator) or there are numerous sources on t'internet to grab a pre-built one.

Any issues send me a pm.

TomD
I've found a sna on github. Will see about getting Z80onMDR installed on my ancient laptop......
jimmy
Drutt
Posts: 36
Joined: Sun Nov 24, 2019 9:06 pm

Re: Jetpac to Microdrive

Post by jimmy »

If you've only got a Spectrum, a microdrive and the Jetpac tape then the following steps should get you a working cartridge. The method used does require a 48K Spectrum. 128K users will need to use 48 Mode
  1. Insert blank microdrive into drive 1
    Clear Spectrum memory with RANDOMIZE USR 0
  2. Type in LOAD "" and play Jetpac tape
    When you see "JETPAC IS LOADING" press BREAK
  3. First we'll save the game loading screen. Type in (all on one line) and stop the tape once the screen$ has loaded:

    Code: Select all

    LOAD "" SCREEN$ : SAVE*"m";1;"0" SCREEN$
  4. Now we'll load in the game code (at a different address)

    Code: Select all

    CLEAR 32767
    LOAD ""CODE 32768
    /Stop the tape/
    SAVE*"m";1;"1" CODE 32768,8192
  5. Next we'll change the relocation code

    Code: Select all

    LOAD ""CODE 49152
    /Stop the tape/
    POKE 49154,128
    SAVE*"m";1;"2" CODE 49152,15
  6. The tape is no longer required. Clear the Spectrum's memory with the NEW command
  7. Type in a new BASIC loader:

    Code: Select all

    10 BORDER 0:CLEAR 32767
    20 FOR i=0 TO 2:LOAD *"m";1;STR$ i CODE: NEXT i
    30 POKE 23728,233: POKE 23673,131: RANDOMIZE USR 49152
    
    and save it with:

    Code: Select all

    SAVE*"m";1;"run" LINE 10
    You might also want to save a 2nd copy which doesn't autorun in case of typos, eg: SAVE*"m";1;"jetpac"
  8. Finally test with:

    Code: Select all

    NEW
    RUN
    
The 3 files are called "0","1" and "2" so they can all be loaded with a short FOR/NEXT loop. Calling a file "run" allows you to autoboot by resetting the Spectrum and typing in "RUN". The POKEs simulate what the extra blocks of code on the tape do. Any game that sets RAMTOP to 24576 or lower generally won't work on a Microdrive without a relocation routine.
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

Now you are talking, many thanks, I'll give it a go soon 😁
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

I assume the initial LOAD at stage 2 is to be initialise something ?
outey
Drutt
Posts: 29
Joined: Mon Oct 18, 2021 7:36 pm

Re: Jetpac to Microdrive

Post by outey »

@Redgatemodels you may be interested in Microdrive Exchange magazine, that back in the day G.A.Bobker (of 007 Spy fame) used to sell.

Over the 24 issues, they cover the process involved with transferring popular games (back then in the mid 80s) to MD, including JetPac in issue 2 & 3, there are often re-releases of processes in later issues. Plus other newsworthy articles and amusing comments about competitors.

I find them a fascinating read hope you do too and you can learn a great deal about the original processes involved, nowadays its much easier as you have excellent tools around, but I still like to play around with the original methods and copying protected titles with the likes of 007 Spy, Lerm and Kobrahsoft utilities with the aim of transferring them to microdrive.

Here's the link to MDX (as Geoff calls it) right here on SC https://spectrumcomputing.co.uk/magazin ... e_Exchange
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

jimmy wrote: Sun Apr 21, 2024 9:43 pm If you've only got a Spectrum, a microdrive and the Jetpac tape then the following steps should get you a working cartridge. The method used does require a 48K Spectrum. 128K users will need to use 48 Mode
  1. Insert blank microdrive into drive 1
    Clear Spectrum memory with RANDOMIZE USR 0
  2. Type in LOAD "" and play Jetpac tape
    When you see "JETPAC IS LOADING" press BREAK
  3. First we'll save the game loading screen. Type in (all on one line) and stop the tape once the screen$ has loaded:

    Code: Select all

    LOAD "" SCREEN$ : SAVE*"m";1;"0" SCREEN$
  4. Now we'll load in the game code (at a different address)

    Code: Select all

    CLEAR 32767
    LOAD ""CODE 32768
    /Stop the tape/
    SAVE*"m";1;"1" CODE 32768,8192
  5. Next we'll change the relocation code

    Code: Select all

    LOAD ""CODE 49152
    /Stop the tape/
    POKE 49154,128
    SAVE*"m";1;"2" CODE 49152,15
  6. The tape is no longer required. Clear the Spectrum's memory with the NEW command
  7. Type in a new BASIC loader:

    Code: Select all

    10 BORDER 0:CLEAR 32767
    20 FOR i=0 TO 2:LOAD *"m";1;STR$ i CODE: NEXT i
    30 POKE 23728,233: POKE 23673,131: RANDOMIZE USR 49152
    
    and save it with:

    Code: Select all

    SAVE*"m";1;"run" LINE 10
    You might also want to save a 2nd copy which doesn't autorun in case of typos, eg: SAVE*"m";1;"jetpac"
  8. Finally test with:

    Code: Select all

    NEW
    RUN
    
The 3 files are called "0","1" and "2" so they can all be loaded with a short FOR/NEXT loop. Calling a file "run" allows you to autoboot by resetting the Spectrum and typing in "RUN". The POKEs simulate what the extra blocks of code on the tape do. Any game that sets RAMTOP to 24576 or lower generally won't work on a Microdrive without a relocation routine.
With one small change I got it working. As I was using a tzx and tape player I found that doing the initial load and break at the Jetpac is Loading caused the screen$ save to the hang. Skipped that load and all was well. I also modified the new loader to use peek 23766 so it would load from any drive number and also added the Out 32765,48 as I'm using a Harlequin 128K. Oh and I changed the save names to start at 1 so that I could save jetpac onto the same drive as a downloaded Tranz-AM. Both on the same image.
Wonder if I can squeeze more Ultimate games on........
worcestersource
Manic Miner
Posts: 535
Joined: Thu Feb 03, 2022 11:05 pm

Re: Jetpac to Microdrive

Post by worcestersource »

Going a bit off topic but how fast is a microdrive? Do you get raster lines during the process?
User avatar
TomD
Manic Miner
Posts: 381
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: Jetpac to Microdrive

Post by TomD »

worcestersource wrote: Wed Apr 24, 2024 10:24 pm Going a bit off topic but how fast is a microdrive? Do you get raster lines during the process?
Very fast, well for an 8bit computer anyway. The quoted speed is 15kB/s so if the sectors are defragmented/optimised (i.e. in sequence) you can easily load a 48k game in 3-4 seconds, 128k longer obviously depending on how many memory banks are used but often sub 10seconds. If the files are fragmented the cartridge tape may need to loop a few times so it could take 20-30seconds for a 48k game, either way a lot faster than tape.

No raster bars/lines during loading, just the whirring of the drive motor (or simulated buzz if you are using a hardware emulator)

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
User avatar
jpnz
Manic Miner
Posts: 328
Joined: Tue Nov 14, 2017 4:07 pm
Location: Hamilt[r]on - City Of The Future - NZ

Re: Jetpac to Microdrive

Post by jpnz »

The IF1 system variable IOBORD 23750 0x5CC6 (Border colour during I/O) gives an indication when input or output is occurring

Works well for both serial and network I/O but, curiously, only works for microdrive output - not input

For the fun of it, the variable can be manipulated to be "audible" by adding 16 to the border colour e.g. for cyan use 21 (5+16)

Maybe handy for vDrives and Oqtadrives

Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

Redgatemodels wrote: Wed Apr 24, 2024 9:23 pm With one small change I got it working. As I was using a tzx and tape player I found that doing the initial load and break at the Jetpac is Loading caused the screen$ save to the hang. Skipped that load and all was well. I also modified the new loader to use peek 23766 so it would load from any drive number and also added the Out 32765,48 as I'm using a Harlequin 128K. Oh and I changed the save names to start at 1 so that I could save jetpac onto the same drive as a downloaded Tranz-AM. Both on the same image.
Wonder if I can squeeze more Ultimate games on........
Would the same approach work for for other Ultimate 16K games like Cookie? I remember playing that as a kid too.

I'm assuming Lunar Jetman would be different being 48K.....
User avatar
luny
Manic Miner
Posts: 222
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Re: Jetpac to Microdrive

Post by luny »

One trick for the 48k games, if they are too low in the RAM, is to load the first few k onto the screen at the end, then copy it to its correct place. You could even include the copy routine in that block. It does mean the picture gets mucked up at the end of the load, but it works well if everything else fails.
I code to live (Job) and I live to code (Retro). One of them has to give!
outey
Drutt
Posts: 29
Joined: Mon Oct 18, 2021 7:36 pm

Re: Jetpac to Microdrive

Post by outey »

The Prince (aka Transformer) offers Cookie and Lunar Jetman transfer routines if you want to make it easy :D

https://spectrumcomputing.co.uk/entry/1 ... The_Prince

The full list is :-

Knight Lore
Underwurlde
Sabre Wulf
Lunar Jetman
Atic Atac
Cookie
Tranz Am
PSSST
JetPac
Decathlon
Cyclone
Ghost Busters
Beach Head
3d StarStrike
Combat Lynx
Chequered Flag
Pyjamarama
Trashman
Any Imagine Game
Codename Mat
Twin Kingdom Valley
Lords Of Midnight
Pole Position
Monty Mole
The Hulk
Scrabble
Any Basic Prog
Project Future
Alien 8
Jumping Jack
jimmy
Drutt
Posts: 36
Joined: Sun Nov 24, 2019 9:06 pm

Re: Jetpac to Microdrive

Post by jimmy »

Redgatemodels wrote: Wed Apr 24, 2024 9:23 pm With one small change I got it working. As I was using a tzx and tape player I found that doing the initial load and break at the Jetpac is Loading caused the screen$ save to the hang.
Ahh - you've discovered what happens when RAMTOP is too low and the Interface 1 code runs out of space = non stop microdrive whirring and no response to any key....
I should've said after BREAKing into the program to reset RAMTOP with CLEAR 49151.
Have you worked out if your Interface 1 has the OLD or NEW ROM?
Skipped that load and all was well. I also modified the new loader to use peek 23766 so it would load from any drive number and also added the Out 32765,48 as I'm using a Harlequin 128K.
Nice to make it compatible with multiple drives. It's a shame you can't do LOAD *"M";PEEK 23766;"file"
The alternative way to making Ultimate games fully 128 compatible is to NOP out every OUT ($FD),A instruction
Oh and I changed the save names to start at 1 so that I could save jetpac onto the same drive as a downloaded Tranz-AM. Both on the same image.
Wonder if I can squeeze more Ultimate games on........
Yes you can! All 4 16K games should easily fit on one cart. You could modify the BASIC loader so all Jetpac files would be j1,j2,j3 and Cookie files would be c1,c2,c3 etc... You could even squeeze in Lunar Jetman (32K game really) in there as well.
Would the same approach work for for other Ultimate 16K games like Cookie? I remember playing that as a kid too.
Very similar - the POKEs will be different - IIRC they used different values for FRAMES. The relocator and RAMTOP might also be different.
I'm assuming Lunar Jetman would be different being 48K.....
Lunar Jetman does set RAMTOP too low, but the game code is CODE 32767,31745. So in your BASIC just use CLEAR 30000 and load as normal. When you call USR 23424 the game decrypts itself and then resets the SP register to a different location anyway ($5E00).
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

jimmy wrote: Thu Apr 25, 2024 9:09 pm
Nice to make it compatible with multiple drives. It's a shame you can't do LOAD *"M";PEEK 23766;"file"
It's a real shame more thought was not put into developing the if1 rom. It had been me, as the system variable is available I'd have made LOAD *"M" ;0;"file" load from the current drive. I guess 20 20 hindsight is a wonderful thing ;)
jimmy
Drutt
Posts: 36
Joined: Sun Nov 24, 2019 9:06 pm

Re: Jetpac to Microdrive

Post by jimmy »

Redgatemodels wrote: Thu Apr 25, 2024 9:42 pm It's a real shame more thought was not put into developing the if1 rom. It had been me, as the system variable is available I'd have made LOAD *"M" ;0;"file" load from the current drive. I guess 20 20 hindsight is a wonderful thing ;)
So true! The lack of hook codes to just LOAD/SAVE a file still annoys me to this day. I do like the drive 0 idea. One of these days I want to try rewriting the IF1 ROM, now the source code is available (TImex archive)

Have you tried using Beta Basic v3? - it makes microdrive usage so much better. You can:
  • Default LOAD to a specific device, eg: "m";2, so now you just LOAD"jetpac" to load from microdrive.
  • Open/copy non-PRINT files with MOVE
  • MERGE auto-run programs (so useful!)
  • Built-in EOF function - only works on PRINT files though
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

jimmy wrote: Sat Apr 27, 2024 8:51 am So true! The lack of hook codes to just LOAD/SAVE a file still annoys me to this day. I do like the drive 0 idea. One of these days I want to try rewriting the IF1 ROM, now the source code is available (TImex archive)

Have you tried using Beta Basic v3? - it makes microdrive usage so much better. You can:
  • Default LOAD to a specific device, eg: "m";2, so now you just LOAD"jetpac" to load from microdrive.
  • Open/copy non-PRINT files with MOVE
  • MERGE auto-run programs (so useful!)
  • Built-in EOF function - only works on PRINT files though
Sounds interesting, is this a revised main pcb ROM or IF1?
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

Adding in a few extra commands would be good too, the *MOVE and *CAT from the intro cartridge plus a RENAME option is a good start.
User avatar
jpnz
Manic Miner
Posts: 328
Joined: Tue Nov 14, 2017 4:07 pm
Location: Hamilt[r]on - City Of The Future - NZ

Re: Jetpac to Microdrive

Post by jpnz »

Redgatemodels wrote: Mon Apr 29, 2024 10:05 am Adding in a few extra commands would be good too, the *MOVE and *CAT from the intro cartridge plus a RENAME option is a good start.
Have a look at Ian Collier's modified Interface 1 ROM - works well under emulation with Spectaculator
Redgatemodels
Drutt
Posts: 22
Joined: Wed Sep 06, 2023 6:36 pm

Re: Jetpac to Microdrive

Post by Redgatemodels »

jpnz wrote: Tue Apr 30, 2024 1:11 am Have a look at Ian Collier's modified Interface 1 ROM - works well under emulation with Spectaculator
Interesting, would an eeprom fit in the pcb without modification, if so what eeprom to do use?
Post Reply