AlchNews and Z88 USER Issue 36, MAY 2001

INSIDE THIS ISSUE:

SPRINTER—21ST CENTURY SPECTRUM THE “LINX PC” : THE Z88’S MISSING BROTHER? SIMON GOODWIN’S SERIAL CONNECTIONS PART 2 +3 SOUND DISTORTION CURE KEN BEER’S BACK TO BASICS 1 INDEX ISSUE 36 3. EDITORIAL.

4. NEWS & VIEWS.

7. GACs THE WAY TO DO IT. An intro. To our new series on GAC.

8. THE LINX PC. Documents relating to a German version of the Z88.

13. TRADING POST. Squeezed in early.

14. HARDWARE: Curing sound distortion. A guide to repairing the faulty sound in certain +3s.

16. SPRINTER. A comprehensive and in-depth look at what is being hailed as the 21st century Spectrum, written by the designer himself.

25. SERIAL CONNECTIONS. The second part of an ingenious RS232 handshaking system by Simon Goodwin and Mark Swift.

28. BACK TO BASICS. Ken Beer looks at graphics.

30. A MINER TRIAD. Richard Hallas takes us through the wonder of the in game music of Manic Miner and Jet Set Willy.

35. HINTS & TIPS. A mini helping from Jack Lawrie.

36. W.N. RICHARDSON ADVERT.

Credits Big thanks to the following contributors: PETERS PLUS LTD. For their SPRINTER info. YERZMEYEY for bringing it to us! (and all the latest news and demos) DENNIS GRONING for letting us know of the LINX PC. MIKE LEE and his article on curing +3 sound problems. SIMON GOODWIN for his serial article and QL and Amiga support. RICHARD HALLAS for his great article on Matt Smith’s music JACK LAWRIE and KEN BEER for their excellent contributions.

2 EDITORIAL It was absolutely fantastic to see, in develop much further than the the flesh, Matthew Smith on the and Scorpion ever did in television quite recently. I don’t the UK. think anyone has become such an elusive talked-about person on this You may have to build it yourself, scale in the computer business. and the parts needed may not be The mystery of his disappearance readily available new, especially as was ranked high up with Lord they use older AT style PC Lucan, Shergar and that guy from accessories but, if the price is cheap the band The Manic Street and the money transfer is secure, Preachers. they should sell well. Price is going to be a very important factor simply When you sit back and look at the because it will never amount to big picture, you can understand why much more than a hobby machine Matt did the disappearing act that he (although I hope I am very wrong). did. He was worshipped as a God by Spectrum owners, all because of We are already in negotiation with a couple of games he wrote. But, the manufacturer to become the back then, his games were official UK (and perhaps European) revolutionary. Despite admitting magazine supporting it. Spectrum himself that Manic Miner was a compatibility is the key to its ‘tribute’ to the earlier Atari classic success and a springboard into Miner 2049’er, this and the follow more powerful development. This up, Jet Set Willy were remarkable. was the ‘make or break’ factor in the Colourful graphics, in game sound, SAM and also the Pentagon, fiendish puzzles and, in JSW, the although I think the difficulty in ability to roam around at will. paying for the Pentagon put many Nobody, past or present, has or off. ever will be as respected as him. His games even spawned dozens of I am sorry for delaying a couple of follow ups, all tributes to his original articles which have been promised, template. but put back once again. This includes the GAC adventure series, Matt was a genius and, now he’s the second part of the QL emulators back, I think he should now take and a look at emulating the Acorn advantage of that - he need never Archimedes. The sheer volume of buy a pint again! Sprinter material took more space than I thought. I’ll try and get them The Sprinter looks like a remarkable in for next issue. We’re also looking piece of kit. Although it is hard to get for new writers. excited about the few pictures we’ve seen so far, it has the potential to Andy Davis, Editor.

3 NEWS & VIEWS HELLO SPRINTER visit: The big news this issue is the launch of the Spectrum super http://z80stealth.emuunlim.com/ computer—SPRINTER. The cover photo shows a stunning example of Z88 BOOK SALE what can be produced by its picture Vic Gerhardi of RAKEWELL has a editing program 2D STUDIO. limited stock of Z88 books for sale. They comprise of: The machine itself resembles more of a scaled down PC than a scaled Using your Z88 - Patrick Hall Z88 Computing - Ian Sinclair - £9.99 up Spectrum, boasting AT style Z88 Magic - Vic Gerhardi - £14.95 connections and peripherals, Z88 A Dabhand Guide - Trinity Concepts - impressive 4Mb RAM, 256k video £14.95 RAM, 16 bit audio and up to 256 BBC BASIC(Z80)Ref Guide - DJ Mountier Z88 Printer Driver - Dave Stewart colours! Read all about this beast, and see lots of pictures, in our plus a full set of Z88 EPROM magazines (I special feature later this issue. have not checked this but there Special thanks to Yerzmyey are a lot of them!)

Bookovski for bringing it to our On offer to users of the Z88 Development attention! Mailing list for

THE LINX PC £60 plus carriage Was originally going to be our cover story and feature this issue until the This offer is strictly first come first news of Sprinter, the Linx PC is a served so don’t be disappointed if long lost missing brother (or some (or all) have gone. German cousin) to the Z88. The feature (in German only) begins on GAMESTAGE TO FEATURE A.R. page eight. Garry Lancaster noted SOFTWARE that despite being an identical clone A new retro games site has of the Z88, it’s some 50g lighter! He approached us to host our large puts it down to ‘heavy ink’ used on collection of software on their site. the Z88’s printed logos! Their aim is to feature both Spectrum and PC programs, which Z80 STEALTH UPDATED ties in very nicely with our article in The fantastic Stealth Spectrum / the next issue about multi format Pentagon emulator has been games (see our first review of Driller updated and now features ‘general in issue 34. Their site is at: sound emulation’. This means that http://gamestage.topcities.com/ Spectrum music will be played more like the Amiga! For more details NEW DEMO PROGRAMMER and to download the latest version, Bookovski tells us that TDM

4 (musician known from K3L group) is There's a downloadable snapshot of in HOOY-PRGORAM now. the game for each city, the site uses Bookovski is honoured, because Jasper so you can play each city on they think that TDM is currently the it's page, there's a big ass old run best zx musician! down of the mission, the buildings, the defences and the map - all NEW MEGADEMO tastefully done in the original black The HOOY-PROGRAM / RAWW and yellow :) ARSE collaboration have just written PONDLIFE - a new mega demo, The only bad side is that not having one of the first of the year. You can the original box I can't quite download it from: remember the storyline exactly so some of what I've written will need http://web.ukonline.co.uk/ correcting once other people read it demotopia/Pondlife.zip and tell me it's wrong.

Issue 3 of Raww Arse’s (Formerly http://www.summerblue.net/ Extacy-3) electronic magazine games/tau-ceti/index.html SUBLIMINAL EXTACY has finally been released. Get it from: D.I.D. TO CHANGE http://papaya.raww.net/taps/ It came as very sad news to us in subxtc3.zip March that Michael Brűhn and Joyce Cook’s magazine DESERT TAU CETI FAN SITE ISLAND DISKS was to finish. This just in from Toby Douglass: However, it is only changing format from paper to CD. The reason is A couple of years ago I wrote a because Michael is very proud of comprehensive set of pages all the colour magazine (and with good about Tau Ceti - a game I absolutely reason), but production is very loved on my Speccy. expensive and he doesn’t want to revert to B&W. I've realised I ought to get it linked to on a few speccy sites so people can The new magazine will still have the actually *know* about the pages. same look and feel, but will simply be ‘electronic’ as a Microsoft Word They're pretty cool, even if I do say format document. The magazine will so myself :) If you're not familiar with also have a special viewer program the game, you had to travel in your for anyone that doesn’t have Word. hovercraft type craft through a large The CD will also be filled with lots of number of cities (first person programs games and other useful perspective, no less!) collecting programs and material for Speccy cooling rods to shut down the main freaks out there who don’t have reactor. internet access.

5 As a special feature for the change, mid way through when MANIC Alchemist Research has kindly MINER and JET SET WILLY were supplied full and original versions of discussed. MS Word & Works for Michael to distribute. Not only did we get to see the games but we actually saw Ian Lee Our only concern is to how this not only TALKING to Matthew would affect readers who don’t use Smith, but sat in a bedroom a PC, but I think that in this day and PLAYING Manic Miner on a rubber age, would be a very small minority. keyed Speccy!

For more details email Michael at Simon Mallion managed to grab a [email protected] or take a look at picture of him in the show (below): the web site:

http://www.image.dk/~frankie/

YOUR LETTERS Due to the high capacity of this issue and a rather quiet period, the letters page will be held over until next issue. Keep writing in with your comments and opinions!

MATT SMITH RETURNS Back in March, Channel Four aired a one hour special on video games called THUMB CANDY. I was going to review it in this issue but other And Stephen Smith’s web-site articles had priority and I suspect WHERE IS MATTHEW SMITH, that Keith Ainsworth which characterises Matt’s life and (RETROGAMER) will probably be works also got featured. The URL doing something himself, so I’ll just is: give a brief review. http://www.jonlan.demon.co.uk/ The show was hosted by Ian Lee (of spectrum/matsmith/ 11’O Clock show fame although I’ll personally remember Rosie The show presented one of the best Donovan’s angelic face for much insights into Matt’s life and the hero longer than him rubbery mug!), and worship held by every Spectrum covered the history of gaming from owner. its very early days of Japanese END arcades and space invaders, to much more recent times. However, the part which stood out by far was

6 GACs THE WAY TO DO IT

GAC. Just the mere mention (the Professional Adventure Writer) of that anachronism brings was released – with special versions for the 128k and +3 allowing for mas- back nostalgic memories of sive 120k adventures – GAC had great ideas of adventures, reached the place where it took so let down by a crappy dis- many adventurers: “You are dead, play and a crappier charac- would you like another game ter set. (creator)?”.

But that’s just me. GAC – or the Fourteen years on and it’s back. Graphic Adventure Creator – was a Thanks to the work of Garry Lancas- sure fire winner for Incentive soft- ter, GAC has a new lease of life. ware. Released way back in 1986 Garry wrote a program for the Z88 (a conversion from a format coded called WHAT NOW?, which has been in 1985 by Sean Ellis) it marked a extensively reviewed in earlier issues big change from the dozens of of AlchNews, Z88 User and Z88 game creator programs, such as Gamer. Since then, however, it’s HURG, WHITE LIGHTNING and been updated; almost every Spectrum LASER BASIC, on the market at the GACed game has been converted – time. Its only rival was Gilsoft’s UDGs, graphics and all – and several THE QUILL. Amstrad CPC versions. With this in mind, there’s never been a better time to easily and quickly write an adven- ture game and have it played by both the Spectrum and Z88 community. All we need now is for Garry to write a GAC conversion so that we can write adventures – 512k ones – on the Z88…….

The time of slating GAC is over. We want to promote the lost art of adven- I personally think that was the supe- ture writing - and playing - with the rior program, but GAC had the added benefit of portability. We’ll added bonus of in-built graphics. shortly be commencing a series, help- Quill had to make do with add-on ing you get the most from GAC, look- THE ILLUSTRATOR. Despite this, ing at past commercial adventures Quill produced far more professional and making the most of a, now free, games than GAC. And when PAW classic utility.

7 8 9 10 11 12 TRADING POST

ADVENTURE WORKSHOP RAKEWELL LTD. Phil Reynolds 24 Putnams Drive, 36 Grasmere Road, OLDHAM. OL2 6SR Aston Clinton, (Adventure software house) AYLESBURY, Bucks. HP22 5HH BILL RICHARDSON AND CO. (EEC) Voice: 01296-630617 6 Ravensmead, CHALFONT ST PETER Fax: 01296-632491 Bucks. SL9 0NB Email: [email protected] Email: [email protected] Web: http://www.rakewell.com/ Web: http://go.to/wnr (Z88, QL and SPECTRUM hardware) RETROGAMER Keith Ainsworth Kevin Gurd’s EPROM Services 52 Kingfield Road, LIVERPOOL. L9 3AW 21 Ladycross Road, Langdown, Hythe (Bi-Monthly A5 all formats retro magazine) SOUTHAMPTON. SO45 3JR (EPROM / hardware designers) SPECTRUM PROFI CLUB / WOMO Im Tannenforst 10, D-51069 KOLN CRASHED - now closed GERMANY Email: [email protected] DESERT ISAND DISKS Web: www.womoteam.de Michael Bruhn (Spectrum & SAM A5 monthly magazine) Petersnorg 23 6200 AABENRAA DENMARK SINCLAIR USER CLUB / SINTECH Email: [email protected] Rainackerstrasse 4, 70794 FILDERSTADT Web: www.image.dk/~frankie GERMANY (CD based Speccy games magazine) Email: [email protected] Web: www.online.de/home/sintech UK ONLY: C/O Joyce Cook (Spectrum, SAM and MB-02 A5 magazine) 32 Dursley Road, Trowbridge. BA14 0NP (As above) TRADE-IN POST Victoria Road, DOMINO CUBES: SHIFNAL. TF11 8AF Mike Fink Web: www.tradeinpost.com 249 West 34th St. 5th floor (Eight bit hardware and software) NEW YORK CITY 10001, 212-695-1811 Email: [email protected] Z88 SOFTWARE LIBRARY Web: www.dominocubes.qpg.com Ian Braby 1 Butts Cottages, Copse Road, St. Johns, HACKERS HANGOUT - now closed WOKING. GU21 1SU (Extensive Z88 software library) QL TODAY The Bank Volt 6 Coronation Buildings, Ham Road Sussex. BN11 2NN YOUR SERVICE NOT LISTED? Get in Email: [email protected] touch and you’ll be added next issue. (Bi-Monthly A4 QL & compats. magazine)

13 HARDWARE

Spectrum AY chip my Spectrum+3 on for a couple of hours, I encountered no problems. distortion problem. Pin 1 of AY chip is Channel A By Mike Lee Pin 4 of AY chip is Channel B Pin 5 of AY chip is Channel C I have cured the AY chip distortion problem with the Spectrum 128k +3 All these pins 1,4 and 5 are linked If you are good with a soldering iron together on the board. then follow below. I use my RBG socket to a This idea is my own finding, I have Commodore 1084s monitor. had good clear results NO distortion. 7 6 3 8 1 I hope all those Speccy fans out 5 4 there can adapt this idea to good 2 use, but BEFORE you decide to continue. Pin 1 = +12V Pin 2 = GND I ACCEPT NO RESPONSABILITY Pin 3 = Audio Out FOR ANY DAMAGE TO YOUR Pin 4 = Composite Sync SPECTRUM +3 WHATSOEVER, I Pin 5 = +12v HAVE USED A GOOD QUALITY Pin 6 = Green SOLDERING IRON, I ALSO HAVE Pin 7 = Red GOOD EXPERIENCE WITH Pin 8 = Blue SOLDERING, SO I HAD NO PROBLEMS. JUST USE COMMON RGB socket looking from out side SENSE WHEN SOLDERING ANY not from inside of mother board COMPUTER PARTS. (Same goes for us - ANZU) IF you have no monitor then use PIN 3 AUDIO of RBG socket and I have tried this using many 128k PIN 2 GROUND of RGB socket to a music programs on my Spectrum seperate amplifier or a headset, I 128k+3, they all work with CLEAR have tried a head set with adaptor sound NO distortion. from the RGB socket to a 3.5 mm Jack plug, this works fine. Putting it in short, you take a wire from pin 1 AY chip or R72 to R43, this gives perfect clear sound. I have tried and tested this leaving

14

Cut and lift this side of resistors on board. Both resistors will NOT used. R43 R42 R43 Brown,Black,Orange R42 Red, Red, Red I I ------Link wire from R72 to Where R42 used to be on I I I board. I I I I I R42 used to go directly to pin 3 Audio RGB I I I I I I I I I I I I I I I I I I I I I I I Then take a wire from PIN 1 of AY chip or R72 I I I ------I I I I I AY I I I CHIP I I I I I I I I I I TAKE WIRE FROM THIS END OF RESISTOR I I I I I I R72 RED RED RED 2.2k I I ------pin 1 goes directly to R72------[------]------0------

I ACCEPT NO RESPOSNABILITY FOR ANY DAMAGE TO YOUR SPECTRUM. I HAVE TRIED AND TESTED THIS AND MANY 128K MUSIC PROGRAMS, THEY ALL WORK WITH CLEAR UNDISTORTED SOUND.

Mike Lee.

15 SPRINTER: 21st CENTURY SPECCY Sprinter it is new universal 8 bit chip, 4Mb 72-pin SIMM, 256Kb of computer with the flex architecture the video RAM, 64Kb of the "fake" and capable to quick change the cache (it`s a fast static RAM, where configuration. Capability of CPU can work without waiting), multimedia allow Sprinter to please disk-drive controller, buffers for ISA- the users 16 bit sound, bright colour 8 and peripheral units connection graphics and fast video. and one more ALTERA`s PLD - Programmatic support of all modes EPM7032LC44. and peripherals now full realised. The base software for creation of This PLD supports synchronization applications and games is ready. and initialisation of the computer. DALLAS chip (CMOS-clock) can be Specifications: fitted in the DIP-slot. Input signals of decoding chips connected to Processor Z84C15 processor through PLD. It allows to Clock frequency 21MHz/3.5MHz change device address easily, RAM 4Mb without main board changing. Cache 64Kb A large set of periphery can be ROM 128Kb connected to Sprinter: joysticks, Video RAM 256Kb(512) tape unit, printer, keyboard, mouse, FDD controller MFM (PC type) hard and floppy disks, CD-ROM HDD controller IDE/AT drive and most of ISA-8 expansion Keyboard 101key/AT cards for PC computer. Mouse MS-Mouse FDD 3.5" 1.44 Mb Advantages of Sprinter Expansion slots 2 x ISA-8 Music co-pro. AY-3-8910 emul. Architecture based on a large re- Digital audio Covox 16bit programmable micro logic (PLD). Video-modes: Here we shall name as a 256x192(ZXSpectrum), configuration of the machine - 320x256x256, 640x256x16, TXT concrete implementation of the 80x32 concrete scheme in the PLD. It Video output RGB (opt. PAL) means, that the machine has set of configurations, each of which has it Technical implementation. own scheme.

The heart of the machine are the The connection of peripheral units processor Z84C15 and PLD through PLD allows to achieve high EP1K30QC208-3. There are a ROM flexibility of the machine on different configurations.

16 concrete addresses valid only for PLD programming is performed at concrete configuration. power on or reboot, that allows to change the scheme in PLD The programmability of the scheme immediately in operating time! It gives rather large freedom of hardly distinguishes architecture of imagination of the programmer on the computer from a number of configurations of the machine. existing computers and Conceiving concrete operation, the consequently many concepts programmer can define in what the intrinsic to that machines, change configurations can be made it better, the sense. Actually computer has and, probably, and to invent the changed architecture, in which the configuration, which then can be changes in many parts of the realized in PLD and to include scheme are possible. So, concrete before start of this program. fixed port addresses is not need to be defined anymore, because port layout can be easily changed. The figure 1. Sprinter block-scheme

17 The concrete configurations and Sprinter-and will not be foreseed it. parts of configurations are further described. Therefore development of new configurations can be made only for Configurations loading . want of availability of rather high- power machine and program of At power on, all data in PLD has distributing of the schemes in PLD. been cleared. Then, PLD is waiting for loading a block of scheme data. In this connection, in the given Only one page of ROM and one moment Sprinter has some concrete page (16 kb) of cache is connected configurations two from which are to processor at that moment. Any noted in ROM, and remaining can processor memory writes results in be load from a diskette or hard disk. data transfering into PLD. And the Perfecting concrete configurations initial start programm has one and development new is fixed target - load initial configuration carried on. (called "Sprinter-2"). The initial programm looks up for a special Configuration Sprinter-1. identifier (text string) in the cache and if it has been detected, when Includes a configuration Spectrum- data will be readed from cache, 128/256, memory allocation up to otherwise from ROM. 4Mb, extended screen with modes Spectrum, Text-80x32, Graf- For scheme changing it is 320x256x256, controller of the drive, necessary to load the data block of controller IDE of the hard disk, configuration in the last page of the controller of the keyboard AT, on- cache (from offset 100h) and place line as ZX keyboard, 8-bit COVOX. the text string ("FLEX_10K_LOADING") at offset This configuration is as much as 80h in the same cache page. After possible approximate ZX-Spectrum that software causes reboot. and allows to work on usual Pressing on the RESET button will Spectrum's programs and gradually ALWAYS switch-on the standart to change them under enhanced configuration. modes of the screen and memory, and as for operation with new Note: The internal information of the devices. block of data PLD is the closed information of the ALTERA corporation. Except for chips PLD Configuration "Sprinter-2". ALTERA delivers and software for distributing of the schemes inside Configuration not compatible with a PLD. Infortunately, this program can configuration ZX-Spectrum. ROM not work on the computer of a type completely is disconnected and all ZX-Spectrum and in the nearest address space is broken on four visible future the version for windows on 16k, in each of which

18 anyone is connected from 256-?? of Configuration "Video" pages of the RAM. There is no spectrum's screen, a graphics Configuration Video is similar on screen same, as in configurations Game, but has padding capability Sprinter-1. It has additional on data transfers with HDD is direct functions accelerator. Allows to in a video memory at the moment of make operations AND, OR and reading from HDD. The mode $GR- XOR with blocks of data. It has 16- 256-4x4$ permiting to inject video bit COVOX. films with the sanction 160x128 on all screen (hardware doubling the Configuration "ZX-Spectrum-256/ size of a pixel). AY". The scheme of a memory This configuration is as much as allocation. possible approximate to ZX- Spectrum-128/256 and includes the Each page ROM or the RAM has scheme musical coprocessor AY-3- the port, in which real number of 8910. In this configuration there are page from 256 of pages all of 4Mb is no enhanced modes of screen. underlined. The AY includes three generators of pages, ???????????? in various voices, generator of a noise, windows of address space of the regulators of amplitude and the processor, have own ports. I.e. generator bending around. Page which is included in addresses #4000..#7FFF, and page number 5 Configuration "Game". usual Spectrum of a memory allocation which is included in The configuration is similar to a addresses #C000..#FFFF have configuration Sprinter-2. The separate ports. accelerator have not logical In total of such ports of pages of functions, and for the output of a memory - 32. sound has COVOX-Blaster - A 16 ports are used for numbers of COVOX with the buffer RAM pages of the RAM, connected to permitting to output a sound block addresses, by block and to release processor #C000..#FFFF. Three ports answer time for other operation. The for connection of pages of the RAM configuration is oriented to use in to addresses #0000..#3FFF, #4000.. games for Sprinter. #7FFF and #8000..#BFFF. An Eight ports are used for connection of Configuration "DOOM" various pages ROM. An one port - for connection of page of the The accelerator has the function of CACHE instead of ROM. And one hardware expansion / compression port is a port system ROM of vertical and horizontal Lines. In connected on a place ROM at once the given moment the configuration after reset of the machine on keys is in development. + + .

19 Stayed 3 ports of pages of standard of a Scorpius, on their memory remain at present in a place it is possible to reserve. The scheme of a memory readdress ?????. For this purpose it allocation allows to connect in is necessary to note in a port by one address space of the processor not from these pages value appropriate only RAM or ROM, but also ports ISA-slot, by which it is necessary to and memory ISA of cards puted make call. This value as specifies, in ????. to what the call, to ports or memory For want of connection in is carried on. addresses #C000..#FFFF of extended pages of the RAM on the pic. 2

20 In other configurations the scheme possibility fast to change a of a memory allocation becomes configuration of ports without simpler for release of resources overload PLD. It is reached by PLD. There can be ports #1FFD and application of a card of allocation of #7FFD, and as the scheme of ports, engaging on special page of operation with becomes simpler by the RAM. devices displayed on memory. For want of appearance of an The scheme of allocation of access cycle to a port call to the ports. RAM of a card of ports at first happens. In a card of ports the Sprinter has two isolated groups of information on devices on-line to the ports. The first group, is internal given address is noted. Internal ports of the processor Z84C15, decoding on byte from a card of second - external ports. The ports and call to a selected port addressing of ports of the first group further happens. In a usual mode, can not be changed, as these ports without what or delays, and in a on one chip with the processor. The mode turbo to processor the signal second group is connected through WAIT is exhibited depending on PLD. The addresses of ports of this necessary length of an access cycle group can vary somehow. to a port.

What ports are available on a chip For connection or disconnecting of a Z84C15, We are possible to read in port to the address it is enough to documentation on this processor open a card of ports and to enter in here again some from them. One the necessary place of one byte. from serial ports is used for data Page of cards of ports is entry from the active mouse. One contained four cards, which can be from parallel is used for data output, switched through a system port. So on the second parallel port the it is possible to realize fast switching signals of interruptions and inquiries of a configuration of ports, that can of direct access with ISA are be useful for want of for operation entered. Spectrum of programs pointly with Sprinter BIOS. The parallel port of the processor Z84C15 is arranged in such a Structure of the screen. manner that on him the organization of interruptions on signals coming All screens is broken on guadrates, through a parallel port is possible. size in standard spectrum a font Actually second parallel port is used resticle. For each guadrate the own as the controller of interruptions. output mode is installed, and as the address of the video-ram, whence is The scheme of allocation of ports of made the output in this guadrate. In the second group has the feature. each font resticle the own output By main idea was obtaining mode can be given.

21 In the given moment it is possible to G16-16 - Graphics mode. The install such modes: guadrate represents the array 16x8 of points. Each point has one from ZX-40 - Usual Spectrum's mode 16 colours selected from a graphic with one bitplane and one attribute pallet of 16 millions of colours. The on a font resticle. same as and G256-8 in guadrate one can be placed from the 4-th ZX-80 - It mode similar a Spectrum's graphic pallets. The graphic pallets mode, but in each font resticle of graphics modes are intersected appears two characters, oblate on a one another. horizontal. The graphic pallet 16 colors mode is the first 16 colours from a graphic pallet 256 colors.

BORDER - In guadrate is output colour border. BLANK - Guadrate is extinguished - becomes black.

The size of data of a mode of guadrate makes 2 bytes, therefore change of a mode of all screen is reduced to overwriting of 2.5 kilobytes of data in the video-ram.

The similar structure of the screen allows easily to make scrolls as everything, and parts of the screen on font resticles.

The mode of the screen is installed for want of inclusion, and as with the Sprinter Main Board help of of functions BIOS. The functions BIOS allow to open on the G256-8 - Graphics mode. The screen graphics and text windows in guadrate represents the array 8x8 of the necessary places and necessary points. In each point one is set from size. 256-?? of colours selected from a graphic pallette of 16 millions of In BIOS there are functions of colours. The guadrates can have discovery of the graphics screen on different graphic pallets. Such all screen 320x256 of points. After graphic pallets for a mode G256-8 - discovery of this mode the screen four. represents a set from 256 of lines, length till 320 bytes. The adjacent

22 points in a line are adjacent bytes. The record of video-data can be The switching of lines is made made and without overwriting data through PORT_Y, in which number in the main RAM, that appears of a line output on the screen is useful for want of to operation, for installed. Numbers of lines are example, with the sprites. For considered from above of screen, operation with the sprites as the since zero. mode of record in the video-ram with transparent colour is stipulated. For the output in the graphics In this mode the information screen as it is required to open transmitted in the video-ram, is appropriate page of the main RAM. checked up on availability of byte In this page the copy of the video- #FF. If this byte is detected, the image will contain. write cycle is passed and on the screen in this place remains those data, what were earlier. Thus, on the screen it is possible fast to trace the sprites being rectangular sprites with "transparent" colours.

The handle of an output mode on the screen (inclusion of the output with transparent colours, disconnecting of copying in the main

The video-ram is the shadow RAM, therefore information were in the main RAM, under which there is a video-ram it will be not necessary to coincide the information, were in This video-ram.

23 RAM) is carried out through low bits A,(HL) will reduce in filling the RAM of a port of page of the graphics of the accelerator by data from (HL) screen. addresses, and the command of a type LD (DE),A will reduce in The accelerator of operations overwriting data from the RAM of with RAM. the accelerator in main or video- ram. The accelerator of operations with LD A,A - copying of the block for the RAM is intended for acceleration of graphics screen. The command is operations on transfer of data or on similar to the LD command L,L, but filling the RAM of one byte. The works with verticals of the screen. accelerator is present only in Sprinter configurations and The conclusion. consequently does not hinder in any way operation usual Spectrum of The work above Sprinter proceeds. programs. Hard and BIOS is improved. The programs supporting enhanced Basis of the accelerator is the fast modes of operation of the computer internal RAM in PLD. Operations on are written. transfer data are made by record of the block of data in this internal All question, about gain of the RAM, and then copying it in the computer, are send to PETERS necessary place of memory from PLUS LTD: this RAM. After one record the copying can be made some times and thus it is possible to make filling Post address: of the screen by textures. ul. Wosstanya 35, office 31 191014 St.-Petersburg For filling the screen one colour Russia. uses other mode of the accelerator. In him instead of the copied block of Telephone: data from the internal RAM the data (+7-812)327-35-31 record from the bus of the processor is made which in this moment do not E-mail: vary. [email protected]

The block of data written in the RAM of the accelerator, can have various length from a range 1..256 bytes. The handle of the accelerator is made immediately from the program. For this purpose the commands of the processor are used which actually are operations of a type NOP.

24 SERIAL CONNECTIONS How to connect almost everything by Mark J Swift and Simon N Goodwin.

Too many cables? PART 2 - MAKING A STANDARD The jigsaw solution introduced last This is the second part of our all- issue eases the problem of making purpose plug-and-play guide to cables, but there is another micro serial connections. The problem. As you acquire more and accompanying diagrams are more machinery, you will need more intended to be fitted together or onto and more cables - to the point the ones printed last issue, to where you could literally be lost in identify the plugs and connections to cables. link any pair of machines. For example if it is necessary to be Last issue we covered ST, Amiga, able to connect any machine to any PC, QL, ZX Interface 1 and SAM, other then: plus TRS-80, Amstrad PCW, and other systems with optional 25-pin with 2 machines - 1 cable is serial ports. required

In a rare moment of standardisation, with 3 machines - 2+1 = 3 cables Sinclair used the same connector are required and pinout for the Spectrum 128K and QL SER1. We have with 4 machines - 3+2+1 = 6 cables successfully used cables and serial- to-parallel converters made for the with 5 machines - 4+3+2+1 = 10 QL with original 128K and Plus cables Three Spectrums. Note that the QL's SER2 port is differently wired— with n machines - (n-1)+(n-2)+... it uses the DCE standard rather +2+1 = n(n-1)/2 cables than DTE, as explained in Part 1.. So you'd need 28 separate cables to The CST Thor 1 and Thor 20 were link all the machines covered in built around Sinclair QL circuit these articles! There must be a boards, so they have the same better way, and emulator expert SER1 and SER2 connections as a Mark J Swift has found it. 'real' QL. The CST/Dansoft Thor XVI uses the S5/8 standard, like some The ideal solution if you have lots of micros made by Philips. This may machines is to standardize the serial seem an obscure choice, but it's connector on each machine by well thought out and an ideal way to fitting an adaptor, and then to use a link a mixture of machines. SINGLE cable to connect between

25 machines. usually ask your system to use The S5/8 Standard 'software handshaking', sending special flow-control characters, The S5/8 standard for serial often known as XON and XOFF, but connections came out of a this is less reliable and no good at Government study in the eighties. all for binary data like program code, The S5/8 standard is based on an where the reserved control eight pole DIN connector and characters might appear anywhere. specifies nine signals as follows: Another advantage of standardising on S5/8 is that you can swap any 1- DINP data input link from one type to the other by 3- DOUT data output replacing the single S5/8 cable in 4- HINP handshake input the middle. 5- HOUT handshake output 6- SINP subsidiary input Making an S5/8 adaptor 7- SOUT subsidiary output 8- V+ power supply This article is accompanied by a set 2- GND signal ground of 'jigsaw' diagrams for various (common) computers. To find the cable SHIELD - EARTH earth connections required to convert one of the serial definitions into S5/8, A device containing an S5/8 simply snap this 'jigsaw' piece into connector should contain a socket, place underneath the 'jigsaw' piece and each device is connected to for the relevant hardware. another with a simple cross-over cable. This will standardize the hardware to be S5/8. The simple cable Of the eight signal lines only 5 are required to connect two S5/8 necessary (hence the name S5/8 - devices has its own diagram. You five lines from eight), these lines can use this cable to link two Thor are: XVI computers, as the serial ports on that machine use the S5/8 1- DINP data input standard. 3- DOUT data output 4- HINP handshake input Less cables - less hassle 5- HOUT handshake output 2- GND signal ground Now if it is necessary to be able to connect any machine to any other, Handshaking you will need to make up the following leads: The handshake lines are optional controls, used to temporarily pause 2 machines - 2 adaptors + 1 cable the flow of data to make sure that 3 machines - 3 adaptors + 1 cable none gets lost at high speeds. If 4 machines - 4 adaptors + 1 cable these are not available you can 5 machines - 5 adaptors + 1 cable

26 ... n machines - n adaptors + 1 cable While we cannot sort out your serial communications problems on an As you can see, the number of individual basis, these articles cables required no longer increases should at least ensure that you get exponentially. With just four cables the connections right. If you run into you can connect all three Sinclair configuration problems you should serial ports, PC-ATs, SAM and consider writing a letter to the Thors. Add one more (DTE to S5/8) editor - it's quite likely that one of the and you can include Amigas, PC- other readers has encountered your XTs, Atari STs, Amstrad PCWs and problem and found a way round it. If TRS-80s in your collection - you do write in, be sure to include probably enough to start up a data- full details of the software transfer agency! configuration commands and menu selections that you've tried at each Other aspects end of the link. Good luck, and happy handshaking! These articles have concentrated on hardware connections and skipped over software. You should make sure that both ends of the link are using the same speed and data size. Most machines default to 9600 baud and 8 data bits, with one or two stop bits. Extra stop bits do no harm.

You may need to reduce the rate (at both ends) for flaky interfaces - particularly if you are not using hardware handshaking or transmitting to a Sinclair machine. Many links can work at 1200 baud or lower speeds with no need for handshaking. The latest QL- compatibles are capable of rates up to 115,200 baud.

If you're hungry for further reading, you might seek out the August 1986 issue of Electronics & Wireless World, for an article entitled 'S5/8 the technical details' by Andrew Hardie. This was the inspiration for our 'standard cable' system.

27 BACK TO BASICS Part seven: Graphics By Ken Beer

SHIFT & key 9 again. The subject this month is GRAPHICS. Graphics enable pictures to be drawn on the screen. High resolution Graphics On the SPECTRUM there are several types of graphics available. These are as follows: There are 256 picture elements, or PIXELS across the screen width and a total of 176 PIXELS up its 1. Low resolution graphics as height. Numbering starts from the provided by the top keys bottom left-hand corner and Its one to eight. position is determined by how far it 2. High resolution graphics is across the screen (known as the using PLOT, DRAW & ‘X’ co-ordinate) and how far up the CIRCLE. screen (known as the 'Y' co- 3. User-Defined Graphics. ordinate). Notice that the 'X' coordinate is always quoted first and is followed by the 'Y' coordinate Low resolution Graphics separated by a comma.

To start the procedure the The first category can only be command PLOT is used thus: used to produce simple pictures, because you can only make your picture out of the blocks available. BORDER 5 : PLOT 70,50

Each block consists of 8 X 8 picture elements. It is usually call this point 'A' necessary to lay out the required picture on squared paper before Try it now. First of all, a CYAN any attempt is made to program. coloured Border differentiates the To Enter the Graphics mode - press PAPER area from the BORDER CAPS SHIFT & 9. Although there area and you will notice a dot has are only 8 graphics keys available appeared on the left-hand side of there are in fact 16 graphic the PAPER area of the screen. symbols, the other 8 (which are the inverse of the first) are This represents the reference point obtained by using the SYMBOL 'A' from which any further drawing SHIFT key in addition. To return to starts. To draw a line we need normal text you must press CAPS another point to refer to and this is

28 defined by another pair of X & Y Now, clear the screen by using coordinates as before but this time command CLS on key V. We will is preceded by the command now attempt to draw a circle. DRAW. Thus, if we require to draw The CIRCLE command requires a line to say, X co-ordinate of 100 three coordinates - the first two pixels to the right and Y co-ordinate sets the point where the centre of of 50 pixels up we enter: the circle will be (like with PLOT) and the third sets the radius of the circle. Thus a circle of radius of 20 DRAW 100,50 pixels drawn at co-ordinate points of X = 70, Y = 50 would be programmed : call this point 'B' CLS Now we have a new reference to CIRCLE 70,50,20 draw from, and to drop a perpendicular line for example we User-Defined Graphics type: I would prefer to leave this subject to next time and hopefully to DRAW 0,-50 elaborate a little more on the preceding features.

(Note DRAW 0 = no X change KB and DRAW -50 =drop 50)

call this point 'C' and finally, say we wished to complete the triangle ABC we enter:

DRAW -100,0

(DRAW -100 = 100 to the left and DRAW 0 = no Y change)

we are now back to point 'A'

29 A MINER TRIAD Music in Jet-Set Willy and both versions of Manic Miner by Richard Hallas (author of "Join the Jet-Set!" and "Jet-Set Willy in Space")

Introduction achieve one work of distinction that no other JSW hacker (to my knowl- edge) ever attempted: I succeeded I was never a great Spectrum in editing the in-game music, and for hacker, as I didn't have the time in Join the Jet-Set! I presented the my childhood to get into machine player with a choice of ten different code and hack games in a big way. tunes. (Later, for Jet-Set Willy in However, I did dabble to a certain Space, I did a rendition of the Star extent with games that particularly Trek: Voyager theme music, and interested me, and the game that tunes of mine have turned up in captivated me above all was Jet-Set other people's JSW games.) Willy. Since a number of JSW-clone au- Of course, there was a veritable del- thors have expressed an interest in uge of hacks for this game in the various aspects of the Willy game various magazines shortly after it music, I have extended my investi- was launched, with Your Spectrum gations, and this document is the and Crash devoting large sections result. It explains how to alter the in- of their pages to maps and the latest game music in both Jet-Set Willy weird and wonderful POKEs. The and Manic Miner (both Bug-Byte room format was discussed, and it and Software Projects versions), wasn't long before game editors ap- and in addition it explains how to peared. Undoubtedly the best of change the music which accompa- these was JetSet Edit by Paul Rho- nies Jet-Set Willy's title screen. Fi- des, which I used to create both of nally, it reveals a number of interest- my JSW games. ing potential tricks which, at the time of writing, have not yet been em- So, the editors and POKEs, be- ployed in any genuine Willy game. tween them, allowed you to custom- ise the room layouts and graphics, This document does not concern and even to alter the behaviour of itself either with the title screen mu- Willy; effectively, you could create sic in Manic Miner, or any aspect of whole new games. It seemed music in Jet-Set Willy II. strange, therefore, that none of the magazines or editors ever touched on one other important aspect of the Basic tone chart Willy games: their music.

Despite not being much of a hacker All the music under discussion here back in the 80s, I did manage to is based around a simple tone chart.

30 One byte is used per note, and the G 171 value of each byte corresponds to a # 180 pitch as follows: F 192 E 204 X C 16 # 216 B 17 D 230 # 18 # 242 A 19 Bottom C 255 (in-game music) or 0 # 20 (title-page music) G 22 X C 0 (in-game music only) # 23 F 24 The most comfortable range for mu- E 25 sic should be centred around the # 27 Middle and Top octaves. At the ex- D 29 tremes of pitch, notes become un- # 31 pleasant, hard to distinguish and in- High C 32 creasingly out of tune. In the chart, B 34 'X' denotes the very extreme of the # 36 range, and # indicates a 'between A 38 note' (a semitone, or a black key on # 40 a musical keyboard). G 43 # 45 When considering the above chart, F 48 Middle C should be thought of as E 51 the tonic (or 'root') for your tune, and # 54 you can think of it like middle C on a D 57 piano. It should be made clear, # 60 though, that in the context of these Top C 64 games the Spectrum is a B 68 'transposing instrument': Middle C # 72 here is in fact the F# above middle A 76 C on a real piano. Unless you have # 81 perfect pitch, however, this shouldn't G 86 be a cause for concern. # 91 F 96 If you examine the chart you will see E 102 that the notes follow a simple loga- # 108 rithmic scale: take any note value D 115 and double it, and you will get the # 121 same note an octave lower; halve it Middle C 128 and you will obtain the octave B 136 higher. This is of course a very sim- # 144 plistic system, and the absence of A 153 floating-point values means that it # 162 soon breaks down, and the notes go

31 out of tune. Indeed, nearly all of the notes are out of tune to some ex- In-game music tent, and it's really not feasible to write music in 'keys'; if you wish to transcribe a real melody, you should This is the 'blippy' music that cycles first transpose it into C (assuming continuously as the game is being it's not in C to start with) and then played. transcribe it into the decimal inte- gers given above. 64 notes are available for the mel- ody: no more; no fewer. Your mel- With these tuning inadequacies in ody must, therefore, be of a suitable mind, you should treat the above nature to be squeezed into this tone chart with a small degree of shape, which means that it really flexibility, and consider its notes as must have either two or four beats in theoretical ideal values. Depending a bar. on the nature of your melody, and the register in which it is playing, Simple tunes often have an A1-A2- you may find it necessary to de-tune B-A1 structure (where A1 and A2 individual notes very slightly to com- may or may not be slightly different), pensate for the lack of numeric or something equally straightfor- resolution. The chart above should ward. Such tunes generally adapt be considered as an 'equal tempera- well to being in-game music. Often it ment' solution: it will give you the is possible to fit an entire tune of this best note when considering the structure into an in-game melody whole range of notes available, just (though, to be fair, you may also dis- like a piano will always give you the cover that you have only enough same note without taking the key notes for half of the tune that you'd into account. If you were playing an like to use!). unequally tempered instrument, though (such as the violin, for exam- The best way to start transcribing a ple), you would make adjustments melody into an in-game tune is to of fractions of a tone in order to tune quantise it. What is the shortest note notes correctly for the current key that you need to represent? It may and/or context. The same applies be a crotchet, in which case you can here: you may find it necessary to have a relatively lengthy tune which add or subtract 1 to any given note plays very quickly (but which may value in order to make it sound right. be difficult for the player to discern). A discerning musical ear (and an It's more likely to be a quaver, how- accurate Spectrum emulator!) is ever. This means that most of the necessary to do this well. notes in your melody, the crotchets, must be represented by repeated The following sections all rely on the pairs of note in the in-game tune. above tone chart. (Minims would be four repeated notes, and so on.) Assuming that one game-tune note equates in

32 length to a quaver, you will find that your 64 notes can be divided into Jet-Set Willy title screen music four 8-crotchet phrases.

So, once you have written a simple JSW's title screen music is played in tune, or adapted a real melody, to fit an unusual way: one note in mem- into 64 notes, the tone chart above ory actually produces two notes should be used to determine the val- when sounded. JSW plays each ues to poke into the appropriate lo- note at the pitch specified, and then cations in the game code. The ad- doubles the value to play the same dresses are different for all three note an octave lower. By default, the games, and are as follows: title music (the first part of Beetho- ven's Moonlight Sonata, prematurely Manic Miner (Bug-Byte) cut off) is of a rather odd length of 34188 to 34251 &458C 99 notes, starting at address 34299 (&45FB). For reference, the default Manic Miner (Software Projects) music is as follows: 34194 to 34257 &4592

Jet-Set Willy 99 notes, addresses 34299 to 34399 to 34462 &465F 34397:

The addresses are in the Spectrum 81, 60, 51, 81, 60, 51, memory map, and can be POKEd 81, 60, 51, 81, 60, 51, directly from Spectrum Basic. The 81, 60, 51, 81, 60, 51, Hex addresses represent the start of 81, 60, 51, 81, 60, 51, the melody within a SNA-format snapshot, and may be of use to 76, 60, 51, 76, 60, 51, people with emulator snapshot dis- 76, 57, 45, 76, 57, 45, assemblers and memory monitors. 81, 64, 45, 81, 60, 51, (SNA-format snapshots exclude the 81, 60, 54, 91, 64, 54, first 16384 bytes of the Spectrum's memory, and so the addresses are 102, 81, 60, 81, 60, 51, &4000 less than the 'real' Spectrum 81, 60, 51, 40, 60, 40, memory addresses.) 40, 54, 45, 81, 54, 45, 81, 54, 45, 40, 54, 40,

Special note 40, 60, 51, 81, 60, 51, 38, 60, 45, 76, 60, 45, 40, 64, 51, 81, 64, 51, Using a value of 0 in the in-game 45, 64, 54, 32, 64, 54, melody produces a 'fundamental' C which is very low indeed (an octave 61, 121, 61 below the C produced by the value 255).

33 The note values should be poked plays it again to get the note which into the addresses in just the same is an octave lower. For notes below way as for the in-game music, but 128 (i.e. with values which are with a few important extra consid- greater), doubling obviously creates erations. a number which is greater than 255 (256 maps to 0), and so the second Notes of value 128 and less (i.e. note is double the value of the first higher notes) produce the specified note, modulus 256. So, for example, note plus the octave below it, as ex- playing Bottom F (192) gives a sec- pected. However, notes of value ondary note of value (192 x 2) - 256 greater than 128 (lower notes) do = 384 - 256 = 128 (which is Middle not produce the octave effect, but C). instead produce a second, conso- nant tone. The possible results can be presented in a table, as follows: Variable-length melodies

136 = B + X C (16) Using a value of 255 in the title page 144 = A# + High C (32) music causes the tune to stop play- 153 = A + Top E (50) * ing. This can be useful if you don't 162 = G# + Middle B (68) want your tune to have to be 99 171 = G + Middle G (86) notes long (which is an awkward 180 = F# + Middle E (104) * length in any case). In fact, if you 192 = F + Middle C (128) can stand the constant flashing, you 204 = E + Bottom A (152) * can poke 34299 (the first title music 216 = D# + Bottom F# (176) * note) with 255 to eliminate the title 230 = D + Bottom E (204) music altogether and just end up 242 = C# + Bottom D (228) * with a continuously scrolling 0 = C + unity (produces double- 'scenario' message and flashing title length held note) screen.

* These notes are slightly out of Super-long combined melodies tune (but not enough to be very no- ticeable). Interestingly, if you compare the ad- These lower notes can therefore be dresses of the title music and the in- used cleverly to produce extra notes game music in Jet-Set Willy, you will in the tune, or to imply harmonies, find that they are stored consecu- and to get away from the constant tively in memory: the title music octave-doubling effect. goes from 34299 to 34397, and the in-game music from 34399 to The reason that this happens is that 34462, with a single byte, value 255, the player routine plays the note at separating them at address 34398. pitch, then doubles its value and

34 As explained above, the value of 255 is used to terminate the play HINTS & TIPS routine, so if another value is poked Jack Lawrie into address 34398, the title music player simply plays the note you To check that the printer is ready, have poked in, and continues on to include: play the in-game music. IF GET(&E5) AND 1 THEN ....… However, a value of 255 then needs to exist at the end of the in-game To print what is coming on the music in order to stop the title page screen, include: play routine. (If there's no 255 within the music, the play routine will go on OSCLI("CLI #+P~E"):dummy= to 'play' the data following the tunes! INKEY(0) It soon encounters a 255 and stops anyway, but it sounds pretty awful (not necessary to use "#-P" to until then, and so should be switch off ) avoided.) With clever composition, therefore, it would be possible to To delete a file from RAM: produce a 163-note title page tune (the 164th note needs to be the 255 *ERASE filename or :*//filename end-marker, which is bottom C to (Use OSCLI if filename is a string the in-game play routine), the latter variable) 64 notes of which are used as the in-game music. To go to the Index when in Basic, using TAB key: If you decided to do this, therefore, you would have to avoid the use of IF INKEY(0)=9 THEN OSCLI("CLI Bottom C (255) in the in-game mu- #I"):dummy=INKEY(0) sic until the very last note. This is slightly annoying, because the pitch To empty the keyboard buffer: produced by Bottom C (255) with the in-game player is actually the REPEAT UNTIL INKEY(0)=-1 same as the pitch produced by value 0 in the title music player. Us- To abort a program - reverts to the ing the value 0 in the in-game music index: produces 'fundamental C', which is an octave lower. So, the note that K=INKEY(secs*100):IF K=-1 OSCLI you are prevented from using in the ("CLI #I") in-game music is not actually the very lowest note available. IF F THEN ... is the same as IF F<>0 THEN

RH JL

35 £ UK Cambridge Z88 V3 95 Cambridge Z88 V4 120 Reconditioned Z88 60 32k RAMPACK 18 128k RAMPACK 24 512k RAMPACK 40 32k EPROM Pack 18 128k EPROM Pack 24 256k EPROM Pack 55 EPROM Eraser 20

Special Z88-QL Serial lead 10 Import / Export Software 2 PClink Kit (for PCs) 25 Z88 to MAC Kit 25 Z88 to BBC Kit 25 QL Transfer Kit 12

Parallel Printer lead 39 Serial Printer lead 12 Mains Adaptor (230vac:6V.500ma) 10 Topper (protective cover) 12 Hard plastic carry case 10

36