Path: vanilla!asbach!noris.net!blackbush.xlink.net!tank.news.pipex.net!pipex!btnet!zippy.dct.ac.uk!zippy.dct.ac.uk!nntp Newsgroups: comp.sys.sinclair Subject: Super Loader Trap Specification Message-ID: <3160EA95.41C67EA6@paisley.ac.uk> From: James McKay Date: Tue, 02 Apr 1996 09:51:33 +0100 Nntp-Posting-Host: diana7.paisley.ac.uk X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3 sun4c) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------167EB0E72781E494446B9B3D" Lines: 268 This is a multi-part message in MIME format. --------------167EB0E72781E494446B9B3D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Here is the proposed SLT spec (I hope netscape doesn't decide to automatically UUencode it), please think about this idea (but note that I can only reply to e-mail messages): -- James McKay, com40014@paisley.ac.uk --------------167EB0E72781E494446B9B3D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="slt_spec.txt" SLT Specification (01/04/96) SLT - Super Level Trap. For years the only way of dealing with multiloads were the following: 1. Multiple snaps : Rubbish! 2. TAP files : Require programming knowledge, can be broken (with space) also it might not work in 48/128 mode and you have to LOAD "". 3. DAT files : Require less programming knowledge but are all separate files. 4. Header/Bytes : Amiga only. 5. VOC/WAV : Use up a large amount of space and are slow to load. 6. ZXS/etc : Generally not a widely accepted standard. Imagine: A normal Z80, followed by an index containing file lengths and offsets within the Z80 pointing to the DATs which are enclosed in the Z80 file! Consider a 600K Z80 containing all of Lemmings with no way to break the loading or have 60+ files in a directory! Look: --------- ---Z80--- Normal Z80 --------- *SLT ID String (42,83,76,84) (0x2A,0x53,0x4C,0x54) DAT_OFF (4 bytes) \ * 256 (If 0 then no file) (All LSB first) DAT_LEN (2 bytes) / * 256 (Order: Off[0],Len[0],Off[1],Len[1]...) --------- ---DAT--- DAT File --------- --------- ---DAT--- DAT File --------- etc. A Short Description Of The Old Level Loader Trap ------------------------------------------------ Basically, you replace the CALL that would start the loader with the bytes ED FB, you set the code up so that HL holds the start address and A holds the level number (0-255), the filename that it loads is based on the name of the .Z80/SNA filename that was last loaded (eg PANG), if the A reg held 1 then the file to be loaded would be PANG1.DAT, if 255 then PANG255.DAT, the length loaded is determined by the length of the DAT, and HL is incremented by that value and DE decremented by that value on exit. The DAT file itself is a headerless chunk of data, with no checksums or other info. A bone of contention is the way filenames are generated in DOS. If the name of the .Z80 was SPECTRUM then Z80 would want SPECT255.DAT, whereas Unix/Amiga/etc would want SPECTRUM255.DAT I feel that this issue must be cleared up. However the SLT format would be machine independent once 'compiled'. From this point on the old Level Loader Trap will be referred to as LLT, and the emulator Z80 by Gerton Lunter will be called Z80E. Construction Of A SLT File -------------------------- Let us consider the SLT format as being like a 'copy /b' TAP file. When the hacker is making the TAP, they are all separate files, until that person is sure that it is working, at which point they combine it all into one file and release it. The SLT format would be like this. The hacker would convert the game into DAT files as usual, and the game would work and be testable in the LLT format. But when they had finished and were sure it worked they would combine it just like a TAP file, except this time they would need a utility - LLT2SLT to do the combining. Also there would be SLT2LLT to undo the files for any reason you wish. Compatibility ------------- The idea of the SLT is that it will have partial compatibilty (I hope) with current emulators by being stuck on the end of a Z80, if you try to load it on a current emulator it will just load as a normal Z80, meaning they get some use out of it. And with the SLT2LLT utility they can convert it into a usable format. The ID String *SLT is to prevent the emulator from thinking a corrupt Z80 was a SLT file. The ED FB opcode would remain as the 'trap'. One snag would be that when you are in Z80E or whatever, you might decide to overwrite the Z80, this would be a bad move as you would lose all the levels! To keep the levels would require a huge effort, probably not worth doing, one solution would be: When you load your SLT a message telling you that you have loaded a SLT and it contains all the levels and should not be overwritten, this would require a keypress to continue. OR: No message at all, this is a low risk, if the person doesn't know then tough. After all, the risk applies to overwriting any other type of file and the message would get in the way of the raw excitement of: FKEY - SELECT - GAME! Which is what we are trying to achieve after all. Please comment on what you think would be better. Pseudo Code : Load Z80 ---------------------- Imagine this is your usual Z80 loader, and insert this before you close the file: if(!eof) { read(4 bytes); if(4 bytes == "*SLT") { /* It is a SLT file */ for(x=0 to 255) { read(DAT_OFF[x]); read(DAT_LEN[x]); } SLT=1; } else { /* Corrupt File */ SLT=0; } } else { /* Normal Z80, no SLT */ SLT=0; } close Z80 file; This code takes in all the data you need to get the DATs from the SLT. Pseudo Code : Open_DAT ---------------------- This is the routine that gets called from an ED FB. void Open_DAT() { word length; if(SLT) { open_z80(); /* NOT load the Z80, just open! */ if(DAT_OFF[a_reg]) { seek(DAT_OFF[a_reg]); length=DAT_LEN[a_reg]; while(length) { read(&value,1,1,handle); spokeb(hl_reg,value); hl_reg++; de_reg--; length--; } close_z80(); } else { /* Fatal : Action undecided. */ } } else { /* Your usual DAT/LLT handling routine. */ } } Pseudo Code : LLT2SLT --------------------- Assume command line parameter passing, the first is the name of the Z80, the DAT filename will be constructed from this. The second parameter will be the output SLT to be created, the extension will be .Z80. For safety the first and second parameters MUST be different. eg LLT2SLT pang.z80 pangslt.z80 You can rename it afterwards. if(Param1!=Param2) { buffer=malloc(65535); open_both_files(); read_z80_bytes_to_second_file(); write_ID_string(); use_ftell_to_find_offset(); for(x=0 to 255) { get_the_lengths_of_all_the_DATs(); dont_forget_to_put_them_in_an_array(); recalc_offset(); } write_the_lot_as_index(); /* 1.5K */ for(x=0 to 255) { if(DAT_OFF[x]) { append_DAT_file_to_new_file(); } } close_all_files(); } else { printf("First and second parameter must be different!\n"); } Possibly a third parameter -DOS that reads in DOS constrained filenames regardless of whether it is on DOS or not. Pseudo Code : SLT2LLT --------------------- Oh please! I'm getting tired! Consider it just like LLT2SLT but with obvious differences. Finally ------- This is the proposed format. It is flexible and awaits your comments, which will mould this into the finished article. Consensus will be required if this is to become an accepted standard. Although I do hope that this is resolved quickly, VERY quickly. At best it will appear in all new versions of emulators. At worst it will appear in x128 V0.4 and that's it. Please feel free to point out any horrendous errors! Also, this will need to be backed up by a selection of nice games, who's going to do these??? I don't know how many DAT format games are on ftp sites, but they can all be converted easily under this specification. This specification drawn up by James McKay, based on a suggestion (frequently repeated) by Damien Burke. --------------167EB0E72781E494446B9B3D-- ---- Newsgroups: comp.sys.sinclair Path: vanilla!asbach!noris.net!blackbush.xlink.net!tank.news.pipex.net!pipex!warwick!spuddy!spuddy.mew.co.uk!arcsalt From: arcsalt@spuddy.mew.co.uk (Darren Salt) Subject: Re: Super Loader Trap Specification Message-ID: <46B9550DB4.DC90@spuddy.mew.co.uk> Sender: arcsalt@spuddy.mew.co.uk (Darren Salt) X-Posting-Agent: RISC OS Newsbase 0.55-pre-15a Reply-To: arcsalt@spuddy.mew.co.uk Organization: Spud's Public Usenet Domain X-Newsreader: Archimedes TTFN Version 0.36 References: <3160EA95.41C67EA6@paisley.ac.uk> Date: Thu, 4 Apr 1996 01:38:17 GMT Lines: 99 In article <3160EA95.41C67EA6@paisley.ac.uk>, James McKay wrote: > SLT Specification (01/04/96) Pity about the date... ;-) > SLT - Super Level Trap. > A normal Z80, followed by an index containing file lengths and offsets > within the Z80 pointing to the DATs which are enclosed in the Z80 file! > Consider a 600K Z80 containing all of Lemmings with no way to break the > loading or have 60+ files in a directory! [snip] DAT_LEN could be made redundant by insisting that the blocks are stored in ascending key order: [key = the value in A register when the level loader trap is called] 0 Normal .Z80 file x .Z80 block ID 42 [0x2A] x+1 "SLT" [0x53, 0x4C, 0x54] x+4 File ptr of block 1 x+8 File ptr of block 2, also end ptr of block 1 ... x+1016 File ptr of block 254, also end ptr of block 253 x+1020 File ptr of block 255, also end ptr of block 254 x+1024 File extent, also end ptr of block 255 x+1028 Block 0 data Note that the file pointer of block 0 is implied, as are the block lengths. For a non-existent block, the file pointers for it and the next block will be identical. > A bone of contention is the way filenames [for the level loader trap] are > generated in DOS. If the name of the .Z80 was SPECTRUM then Z80 would want > SPECT255.DAT, whereas Unix/Amiga/etc would want SPECTRUM255.DAT Z80Em expects these files' names to be just a number. So it would look for "1", "2", "35", "255" etc. > Compatibility > ------------- Shouldn't be a problem. > The ED FB opcode would remain as the 'trap'. Good! > One snag would be ... you might decide to overwrite the Z80 Simple. Lock the file. > and the [warning] message would get in the way of the raw excitement of: > FKEY - SELECT - GAME! Eh? ;-) I'd rather double-click on the file, or drag it to the emulator icon and then click on that. [snip] > Finally > ------- > This is the proposed format. It is flexible and awaits your comments, > which will mould this into the finished article. Consensus will be > required if this is to become an accepted standard. Although I do hope > that this is resolved quickly, VERY quickly. At best it will appear in > all new versions of emulators. At worst it will appear in x128 V0.4 and > that's it. I could apply a little pressure to get it into Z80Em. So could a few other people I can think of... However, this will require a finalised format. > Also, this will need to be backed up by a selection of nice games, who's > going to do these??? I don't know how many DAT format games are on ftp > sites, but they can all be converted easily under this specification. Er... Lemmings, Gauntlet, Gauntlet 2, Impossamole, Monty Python's Flying Circus, Turbo the Tortoise, Indiana Jones and the Last Crusade... Most or all of these should be available (I myself converted Impossamole and Monty Python). (Also mailed, with extra detail which I considered irrelevant for general discussion :-] , to James McKay.) -- +---------------------------------------------------------------------------+ | Darren Salt - arcsalt@spuddy.mew.co.uk - ToonArmy - darren.salt@unn.ac.uk | | Acorn A3010, Spectrum +3, BBC Master - Season ticket - Windoze free zone! | +-01268-515441-for-free-email&Usenet---Asprilla-is-tricker-than-small-print-+ It's hard to be humble when you're perfect. ---- Path: vanilla!asbach!noris.net!blackbush.xlink.net!howland.reston.ans.net!newsfeed.internetmci.com!news.inc.net!arclight.uoregon.edu!dispatch.news.demon.net!demon!mail2news.demon.co.uk!getafix.oasis.icl.co.uk From: l.d.tonks.bra0202@oasis.icl.co.uk Newsgroups: comp.sys.sinclair Subject: Super Level Loader Trap Games now on NVG Date: Thu, 16 May 1996 11:08:38 +0100 Lines: 46 Message-ID: <199605161008.16029.0@getafix.oasis.icl.co.uk> Reply-To: l.d.tonks.bra0202@oasis.icl.co.uk X-NNTP-Posting-Host: getafix.oasis.icl.co.uk X-Mail2News-Path: duct.mail.pipex.net!Q.icl.co.uk!relay1.pipex.net!getafix.oasis.icl.co.uk Thanks to Damien Burke, you can now all grab snapshots of some multiload games which have been specially converted to run with the BRAND NEW Super Level Loader Trap. So new, in fact, that there's only one emulator that supports it at the minute (X128 v0.4). However, I'm reliably informed that Z80 3.04, WspecEM, Z80Em and (probably) xz80 will all support it in their next release. More info on SLT from Damien's home page : http://www.cs.bham.ac.uk/~dmb/speccy/index.html And the snaps are available here : ftp://ftp.nvg.unit.no/pub/sinclair/snaps/games/slt_multiloads and the files are : afterbur.zip - Afterburner agent_x.zip - Agent X gauntlet.zip - Gauntlet gunsmoke.zip - Gunsmoke midnresi.zip - Midnight Resistance myth.zip - Myth opthnder.zip - Operation Thunderbolt outrun.zip - Outrun pang128k.zip - Pang 128 pwrdrift.zip - PowerDrift r-type.zip - R-Type silentsh.zip - Silent Shadow turrican.zip - Turrican waytiger.zip - Way of the Tiger This has been a public service announcement..... Blood. *============[ l.d.tonks@bra0202.wins.icl.co.uk ]=============* | The Infamous BLOOD! | | The Speccy's not dead - it was just resting! | | Who needs 500Mb of rendered intro when Jetpac fits in 16k?! | *===========[ http://spodbox.linux.org.uk/~blood/ ]===========* ---- Path: vanilla!asbach!noris.net!blackbush.xlink.net!tank.news.pipex.net!pipex!news.mathworks.com!newsfeed.internetmci.com!btnet!zippy.dct.ac.uk!zippy.dct.ac.uk!nntp Newsgroups: comp.sys.sinclair Subject: SLT spec & and I lost most recent mail. Message-ID: <317233B1.41C67EA6@paisley.ac.uk> From: James McKay Date: Mon, 15 Apr 1996 12:32:01 +0100 Nntp-Posting-Host: diana12.paisley.ac.uk X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3 sun4c) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 39 Would anyone who mailed me during the Easter holiday week note that all the messages sent to me have been 'optimised' and are gone! If any of it was important then mail it again! On the matter of the SLT spec, I have decided to take the reins and force a final specification: --------- ---Z80--- V2 or above --------- ID_000 0,0,0 (To prevent Z80 from locking the PC). ID_STRING *SLT then.... LEVEL_NUM The level number (byte). COMPR_LEN The compressed length of the following block. (The block, compressed in the same way as Z80 memory blocks). then.... LEVEL_NUM The level number (byte). COMPR_LEN The compressed length of the following block. (The block, compressed in the same way as Z80 memory blocks). etc... You get the idea, all the DATs are appended to the main file. The combined filename has .z80 as the end. LLT2SLT (new name DAT2SLT) now has support for the Z80Em (on the Acorn) naming convention of 0.DAT, 255.DAT etc... (There had better be no preceeding 0's). SLT2LLT (new name SLT2DAT) has the same. The full spec will be posted tomorrow/soon. Last chance for comments. -- James McKay, com40014@paisley.ac.uk