+ All Categories
Home > Documents > Boai_issue_1 Base on an Idea Scads 3-31-2012

Boai_issue_1 Base on an Idea Scads 3-31-2012

Date post: 05-Apr-2018
Category:
Upload: -
View: 216 times
Download: 0 times
Share this document with a friend

of 40

Transcript
  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    1/40

    Issue 1 January 1996 Price 2.00

    The Z380 reviewedinside!

    How ToProgramthe SAMMouse

    Play SampledSound at10.4kHz! theBurstPlayer

    Explained

    SAM On TheInternet WWW,

    FTP and EmailResources

    Dalmation BBS SAM Goes

    Online!

    The SAM DiskProtectorReviewed

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    2/40

    1 Dovey Close, Astley, Tyldesley, Manchester, M29 7NPTel: (01942) 886084 Cheques made payable to M. Rookyard

    Other Services

    The HominROM

    EPROM PROGRAMMING SERVICE

    We will program most EPROMs from code files. 1.50 for each

    EPROM programmed, plus the cost of any EPROMs which we

    supply; if you prefer, you may supply your own. We will program

    any quantity.

    PCB DESIGN SERVICE AS USED FOR THE QUAZARPCB artwork produced from circuit diagrams, schematic drawings

    or netlists. Photo etch-resist acetates, PostScript files or Gerber plot

    files returned. P.O.A.

    SCHEMATIC DRAWING SERVICECircuit diagrams drawn, printed & netlists created from your

    drawings. P.O.A.

    For more information send an S.A.E. to the address below.

    WORRIED ABOUT THE RISK OF

    THEFT OF YOUR SAM? Own a pre-

    version 3.0 SAM ROM? Well ROOKSOFT

    have a solution to both of these problems

    The HominROM is a v3.0 (equivalent to

    West Coast v3.1) SAM Coup ROM,

    personalised with your own name and

    postcode on the title screen, making

    identification much easier in case of theft!

    (On request we can put any other

    information in there that you may require

    up to a maximum of 32 characters).

    This revised ROM also replaces the cassette

    based function keys with much more useful

    disk based options such as DIR, BOOT 1,

    etc.

    The HominROM costs just 7.95 and

    comes with detailed fitting instructions.

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    3/40 1996 Entropy & Rooksoft. All Rights Reserved.

    Issue 1 January 1996

    Regulars

    4 Editorial7 News29 Subscriptions37 Contacts38 Index of Advertisers38 Next Issue38 Credits and Disclaimer

    Features

    14 How to be a complete BursterdStefan Drissen explains how the Burst player routineused in his SAM Mod Player works.

    22 Of Mice and Men

    The SAM Mouse Interface in this issue, Simon Cookedocuments the software needed to read your rodent.

    27 Is there anybody out there?Dave Whitmores Dalmation BBSgoes online! Read all about it!

    30 SAM Gets Wired

    Where to find the SAM on the World Wide Web, andthe rest of the Internet.

    33 A High Speed SAM?Martin Rookyard looks at the Z380 with a viewtowards using it in a SAM accelerator.

    Reviews11 SC_Disk Protector

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    4/404

    Welcome to the fir st ever issue of the br and

    new technical magazine for the SAM Coup!

    You may be thinking Why do we need another SAM magazine? Well, as SAMowners ourselves we've read a fair few other magazines in our time and while they're

    ok as far as they go, we couldn't help noticingthe relative dearth of good, heavy, technical stuff- so here's a magazine full of good (we hope),heavy, technical stuff. Admittedly it's a littlesparse at the moment in terms of actual numbers

    of contributors, but that's where you lot come in.If you've got an article you'd like to write for themagazine, send it in! If it's good enough we'll

    print it (because the mag isnt called Based OnOurIdeas) and give you a couple of free issuesinto the bargain. We want technical articles;hardware projects, the sort of things you haven'tcome across in other mags, or things that youhave seen but you can do faster or better. What

    we don't want are games and things of that ilk -not because we don't like them, but becauseother people are already covering that more thanadequately. Of course, if you want to do a step-

    by-step guide to, say, collision detection or fastsprite printing, or even a complete guide towriting a game, that kind of thing is more thanwelcome!

    One of our columns (called SAMizdat )will be for forthcoming projects or projects(both hardware and software) under development. Unlike some magazines, we donot operate a policy of only printing something about a project when it is totallyfinished. We feel that this causes a developer to feel isolated and prevents useful

    pooling of knowledge. So, if you are working on something, then shout it to the worldthrough the pages of Based On An Idea... who knows, there might be someone outthere willing to fund your project, if they hear about it and like it. The flip side ofthat, of course, is that we cant guarantee that all of the projects which we tell youabout in the SAMizdat section will ever see the light of day. But thats not the point

    at the end of the day, it should help boost the morale of other developers and SAMusers at the very least.

    How the Accelerator works: Well, you justplug this thing into the back of the SAM,

    threaten it with a screwdriver, and yourSAMs running at 20MHz before you can

    blink

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    5/40

    EDITORIAL

    5

    Youll also notice a little questionnaire with this issue, please take a few moments tofill it in, to help us put together the kind of mag that youll enjoy reading (if you dontwant to answer any particular question thats ok by us). Send it back to us asap, but

    before March 1st because on that date well pull five winners out of the hat, each ofwhom will receive the by now almost customary couple of free issues. You can, ofcourse, send it in after then (and please do we want to know what you think of us!),

    but you wont have the chance to win

    Remember, this magazine is meant to be yourtechnical magazine with yourideas,yourprojects and a place foryou to discuss technical matters with other like mindedSAM users. If you dont understand something, ask, and there will most probably besomeone who knows the answer. In this vein, wed also like you to write to us withletters which we can include in the magazine. There is going to be a sort of revival ofthe Spec Tec Jr column which Simon Cooke wrote for Your Sinclair (or somethingclose to it the short stories, for example, may bow out gracefully in our version),where you can pose any SAM related questions you want or need the answers to.Were also planning to have a Mart section where you can place free adverts forthings that youd like to sell or buy (so send those adverts in now! Keep them ofreasonable length though), and the Contacts section is already up and running but ifyoure not in there and want an entry, just let us know and well put you in.

    As for adverts, well, wed love to be able to give everyone free ones, but we couldntafford to do that really. As this is a non-profit magazine, were not going to chargemuch for them just enough to (hopefully) cover our printing costs in the long run. Ifyou want to place a full-page, half-page or quarter-page advert in the magazine, get intouch with us and well quote you the prices.

    All in all though, this magazine is about sharing information. Weve got lots offeatures lined up for the next few issues (most of which are going to be written byMartin and Simon, with the odd guest writer popping up at least at first, thoughSimon is dreading what this is going to do to his end-of-degree exams), and we hopethat you find this first issue a joy to read, and something to refer back to when you

    need that specific piece of information that you just couldnt find anywhere else.

    These are interesting times for the SAM were threatened with obsolescence fromall sides, and lots of people laugh at SAM owners for owning well, what is to behonest a quirky, underdeveloped little machine. Theres surprisingly little softwareavailable on a machine which is six years old, and also surprisingly little hardware

    but this is beginning to change. Oh, and just to make you nervous dont forget thatthe mean time between failures for the components in your SAM, as specified by themanufacturers, is on average five years and if you bought your SAM in the days of

    MGT, your SAM is about a year older than that by now!

    Simon Cooke, Martin Rookyard, Maria Rookyard, January 1996

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    6/40

    The SAMs Premiere PD Library

    Many other Public Domain disks ar e available from us! Send an SAE to our address for more

    details.

    SAM PD18 Mill Lane, Glenburn Rd, Old Skelmersdale, Lancs, WN8 8RH. Tel: 01695 731163

    We have a large selection of Pub lic Domain (and copyr ighted) softwar e in stock to suit a ll tastes. A

    PD disk catalogue is available send 1.00, or a formatted disk and an SAE. Also includes some

    useful progs & a Tetr is game! All cheques should be made payable to SAM PD.

    SAM COUPE ARCADE DEVELOPMENT

    SYSTEM (SCADS) 2.50

    SCADS is now Public Domain. The disk contains theDesigner and Supervisor programs, and comes witheight playable demos and a read-me file. The SCADSmanual can be obtained from Revelation Software andalso from us for 12.95 (200 pages, A4).

    AMSTRAD NC100 NOTE PAD TO SAM 1.50Convert Notepad files to SAM format and viceversa.The files created can be used on most SAMwordprocessors. Excellent step-by-step read-me fileswill take you though all you need to know to transferfiles and how to make up the necessary conecting lead.

    PAW CONVERTER 1.50The Professional Adventure Writing system can now

    be used with full SAMDOS compatibilty. The originalPAW, version A17C, on disk or tape is needed.Contact us if interested in this disk, but don't have

    A17C.

    DJ0HF AMATEUR RADIO SUITE (Shar ewar e)

    Unregistered 1.50 Registered 5.00

    Transmit & receive radio data such asRTTY,CW,SSTV and FAX. The program can controlan external TNC. To use, you need a SAM runningMASTERDOS with a minimum of 256KB, 1 diskdrive and the SAMBUS to provide timing signals. Noother external hardware is needed to decode the signalfrom your amateur radio receiver.

    UTILITY COLLECT ION 1.50

    Includes Data Manager - database. Dir-Util - very nicedisk manipulation program with pull down menus,handy Diary program, a full sector editor, a stand-alone auto Unerase program, which will restore anyerased program without asking you for the file type.SAM-to-BMP converts SAM screens to Windowsformat graphic files, BMP-to-SAM does the reverse.Text-to-note converts PC text files to Tasword format,note-to-text does the opposite. Fred-to-text willdecompress FRED disk magazine text files to normaltext.

    007 DISK DOCTOR

    1.50Originally sold for 9.95, the disk contains fiveprograms. Disk Doctor, Sector Editor, Close up, Map-it and Exchange. A readme manual file is also includedon the disk.

    007 DISASSEMBLER & 007 REVEAL 1.50

    Three disassemblers for disassembling code atdifferent memory addresses. Reveal is a program fordisplaying text in code, find high score, names andhidden messages. Also on this disk is an updateddisassembler version by Mike Haine, that is also amonitor program.

    SAMART. 1.50An excellent little Art Program, which is very userfriendly. SAMArt uses two screens, a work screen andan option screen. Also contains a slideshow. RequiresMasterDOS and the SAMCo mouse.

    F9 SOFTWARE NOT PUBLIC DOMAIN!

    KAPSA EMULATOR 8.50A Speccy emulator with lots of extra features. Use it toSnapshot or convert files. K.E.'s ROM lets you useevery key of SAM's keyboard and has a help screen ofthe Speccy's keyboard. Three built-in monitors (Z80-

    list, Vast and Wlezley - good for viewing graphics)with an MC tracer program for hackers. You also getAncient Fighters and Tetris III free of charge.

    ZIPPER (ARCHIVING PROGRAMS) 8.50

    Screen compressor, MC Data compressor and Disccompressor - the excellent Archiving program -archives selected files on average to 50%. FASTdecrunching occurs automatically on loading.

    SAMSPRITE 9.95

    A pointer driven Sprite Designer program, fordesigning 8x8 or 16x16 sprites. Animation feature and

    printed manual.

    EDI-PRO WORD PROC ESSOR 13.50Full WYSIWYG system, proportional printing, up to15 fonts in one text file, pull down menu system,integrated font editor, imports text from Tasword andOutwrite, search & replace, screen saver, macros, 32maths & other symbols, auto-save, and many otherfunctions weve not got space to mention! Edit up to 6text files at once! Prints to Epson and compatible

    printers.

    SAM MOD PLAYER v2.2

    5.00The latest version of this excellent MOD player,compatible with SAM Soundchip, EDDAC, BlueAlpha sampler and Quazar Soundcard. Comes withsource code to let you use it in your own programs!

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    7/40

    NEWS

    7

    PRODOS Author ConvictedChris Pile, author of PRODOS, theSAM Coups CP/M2.2 compatibleoperating system was sentenced latelast year (15th November) to 18months imprisonment under section 3of the Computer Misuse Act of 1990.

    According to a CERT press release,

    using the pseudonym Black Baron,Christopher Pile, an unemployed 26year old from Efford, Plymouthcreated the viruses Pathogen, Queegand Smeg. At his trial on 26th May1995, Pile pleaded guilty to elevencharges arising from his creation andrelease of these viruses. Ten countsrelated to instances where

    organisations had sufferedunauthorised modification of theircomputer data by one of these viruses.The eleventh charge relates to incitingothers to create computer viruses andhence cause unauthorisedmodifications.

    Although Pile's trial was in May, thesentencing was delayed until

    November to allow both defence andprosecution counsel to argue theseriousness of these crimes. Pile'sviruses were available on computer

    bulletin boards and on systemsconnected to the global Internet.

    Christopher Pile is the first person inthe United Kingdom to be convictedof writing and distributing computerviruses. He is the first person in the

    world to be convicted of incitingothers to create computer viruses. Atthe trial in May, Judge Jeremy Griggsdescribed the case as unique and saidit was a dangerous practice to haveengaged in.

    In October 1992 three CornellUniversity students were eachsentenced to several hundred hourscommunity service for creating anddisseminating a computer virus.

    Unauthorised modification ofinformation in a computer system isan offence under section 3 of theUnited Kingdom's Computer MisuseAct 1990. The maximum punishmentunder this section is five yearsimprisonment or an unlimited fine or

    both.

    Is it real, or is it

    Entropy member Allan Skillman,author of the Driver Mines programwhich appeared on FRED issue 63,has announced the arrival of a SAMCoupemulator for UNIX systemsrunning under X Windows.

    Having worked on Xcoupefor over ayear, the results are startling and it

    looks just like the real thing. Anumber of insights into the design ofthe SAM were made during thecoding of the emulator includingthat Darren Clarke, programmer of theDriver Mosaic game, was able to runa routine under interrupts, eventhough his interrupt handler wastesting for the absence of interrupts.

    (Due to a fluke in the timings, theprogram still runs).

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    8/408

    We can verify that indeed, it doesemulate a SAM rather well evendown to line interrupt levels. It alsomanages to successfully emulate theVL1772-02 disk controller, soexisting DOSes can be used without

    modification. At the time of writing,there is a problem running most ESIdemos they appear to prove tootricky for it. According to Allan, thisshould be fixed soon.

    You can see the results for yourself bymaking a visit to Allan SkillmansXcoupe web pages, at:

    http://www.hep.ucl.ac.uk/~ajs/xcoupe

    Sounds bad for the SAMStocks of the SAA1099 chip, used to

    produce the sound on the basic SAMCoup are running out. Recently, thelast ever general batch of the Phillipschips were manufactured, and Phillips

    will now only be consideringminimum orders of 10,000 or moreunits, to cover the manufacturing andset-up costs.

    According to Bob Brenchley ofFORMAT Publications, West CoastComputers have bought the last of thestocks in this country, and when

    Siemens approached Phillips to buythe chip, they were passed on to WestCoast.

    Driver running under Xcoupe, under Xwindows, under Unix, under

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    9/40

    NEWS

    9

    Siemens are using the sound-chips inrailway signalling boxes in order to

    provide different audible alarms forevery possible type of emergencycondition.

    High Capacity StorageThe last Gloucester show (October1995) saw Nev Young of S.D.Software displaying his wares next tothe FORMAT stand. While the showseemed a bit on the quite side incomparison to previous ones, therewere three major attractions there

    The Quazar, our Acceleratorprototype, and the first ever releasedSAM IDE Hard Drive Interface.

    The interface wasnt on sale at thetime, but Nev was activelydemonstrating its capabilities with arolling (and seemingly never-endingslideshow). By the time of the

    Edinburgh SAM Show, the interfaceswere ready for sale, and you can nowbuy the interface, with 84Mb harddrive, PSU with cable, ConnectingIDE cable and a provisional DOSfrom FRED Publishing for 150,which includes postage. For 180, youcan buy the same package but with a120Mb drive, and for 220, the

    package with a 170Mb drive.

    Though we remain sceptical about theefficency of the filing methods usedon the drive, it should work with anyIDE drive available on the market(including the recently released EIDEdrives, which correspond to the ATA2specification).

    When we asked him, Nev Youngexplained that the file directory is held

    as one large file in the system.Subdirectories are marked in a similarway to MasterDOS subdirectories, butuse a 16-bit word to store thedirectory tag enabling the user tohave up to 65535 subdirectories on thehard drive.

    We think that there may be speedproblems associated with this,especially when the nunber of files onthe hard-drive becomes very large.But were remaining optimistic some kind of hard drive is better thannone, and no doubt if the DOS isnt upto scratch, someone will release a newone in time.

    If you would like to buy one of theinterface packages, contact FRED at:FRED Publishing, 40 Roundyhill,

    Monifieth, Dundee, DD5 4RZ.

    Cheques made payable to FREDPublishing.

    Nice & CompactSpeaking of IDE drives, JohnathanTaylor (a PRODOS hacker andEntropy member, currently workingon a SAM version of CP/M v3.0) hasrecently reported that he can now readATAPI CD ROMs (the kind which

    plug into an IDE drive socket on thePC) on his SAM, using a Generic Z80IDE interface. All he needs now is areal CD-ROM disk with a complexdirectory structure to develop a fully-fledged reader utility. Currently,Johnathan is using two SEGA Mega-CD games to test the system, and it allseems to work fine though there is a

    distinct lack of files around which totest the system. More news on this aswe have it.

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    10/4010

    All Formats Show DatesHeres the dates for the about-to-occurAll Formats Fairs usually DerekMorgan makes it to the Haydock one(which is also the one that we tend to

    go to). As for the others, we couldntpossibly comment which is a face-saving way of saying that we haventgot a clue about whether or not thereis a SAM presence.

    Jan 20 (Midlands)

    NAC (Royal Showground)Stoneleigh.

    Jan 21 (London)Tolworth Recreation Centre, A3,Surbiton.Jan 27 (Nor th East)

    Northumbria Centre, Washington,Dist 12.Jan 28 (Scotland)

    Mitchell Theatre, Charing Cross,Glasgow.

    Feb 3 (North West)Haydock Racecourse, Haydock.

    Entry is 4 for adults, 2 for children.You can order a stand by giving BruceEveriss a ring on either0181 8568478, or0973 175 131.

    The Edinburgh SAM Show

    The recent SAM show in Edinburghon the 12th of November was quitegood fun. Unforunately, there werentthat many SAM users there, so ittends to pale in comparison with theGloucester shows, though the fact thatit was piggybacked onto anothercomputer fair made it quite a goodday out for bargain hunters.

    People who made it to the showincluded Colin Piggot (with the

    Quazar Surround blaring out at fullvolume across the SAM corner of theshow), Allan Clarkson (selling copiesof Crashed), Jupiter Software andtheir games, FRED Publishing, andBob Brenchley and Nev Young ofFORMAT and S.D. Softwarerespectively were also present, so wehad a good natter. If you werentthere, why not? :-)

    Quazar Dropped!Colin Piggot has recouped thedevelopment costs of the Quazar

    Surround 16-bit and 8-bit soundboard, and is now able to offer them ata reduced price of 53.99. See hisadvert in this issue for moreinformation.

    Termite Name ChangeDue to possible problems with another

    piece of software already available for

    various machines, Simon Cookeswork in progress, Termite, has had toundergo a name change. TERMiTE isalready a registered trademark for aterminal emulation suite, so to avoid

    possible problems, Simon has decidedto change the name to something else.Current ideas include PhotonCommsor just Photon. If you have any better

    ideas, send them in to the Based OnAn Idea address!

    Email your news to us at:

    [email protected] post it to us at:

    Based On An Idea, 1 DoveyClose, Astley, Tyldesley,

    Manchester, M29 7NP

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    11/40

    REVIEWS

    11

    Only one r eview this issue but hopefully quite an in-depth one. Next

    ish we aim to r eview at least two things! (Oh Ghod Ed)

    SC_Disk Protector, 15.00Steves Software, 7 NarrowClose, Histon, Cambridge, CB44XX. Tel: (01223) 235150 from6pm-9pm, Mon-Sat.

    You know the kind of thing. Itsprobably happened to you hundreds oftimes before. Youre working on yourlatest masterpiece, your current raisondtre, and it crashes. No problem,you think. Ive just saved a backupcopy of it before running theassembled code (Everyone doesthis dont they? If not, its a very

    good habit to get into, and can save allkinds of headaches). So you reset themachine, stick your work-disk in thedrive, and press the F9 key

    at which point, of course, the diskjust sits there spinning, doing nothing.Perhaps the Missing Disk error comesup. Perhaps not.

    Perhaps, as has happened to me withalarming frequency while Ive beenworking on important bits of

    programming, the disk drive gives arather ominous Clunk! In which case,as youve probably guessed, largechunks of the disk have just beenscrawled over by an errant disk head,

    thus leading to pain, anger, nauseaand the entire drive assembly

    pinwheeling its way across the roomto embed itself in a nearby bookshelf.

    Therefore a welcome addition to thefold is the SC_Disk Protector, which

    promises to remove all such causes of

    woe in a generally painless fashion.

    The SC_Disk Protector: Small but perfectly

    formed.

    What causes the common-or-gardendrive hang problem is the fact that theVL1772-02 disk controller chip in theSAM derives its 8MHz clock from theASIC as does the sound chip. Thiswould be all well and good, but forthe fact that while the RESET line islow, the ASIC stops generating the8MHz clock signal. Unfortunately,while the sound chip appears to copequite admirably with this, the diskcontroller doesnt. (Well, the soundchip doesnt cope either, really. Its

    just that you dont notice that its notcoping until you try writing your own

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    12/4012

    ROM routine which turns the soundchip off immediately after a reset, inthe hope of getting rid of thatannoying flat tone which you oftenhear if you reset the machine whileits in the middle of playing somemusic. The sound chip wont responduntil at least a couple of hundredmicroseconds after the reset.)

    The VL1772-02 controller chiprequires clock pulses while its RESETline is held low to initialise its internalcircuitry. Because it doesnt get these,all kinds of weird and unpredictableeffects can occur. Nine times out often, its okay, but its that tenth timewhich is the damaging one.

    Edwin Blink was the person who firstdiscovered this, and he even mentionsit way back in his Def Leppard sampledemo. The solution is to provide anew 8MHz clock signal to the diskcontrollers (and also to the soundchip), and the SC_Disk Protector unitis the board which Edwin designed todo this.

    The SC_Disk Protector arrived here ina large envelope, which contained the

    protector wrapped in bubble-wrap,

    and a sheaf of A4 printed instructionson how to fit the device. The protectorboard itself (see picture above) isquite small about an inch or sosquare and is a piece of veroboardwith a square of sticky-backed foamon the back to fix it inside the SAM.

    It does require some soldering and

    some track cutting to fit this into yourSAM, so you need to kit yourself outwith either a Stanley knife, a scalpel

    or a craft knife, a soldering iron andsome solder. Alternatively, you canget a local electrician or electronicsexpert to help you out with themodification to the circuit board.

    While the instructions are slightlyunclear at some points, there is adiagram included which explains

    perfectly what goes where. The onlything I could wish for is that thediagram were in colour so that itd beeasier to see which wire was which, asthere are three one red, one blue andone green.

    After youve done all the solderingand fitting (which does take a while Id advise you to take your time overit, but it shouldnt take much longerthan twenty minutes to complete), the

    board is affixed to the top of the ASICby peeling off the back of the sticky-backed foam, and pressing it firmlyhome. This ensures that it wont rattleabout it fits in quite neatly, andtheres no stray wires to worry about.

    You only need to buy one of these tofix both of your drives, and we canheartily recommend getting one!

    RATING:

    SUMMARY:Buy one of these and Resetyour machine in complete

    confidence!

    Simon Cooke

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    13/40

    REVIEWS

    13

    The SC_Disk Protector unit in place on one

    of our SAMs. It sits on top of the SAM ASICquite happily, as you can see. There are threewires; two connect to either side of one ofthe power supply decoupling capacitors, theother connects to a via (an electro-platedhole in the board connecting a track on oneside to one on the other) on the 8MHz clockline. (Obscured by the tape in this

    photograph).

    This is one of the modifications which weve made to ourSAMs to cure some of the problems inherent in the

    design of the SAMs power supply. It also cures theproblem of a jittery or unresponsive mouse which someusers have seen. It mainly happened to my (Simon)mouse when I used my old TV with my SAM and itwas quite annoying until we put the modification in. Tofix it, just solder the biggest capacitor you can findacross the Vcc and GND lines. Weve used two and fixedthem in place with tape. The only other way to cure it isto put the regulators inside the SAM rather than in the

    power supply, but thatd mean redesigning the board.Going off the vent slots in the case, it would seem thatthis was the original plan, but it never got done. Oh well.

    Just in case, I put tape over the quartz windowof my HominROM. Not strictly necessary, butthe HominROM is a good investment! (Plug!Plug!)

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    14/4014

    HOW TO BE AHOW TO BE A

    COMPLETE BURSTERDCOMPLETE BURSTERD(or how the Burst Player works - sort of)

    In this article Im going to try toexplain how the Burst Player works.Just in case you havent got a cluewhat the Burst Player is, heres a shorthistory.

    The Burst Player is a very fast routinethat Edwin Blink wrote which allowsfour different samples to be played viathe sound-chip at 7.8kHz under lineinterrupts thus allowing a sequencerto be written very easily. This openedup the possibility of having a SAMMod Player. With a minoradjustment, the samples could also be

    played back at various volume levels.It was at this point that I wrote myfirst Mod Player, which is nothingmore than a sample sequencer. Edwinwas not too happy with the samplequality from the soundchip at 7.8kHzso he designed the do-it-yourselfEDDAC (now commercially availableas the SAMdac). Due to the extra

    resolution at which samples could beplayed back (7 bits per sample asopposed to 4 bits) the mods played

    back sounded even better. Edwincould still see room for improvement,and so he bumped the play-backfrequency up to 10.4kHz. Havingdone that, thinking he had doneenough, he left for Thailand. The rest

    was up to me.

    The early Mod Players (on FRED 41and PRIME 7) used Edwins code forthe soundchip; the EDDAC player (onFRED 52) also used Edwins code,

    but now for the EDDAC/SAMdac. Thecommercial SAM MOD Player uses

    my own code, and it is the workingsof this latest version of the BurstPlayer that I will try to explain.

    Whats the frequencyKenneth?When playing samples it is nice to beable to play them at different speedsso that you can make music, and there

    are two ways of playing a sample at adifferent frequency than its originalone. The first method is to change theamount of time between outputtingtwo consecutive sample bytes. Byincreasing the amount of time

    between outputting new sample data,you decrease the output frequency,and by decreasing the amount of time

    between outputs you increase theoutput frequency. You have to outputall of the bytes of the sample this way.

    The other method is to output samplebytes at fixed intervals. To alter thefrequency of the sample being playedyou simply skip sample bytes or playthe same byte twice. This method

    would, it seems, only allow samplesto be played back at multiples oftwice the original speed, rendering the

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    15/40

    HOW TO BE A COMPLETE BURSTERD

    15

    method useless. You can, however,add 1.5 bytes to the pointer each time.An example should help to clearthings up.

    Method 1

    ld hl,&8000 ;set sample pointerloop: ld a,(hl) ;get sample byte

    out (&E8),a ;output sample bytewait: ld b,&30 ;wait loop

    djnz waitinc hl ;increment sample

    ;pointerjr loop

    Method 2

    ld hl,&8000 ;set sample pointer;(integer part)

    ld e,&00 ;set sample pointer;(fraction part)

    ld bc,&0180 ;set increment (b is;integer, c is

    ;fraction)loop: ld a,(hl) ;get sample byteout (&E8),a ;output sample byteld a,e ;1]add a,c ;1] update fraction;part of sample pointerld e,a ;1]ld a,b ;2]adc a,l ;2]ld l,a ;2] update integer

    ;part of sample pointerjr nc,$+3 ;2]inc h ;2]jr loop

    As you can see in the method 2example above, the sample pointer isnow defined by three bytes - two forthe integer part (register pair hl) andone for the fraction part (register e).The sample pointer can nowtheoretically point to address

    32768.25 (hl=32768,e=0.25*256=64), the content of thisaddress is of course identical to thecontent of the integer part. So now ifwe want to play a sample at 1.5 timesthe original speed then we simply set

    b to 1 (integer part of 1.5 = 1) and c to128 (fraction part = 0.5*256). Themain advantage of this routine is thatwe dont have to set up a dummy loopwhich takes up all the processor time

    but can go and do something moreuseful.

    Now all we need is something whichwill ensure that our output sample

    byte routine is called at a fixed timeinterval. Unfortunately the SAMCoup does not have a programmabletimer interrupt so that we can tell the

    processor to generate say 10400interrupts per second. What we dohave is the line interrupt. The only

    problem with the line interrupt is thatyou can only get one on the screenlines (0 to 191) and not during bordertime. Before going into this problemId like to continue on the moregeneral theme and cover differentvolumes.

    IS THIS LOUD ENOUGH?

    If you want to use samples to createmusic then you will want to be able tochange the volume of the samples.How else would you be able to createechoes or add depth to the piece? Onevery basic solution would be to have anumber of samples all recorded atdifferent volume levels. This wouldtake up large amounts of memory.

    Going along and calculatingeverything real-time would be very

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    16/4016

    time consuming. Consider thefollowing partial example.

    ld a,(hl) ;get sample byteld b,&80 ;multiplier

    ;(&00=0%, &FF=100%)call multiply ;call multiply;routine to get required volumeout (&E8),a ;output sample byte

    ;(with new volume)

    Since multiplying is not one of theZ80s strongest points we will need to

    get around this in another way. Theusual way to get round calculatingstuff real-time is to put it all into atable. Since an 8-bit sample byte canhave 256 (28) different values wellneed 256-byte tables. In the BurstPlayer there are 32 volume tables,each starting at a 256 byte boundary.

    Now the routine looks something like:

    ld d,volume ;d is high byte of;volume table

    loop: ld e,(hl) ;get sample byteld a,(de) ;a is now a sample

    ;byte with volumeout (&E8),a ;output sample byte

    ;(with new volume)

    The contents of the volume table isdependent on the sound device. If weneed to output at 7 bits per channel wewill need the bytes in the volumetable to be in the range [0..127]. For a4 bit per channel device (thesoundchip) the bytes in the volumetable will be in the range [0..15]. With

    the soundchip we actually haveanother problem which is easilysolved by working with volume

    tables. The soundchip volumes are instereo. The highest four nibbles areright, the lowest four nibbles are left.

    Normally we would need to do thefollowing:

    ld d,volume ;d is high byte of;volume table

    loop: ld e,(hl) ;get sample byteld a,(de) ;a is now a sample

    ;byte with volumerlca ;]rlca ;] shift bits for

    ;stereo rightrlca ;]rlca ;]out (&E8),a ;output sample byte

    ;(with new volume)

    However, we can incorporate theseshifts into the volume table. Theminor disadvantage of this is that wecan only have half the amount of

    volume tables in the same amount ofmemory since we will need twovolume tables for each volume level.One table for left stereo and one forright stereo.

    Now that we know what the principlesare behind outputting a sample at avariable frequency and volume we can

    see how we are going to get foursamples pumped out at once.

    Twos company, threes acrowd, fours a hassleFirstly, if you want to output foursamples at once on the SAM the

    biggest problem is how to do this asquickly as possible. Fetching thesamples from memory real-time willnot work unless you make sure thatyou fit all your samples into two

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    17/40

    HOW TO BE A COMPLETE BURSTERD

    17

    pages. By doing this you can haveyour samples paged in all the time however, 32k is not exactly a massiveamount of memory for samples. Wewant more! Using more memory willmean that you will have to page thesample data into the memory-mapevery time you need to read a sample

    byte. If you are fetching sample bytesreal-time youll be spending moretime paging the data in and out thananything else. The whole idea behindthe Burst Player is that it uses two

    buffers of 208 bytes to store thesamples per frame. Why 208 bytes?Well, 208 bytes per frame equals10400 (50*208) bytes per second =10.4khz.

    The two buffers are used alternately.While one buffer is being filled withdata, the data from the other buffer issent out to the sound device. Oncethat buffer is empty, the buffers areswapped round, so that the one that isnow full is used to produce the sound,and the other is filled up with data.What advantage does this have youmay ask. By working in this way youonly have to deal with the sample datafor one channel at a time, rather thanall four channels at once. Therefore

    you only need to page in the rightpage of the sample, transfer the bityou need to the buffer and then do thenext channel until you reach channelfour. Another advantage is that youonly have to set your sample pointer,speed and volume at the start of each208-byte fetch routine.

    What time is love?Now that the basics of the BurstPlayer have been covered we can

    move on to that tricky problemmentioned earlier, timing. Timing is awobbly thing on the SAM. This is dueto memory contention when thescreen is on. For this reason just aboutevery early sample demo turned thescreen off so that there would be nocontention, and thus they would nothave to worry about their samplessounding as if they were underwater.This was until Edwin came up withthe line interrupt sample player (thenotorious Kim Wilde and DefLeppard demos). The whole idea

    behind the line interrupt sampleplayers is that they use the lineinterrupt to generate the requiredtiming pulses without having to worryabout memory contention.

    As I mentioned earlier, line-interruptsare only generated in the graphics areaof the screen display. While the ASICis displaying this area of the screen,the SAMs memory is contended andthe timing consequently goes allwobbly. Fortunately, while thegraphics area is being displayed wecan use the interrupts to ensure thatour sample timing remains accurate.We cant generate interrupts while theASIC is displaying the border, but

    during this time the SAM trots alongat an even pace so we can count onthe processor to keep time.

    The Burst Player therefore starts inthe border (at the bottom of thescreen) using software timing, as soonas it is at the top of the screen,entering the screen area, control is

    passed over to line interrupts to finishthe job.

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    18/4018

    CocktailSince the Burst Player is constantly

    busy, the most logical place to beginexplaining what it does is at the

    beginning of the border area below the

    screen area. The routine needs to fillone of the two buffers with sampledata that is in a suitable form to bedirectly output to the sound devicethat the user has selected. For alldevices except the Quazar thisrequires mixing. One byte contains 8

    bits, and therefore can contain one 8-bit sample. You can fit two 7-bit

    samples into a single byte by simplyadding them up (the eighth bit beingcarried from the addition of the 7-bitnumbers) this is called mixing.When the Burst Player needs to mixtwo channels together it does thefollowing:

    chan.one:ld e,(hl) ;get sample byteld a,(de) ;get sample byte;including volumeld (mix.4+1),a ;put sample;byte in channel four routine

    The sample data is inserted directly

    into the routine of the channel withwhich it needs to be mixed this self-modifying code approach beingquicker than storing the value in aseparate memory location. Theroutine for channel four then lookssomething like this:

    chan.four:ld e,(hl) ;get sample byteld a,(de) ;get sample byte;including volume

    mix.4: add a,0 ;mix channel four ;byte with channel one byteld (buffer.0),a ;put result in ;buffer

    This method is very fast. It has onedisadvantage though, in that all the

    addresses have to be put into the coderesulting in the largish (32k) size ofthe Burst Player.

    The Quazar does not require anymixing to be performed because it hassix 8-bit sample channels and mostmods only require four channels.However, it does need buffers which

    are twice the size of the buffersneeded by the other devices to storethe extra channel data instead of

    putting the result of channel one intothe routine for channel four it puts theresult directly into the proper buffer.

    Repeat, repeat, repeat,repeTo return to the code starting at the

    bottom of the border, the sameinstructions repeat (with differentaddresses) to fill the buffer. After agiven number of instructions a dumpsample to device routine is insertedinto the code so that the outputfrequency remains as close to 10.4kHz as possible. This is a form ofsoftware timing, but since the code isstarted by an interrupt and usessoftware timing during the border areathere is one small problem. When aninterrupt is generated the Z80 finishesthe current instruction cycle and then

    jumps to the interrupt routine. Theproblem is that if the currentinstruction was a NOP then the Z80would respond to the interrupt 4 t-states after it occured, however if itwas an LDI then the Z80 would not be

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    19/40

    HOW TO BE A COMPLETE BURSTERD

    19

    able to respond for 16 t-states. This 12t-state difference can put the timingout of sync, leading to the samplessounding as if they were underwater.To fix this little problem the last usedline interrupt does not pass control

    back to the main code but enablesinterrupts and then does a HALT, thusensuring that the line interrupt whichstarts off the border routine alwaysoccurs at exactly the same position onthe screen for every frame.

    Once the TV scan line has passed theborder area at the top of the screen thebuffer is filled and control can bepassed back to the main program.Line interrupts are set up to play backthe rest of the first buffer through thescreen area. This goes on until the TVscan line reaches the line above the

    bottom border (line 191) and then thebuffers are switched over and thewhole process repeats.

    Humpty DumptyIts all very well talking about timing,line interrupts, volume tables etc., butwhat about actually outputting thesample data itself? The Burst Playercan dump samples to six differentdevices (Colour Look Up Table

    [CLUT], Soundchip, SAMdac, DAC,Blue Alpha Sampler and QuazarSurround) and therefore needs sixdifferent output routines. Sure, theCLUT is not exactly your ideal sounddevice (for one thing, you cantactually hear what youre playingthrough it) but it is useful in that itgives you an idea of what is going on

    in the output stage. For all of theoutput routines the alternate register

    pairs BC and DE are set to certain

    values and HL points to the positionin the buffer. Each dump to an outputdevice does not affect the contents ofthe constant registers.

    First up on the catwalk is the rathersilent CLUT routine:

    ;BC = 248 (CLUT port, pen 0);DE = &1734 (the two colours for thestripes, blue and purple)

    sd.clut:out (c),e ; set first control stripe

    ;(purple)inc b ; an OUTI first does a

    ;DEC Bouti ; (DEC B) send out

    ;dataout (c),d ; set second control

    ;stripe (blue)inc b ; since OUTI first

    ;DECs Bouti ; (DEC B) send out

    ;data

    Now on to the bit which all SAMusers can use (except for those withknackered SAA1099s I managed todo this to mine with a faulty scartcable):

    ;BC = &1FF (soundchip register select,;255 = soundchip data);DE = &0205 (&02 = volume channeltwo,;&05 = volume channel five);to initialise soundchip for sample;playback:;- clear all registers;- turn on the chip (28,1);- set envelope generators 1 and 2 to a

    ;sustained waveform (24,130; 25,130);- be polite and set volume 2 and 5 to the;silence volume level (usually;%10001000)

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    20/4020

    sd.saa:out (c),e ; select channel fiveouti ; (dec b) output datainc b ; reselect register control

    out (c),d ; select channel twoouti ; (dec b) output datainc b ; reselect register control

    For the oh so sexy SAMdac (availablefor 25 nudge nudge, wink wink)the following routine comes rolling in:

    ;BC=232 (printer port 1) or 234 (printerport 2);DE=&0001 (strobe selects)

    sd.samdac:outi ;(dec b) output

    ;sample byteinc c ;select strobe portout (c),e ;select channel 1dec c ;select data port

    outi ;(dec b) output;sample byte

    inc c ;select strobe portout (c),d ;select channel 0dec c ;select data port

    For the people who soldered togethera basic printer DAC the followingroutine is used:

    ;BC=232 (printer port 1) or 234 (printer;port 2)sd.dac:

    ld e,a ;store the A register ;(EXX is used for interrupt)ld a,(hl) ;get sample byte 1 in Ainc hladd (hl) ;mix sample byte 2 into

    ;Ainc hlout (c),a ;output sample byteld a,e ;restore the A register

    The routine for the Blue AlphaSampler is identical to the printerDAC routine except that the BlueAlpha Sampler needs to be initialisedto play-back the samples and theoutput port is different:

    ;BC=&7CFE (data port of Blue Alpha;Sampler). To initialise the Blue AlphaSampler for sample playback:;- OUT &FEFE,&FF;- OUT &7DFE,&FD

    sd.bas: ;identical to sd.dac

    Finally, the Quazar SurroundSoundcard uses the following routine:

    ;BC=&06D0 (output port);DE=&0006 (store to reset B);To initialise the Quazar, IN &06D0 to set;to mode 1 (6x8-bit mode)

    sd.qss:ld b,e ;reset the B register for the

    ;output portouti ;(dec b) output sample

    ;channel 3outi ;(dec b) output sample

    ;channel 2outi ;(dec b) output sample

    ;channel 1

    outi ;(dec b) output sample;channel 0

    Phew, that covers that. If you look atthe different output routines carefullythen you should notice something oddabout the Quazar output routine. TheQuazar outputs four bytes from the

    buffer each time it is used, whereasthe other routines only output (or use)two bytes. The reason for this is that

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    21/40

    HOW TO BE A COMPLETE BURSTERD

    21

    the Quazar is the only output devicewhich allows you to output 8-bitsamples. All of the other devices canoutput a maximum of seven bits perchannel (even though some deviceshave 8-bit outputs, we still need tocombine some channels together sothat you can hear them all!). Bymixing two seven bit samples togetheryou can store the sample data in halfthe space that the Quazar needs tostore all four of its samples.

    EncoreThat covers that. I hope you now havea vague idea of how the Burst Playerworks. If you didnt understand any ofit, dont worry as its not exactly the

    easiest piece of code in the world tofollow. For those of you who didunderstand it, and who are actuallyslightly into sample routinesthemselves, how about incorporatingsupport for the other sound devices aswell (and not just the soundchip)?

    Now how about somebody writing some more cool sample demos, based on an idearead about in.........?

    Stefan Drissen

    Limited stocks so dont delay!*

    SAM MOD player version 2.04 Output frequency of10.4kHz (with screen on!)

    play Amiga MODs on your SAM via the soundchip, SAMdac, printer dac, Blue Alpha Sampleror Quazar.

    ALL Protracker commands implemented so you can hear your MODs how they were meant tobe heard! (even BPM changes and the Extended effects are implemented)

    Load MODs directly from PC or SAM discs (the file selector also only shows MOD files soyou dont need to wade through the directory looking for that MOD file - handy for FREDdiscs!).

    COMET source file showing you how to use MODs in your own code!

    All this foronly FIVE pounds cash (or Eurocheque for 12.50 dutch guilders). For an extra 5(etc) you also get the FULL COMET SOURCE!!!

    SAMdac play MODs at 7 bits per channel in stereo! (8 times the soundchips quality - half the quality

    of the Quazar).

    connects to your printer interface and audio out port (interface has a built-in through port).

    FREE copy of the latest version of the SAM MOD player!

    Sick of listening to your SAMs feeble attempts at reproducing Amiga MODs but not prepared toshell out for the Quazar? Then the SAMdac is the answer for you, priced at only 25 cash (or aEurocheque for 65 dutch guilders).

    BOTH products are available from:Stefan Drissen, Zevende Herven 6, 5232 JZ s-Hertogenbosch, The Netherlands.Eurocheques payable to Stefan Drissen.

    * fortunately stocks are not limited - it sounds spectacular though doesnt it?

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    22/4022

    Of Mice and MenThe SAM Mouse Interface Explained

    Its unfortunate really. The SAMCo mouse came out near the beginningof 1991, yet hardly any software actually uses it. Like a good proportion

    of the SAM hardware that has come along, programmers

    documentation has been thin on the ground. This has led to a few

    problems.

    Most SAM software today doesnt usethe mouse even though in some

    cases, it would be ideal for the job athand. Its a shame some peoplewould at least like the option. So, inour (decidedly less than) infinitewisdom, weve reverse engineered themouse interface itself, and properlydocumented this wee beastie well,at least we hope we have.

    Were going to take it from a softwarepoint of view first, and then next issuewell get into the nitty-gritty andexplain how the hardware works. Wemight even come up with a circuit thatenables you to use a PC serial mousein the SAM mouse socket. This will

    probably involve the use of a PICcontroller, which should cut down

    component count considerably. Ivealready had a PC mouse working onmy SAM through the Commsinterface (albeit a little jerkily due tothe basic see if it works pointerroutine I was using), so even if wedont get it working that way, thereare still other methods available to us.

    Archaic ArtefactsThe mouse is read in a similar fashionto the keyboard, using port &FFFE.

    In the technical manual, this isreferred to as the RDMSELport. The

    only other mention the manual makesof the mouse is that bit 1 of the ASICinterrupt status register refers to themouse interrupt. This is an error, leftin the manual from a very early stageof the SAMs design. That bit of thestatus port should actually refer to anexternal or Comms interrupt, and Ive

    been using it extensively in my own

    terminal software. To do so requires asmall mod to the board no problem!

    The meaning of lifeYou may be wondering why themouse interface is so big. This is

    because its purpose in life is to decodepulses from an Atari ST style mouse,and to translate them into a form that

    can be easily read from the SAMsmouse port. Originally, the plan wasfor MGT to produce their own mouse,with a tiny ASIC inside. Alas, thisdidnt happen, so were stuck with the

    big box.

    All you need to know at this stage isthat the interface keeps track of how

    far the mouse has moved since youlast read the data from it. Next issue

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    23/40

    OF MICE AND MEN

    23

    well actually go into the mechanics

    of the interface.

    Talk to the animalsThis is where you get to be your own

    personal version of Dr. Dolittle. Whenthe mouse wants to transfer data to theSAM (when you read RDMSEL, forexample), it puts the information onthe lower four bits of the bus. If youwant to read the data back, this willmean a little bit of rotating, but nevermind thats the easy part.

    The output format of the mouse datacan be seen in Table 1. Its quitesimple really. To read the mouse, thefirst thing you must do is strobe it all this involves is reading the portonce. Then you can start actually

    bringing in the mouse data (but dontforget to mask it with &0F to get ridof the upper bits!).

    The first value that you get is adummy one. This apparently uselessdata is actually quite important itallows you to check if the cursor keyshave been pressed. If they are, youwont get a value of &0Ffor thedummy byte, and you can delay

    reading the mouse until they have

    been released. This ensures that thedata you read wont be garbled.

    The next thing to do is to read themouse port eight times, and store thedata in an 8 byte long buffer. You

    cannot take any longer than ~30sbetween each read of the mouse,otherwise the mouse will reset its

    internal counters, and youll be backwhere you started. If you usesomething along the lines of the code

    below, you should have no problemswith timing.

    Mouse Reading Routine*

    :

    rd.mouse:

    LD BC,&FFFELD HL,mouse.dataLD DE,&060FIN A,(C) ; strobe mouseIN A,(C) ; read first data byteAND E ; mask off upper bitsCP E ; check if its equal to

    ; &0FRET NZ ; if not, we abort

    *This routine is loosely based on the mousedriver provided with the mouse itself, whichwas written by Dr. Andy Wright.

    3 2 1 0

    Dummy data 1 1 1 1

    Button status /BUT4 /BUT3 /BUT2 /BUT1

    Y256 Y800 Y400 Y200 Y100

    Y16 Y080 Y040 Y020 Y010

    Y1 Y008 Y004 Y002 Y001X256 X800 X400 X200 X100

    X16 X080 X040 X020 X010

    X1 X008 X004 X002 X001

    Dummy data 1 1 1 1

    Table 1: SAM mouse data format.

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    24/4024

    rdloop:LD (HL),A ; store in data areaINC HLIN A,(C) ; read a new byteAND E ; mask it offDEC D ; have we finished?

    JR NZ,rdloop ; if not, loop.

    LD (HL),A ; store last data byte

    The more astute of you will have seenthat there are some easy ways ofoptimising this routine forexample, if the 8 byte data area whichHL points to is inside a 256-byte page(ie you can write to every byte in the

    buffer by changing only the bottom 8bits of its address in other words, bychanging the L register), you can useINC L instead of INC HL.

    If you look at Table 1, you could alsodiscard the last byte of data read fromthe mouse, as its a dummy byte. Itsnot really supposed to be a data byteat all the final read is actuallynecessary to reset all of the mouseinterfaces internal counters to zero.Therefore if you wanted to, you couldreduce the data buffer to 7 bytes, andget rid of that final LD (HL),A.

    Another optimisation could be madeby not storing the initial dummy byte,though that might expand the routinea little it would still give you anextra byte free in the systems variablearea if you needed one. All of thesespeed-ups are left as an exercise forthe reader.

    Where is it then?The next thing to do is to actuallydecode the data. How youve read in

    the data, and which optimisationsyouve made will decide how youhave to decode some of the data. The

    button data doesnt need decoding,and you can even read it directly fromthe buffer area to save space (itll holdvalid data as long as the mouse is

    plugged in). If a bit is reset, then thatbutton on the mouse has beendepressed. On a two button mouse, theleft button corresponds to bit 0, theright button corresponds to bit 2. On athree button mouse, bit 1 correspondsto the middle one but these aremuch rarer.

    Most mouse routines ignore the upperX and Y nybbles a pity, because ifBruce had known this from the starthe could have removed a couple ofcounter chips from the board andmade the interface that little bitcheaper. Theres nothing to stop youfrom using them though and theyshould provide a little more leeway ifyou use the mouse for controlling agame. In this article though, forsimplicity well ignore them.

    Decoding the X and Y data:

    maxy: EQU 191 ; this is the lowest;we allow the mouse to go

    decodexy:LD HL,mouse.data+3; HL now points to the Y16; data byte.LD A,(HL) ; A = Y16INC HLLD E,(HL) ; E = Y1ADD A,AADD A,AADD A,A

    ADD A,A ; A = A*16OR E ; combine with Y1LD E,A

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    25/40

    OF MICE AND MEN

    25

    LD A,(Ycoord); get current Y coordinate; (between 0 and 191)BIT 7,E ; see if were

    ; subtracting.JR NZ,msysub ; jump if we are.

    If weve got to this point, wereadding a value between 0 and 127 tothe Y coordinate.

    msyadd: ADD A,E ; add offset to current;Y coordinate.

    JR C,hit.bottom; if Y has overflowed, fix it

    CP maxy+1JR C,yokay; jump if weve got a valid Y.

    If weve made it to this point, thevalue weve worked out for our Y

    coordinate has either overflowed (ie itwould have been greater than 255), orits greater than the value weve givenmaxy, so we need to give our Ycoordinate a valid value. In this case,we use maxy, so that if it reaches the

    bottom of the screen, the pointer willstop as if it has hit a wall.

    hit.bottom:LD A,maxyJR yokay

    ; If were here, were subtracting our; offset from the Y coordinate.msysub: ADD A,E

    JR NC,yokay ; no underflowXOR A ; set A to zero top

    ; of the screen.

    yokay: LD (Ycoord),A ; Store our; new Y coordinate.

    INC HLINC HL ; skip the X256 byteLD A,(HL) ; A = X16INC HLLD E,(HL) ; E = X1ADD A,A

    ADD A,AADD A,AADD A,AOR ELD E,A ; E holds X offset.LD A,(Xcoord) ; get our; current X coordinate

    BIT 7,EJR NZ,msxsub ; again, check

    ; whether were subtracting or; not.

    msxadd: ADD A,E ; add offsetJR NC,xokay ; X hasnt

    ; overflowed.LD A,&FF;set X to the highest possible;coordinate if we hit the edgeJR xokay ; set X coordinate.

    msxsub: ADD A,E ; add offsetJR C,xokay

    XOR A ; X underflowed; so we fix it

    xokay:LD (Xcoord),A

    As youll have noticed with the aboveroutine, you need two bytes to storethe coordinates in Xcoord andYcoord. You should set these to zero(or any other initial coordinate youdesire) before you read the mouse forthe first time. Other things to note arethat the range of the X coordinate is

    between 0 and 255, and that the range

    of the Y coordinate is between 0 and191, with 191 being the bottom of thescreen, and Y being the top (ie its

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    26/4026

    upside-down compared to BASIC orvice versa, as most programmerswould argue).

    Build a better mousetrap

    Have a hack at the ROM source, oralternatively, buy it from Dr. AndyWright* , and examine the sectioncontaining the Frame interrupthandling routines. Youll notice that ifthere is no mouse routine installed,the ROM reads the mouse port ninetimes, before going on to do thekeyboard scanning. This ordering is

    important, as it ensures that you arereading the keyboard when you thinkyou are.

    Arguably you should be able to readthe mouse, and then the cursor keys,all from the same port. Unfortunately,this is impossible at least it is withthe SAMs current design. Holding

    down the cursor keys or the Controlkey will interfere with the mousereading process. This wont disruptthe mouse data you just abort the

    process if you notice that the dummybyte isnt &0F as youd normallyexpect it to be.

    What it does mean though, is that

    holding down control while using themouse wont work, so thats onefamiliar GUI interface trick that youcant use on the SAM. You could usethe EDIT key as a substitute if youwanted, or perhaps one of the SHIFTkeys. Its up to you.

    *The ROM source is available from BetaSoft,

    price 15. See the Contacts section at the endof the mag.

    What if youve not got one?There is a way to tell if the mouse is

    plugged in or not, and the way Imgoing to do it here is much easier thanways Ive done it in the past.

    Using a standard mouse driver (likethe one above), you could, forinstance, read the mouse, (which willclear the offset registers), and thenimmediately read it again. Check anyof the coordinate bytes if theyre notzero, you can assume that there is nomouse plugged in. (This relies, of

    course, on no keys being pressed, andthat youre not moving the mousereally quickly while youre checking which most people wont be).

    The other way to do it is this shortroutine which I came up with afterreverse engineering the mouseinterface.

    Check for mouse pr esence:;Returns Z if mouse present, NZ if notchk4mse:

    LD BC,&FFFELD DE,&0B0FIN A,(C)IN A,(C)AND ECP E

    RET NZchkmsel:IN A,(C)DEC DJR NZ,chkmselAND ERET

    Next issue: How the

    mouse hardware actuallyworks.

    Simon Cooke.

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    27/40

    IS THERE ANYBODY OUT THERE?

    27

    Is There Anybody Out

    There?Dave Whitmore recently announced the creation of a brand new, SAMorientated bulletin board system the Dalmation BBS. We decided to

    get the low-down directly from its source so heres Dave to tell you

    what its all about

    There is a new BBS for SAM users!

    Errm just one snag you might bethinking of namely that the SAMdoesnt have any comms capabilityyet.

    One day soon, though we arent surewhen, software and comms interfacesthat allow the useofoff the shelf

    modems may beavailable. This,along with

    proposed harddrives willrevolutioniseeveryones

    perception of the SAM.

    It will also mean that developers andenthusiasts will be able tocommunicate much faster andgenerally get things done quicker. Forexample, we all know how frustratingit can be to wait for letters and disksto arrive in the post

    But for now, if youre already using amodem with your PC, Amiga or ST,then theres good news. TheDalmation Bulletin Board Service

    will provide a choice of PD software,message bases, lots of other things too

    numerous to list mention (includingones we havent thought of yet). Tomake things even more interesting,there will be small machine-specificareas too.

    Well listen to what members wantfrom the servicetoo. Were open to

    all ideas andsuggestions. Co-sysop status is alsoavailable for theserious enthusiast.(Eeek... I appearto have been made

    co-sysop all of a sudden I must be aserious enthusiast!!! Cookie)

    Whats on-line?Before I answer that, let me point outthat there are NO RATIOS on thisBBS. This means that you dont haveto upload software in order todownload software. Uploads willalways be very welcome, and aregenerally encouraged, but theyre notstrictly necessary.

    Wher e it all happens on t he Dalmation BBS

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    28/4028

    Full instructions on how to unarchiveand transfer files to SAM disks will beavailable from the BBS.

    To be able to transfer SAM softwarebetween machines, you will need towork with PC (720k) disks. There areutilities that will help with thetransfer. KE Disk is widely availablewithin the SAM PD scene.Commercial utilities such as PC_Suiteare also recommended (though notessential). Many BBSs carry largesections of Spectrum Snapshots foruse with Amigas and PCs. This willnot be one of them, but we may offerSAM 128k Conversions (subject tolegality!)

    We must stress that this system is inits infancy. To start with this will be aclosed system, with local access only.In future we may branch out and linkup to networks such as Fidonet, butuntil there is a sufficient user base,were going to keep the BBS localonly.

    So whens i t on-line then?It sounds bad when anyone says that aBBS is only available on one day aweek, but to start off with, thats how

    its going to be. The BBS will havestrict opening hours and initially beavailable on Saturdays, from 12 noonuntil 12 midnight.

    Depending on the success of the BBS,the opening hours may be extended toSundays, or even the complete 48hours BT weekend rate period. Afterthat, who knows?

    Sessions on the BBS can always bearranged in advance, by voice phoningthe Sysop on the same number as theBBS at any other time. Dont forget,youll get a voice answer outsidethese hours.

    Are we mad or what?Okay, all of this might soundeccentric, but come on most of usmake the pilgrimage to QuedgeleyVillage Hall twice a year! If thats not

    eccentric, I dont know what is!

    I look forward to seeing you on the

    BBS. The number is: 01744 614150

    Dave Whitmore(Sysop,Dalmation BBS)

    The SAM Coup files area lovely eh?

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    29/40

    SUBSCRIPTIONS

    29

    THREE reasons why you should subscribe to

    Its Cheaper!To buy each issue separately costs 2.00 x 4 = 8.00

    To buy a years subscription (four issues) costs only6.00 an

    amazing saving of 2.00!

    Less Anxiety!We send out your copy of the mag as soon as it comes back from the

    printers no more wondering Is the latest issue out yet? youllknow because it will pop through your letter box as soon as we can

    possibly get it to you!

    Guaranteed: No Macauly Caulkin!No matter what depths we end up stooping to, we can guaranteethat your pristine and shiny fresh-from-the-printers copy of

    will never have Macauly Caulkin in it. Except possibly

    when we really want to have a dig at him. Recycled YS Jokes Inc.

    To subscribe to all you need to do is send your

    name and address, with a cheque for 6.00 made payable to M.Rookyard, to the address below. Subscription wrangler

    extraordinaire Maria Rookyard will take your details and ensure thatyou receive your very own pristine copy of the latest issue of

    with a minimum of fuss and effort on your part, as soon

    as is possible. Please state which issue you want your subscription tostart with in your covering letter.

    1 Dovey Close, Astley,Tyldesley, Manchester,M29 7NP

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    30/4030

    SAM Gets WiredThe SAM, believe it or not, does actually have quite a large Internet

    presence take the SAM Users Mailing List for example, whose

    subscribers include Stefan Drissen, Allan Skillman, Ian Collier. EvenFRED boss Colin MacDonald makes the occasional appearance

    Ill let you into a little secret Iveeven sent emails using my SAM soit is possible, and Ive written thesoftware to do it. But thats not whatthis article is about. No, the purposeof this is to let you into the big secret

    ie how to actually access this mineof information. Its not that difficultreally, and seasoned Internet proswill be wondering why on Earth Immaking such a fuss of it all.

    So, assuming that you know how toaccess all of the facilities which Imabout to mention (and that you have a

    basic knowledge of how the Internetworks* ), lets see whats out there.

    EmailOn the email side of things theresonly really one place to go andthats the SAM Users Mailing List.Averaging at least a couple of

    postings a day, the chat at times has

    varied from the technical (from ROMbugs, to new Hard-Drivespecifications, to whether or not Unixcould be done on the SAM), to thesilly (why FRED is called FRED, andnot, say, FREDSoft), to the sublimeand its quite easy to access too.

    *And if not, why not try getting hold of a copyof Net User issue 5, from Paragon Publishing,which holds the decidedly trimmed version ofmy Student Guide to the Internet its still allvalid stuff even if youre not a student!

    Plenty of people are on there (at lastcount about forty or so SAM users alltold though theres only usuallyabout 12 active participants on thelist), including Colin Piggot and BrianGaff, so its great fun! Kind of like

    one of those Chat Line thingies,except its text based, and much,much more interesting

    To sign up, all you need to do is sendan email to [email protected], with subscribe as the actualtext of your email. If you really

    wanted to find out which other SAMusers are on the list, you could stick alist command just below yoursubscribe details.

    To actually send any messages, youjust mail them off to [email protected]. Easy as piereally.

    FTPThe FTP presence of the SAM is

    pretty similar to its Email presence not surprising really, when youconsider that the SAM Internet filearchive is held on the same machinethat handles the mailing list. You canaccess it by FTPing to

    ftp.nvg.unit.no, and looking in the/pub/sam-coupe/ directory.Interesting places to check out include

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    31/40

    SAM GETS WIRED

    31

    the demos/Entropy section for somebits and bobs that Ive put up there, aswell as the incoming directory for allthe latest software that people haveuploaded.

    Please Note: We all know thatpiracy could kill of the SAM if itever reached the levels that you canfind on other machines. The guys at

    NVG are pretty strict about it, sodont upload any software wherethe copyright situation is unclear,or where youd be breachingcopyright that is, where youd be

    pirating the software. This has been

    a public-service announcement

    World-Wide WebThe SAM is out there on the World-Wide Web, (to prove it, theres acouple of piccies from our site at thetop of this page), and in quite anumber of places too The best thingthat I can probably do is to just spoon-

    feed you a couple of addresses, sotheres a box around here with themin

    The Web presence of the SAM issteadily increasing, and theres a fewEntropy members with home pages

    out there (Geoff Winkless forexample) and theres alwaysthe Speccy pages to sample andsavour if you feel a littlenostalgic.

    TelnetOne of my favourite places tololl around on during the day

    when I should probably be doingsome work is Monochrome BBS. Andnope, you dont need a phone-line toaccess it. This BBS is actually on theInternet, and while it doesnt have aSAM specific area, it does have aquite well-stocked Spectrum one. Imon there as Spectecj (I used to be onas Spectecjr, but the user-names gottruncated, and I never changedmine Im just too sentimental, Iguess), Tim Paveley (of Sad Snail

    Heres a couple of SAM based

    web pages to be precise the

    Based On An Idea home page,

    and the SAM Coup Info Base,

    which links off to a few other

    SAM related sites.

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    32/4032

    Productions) is on asUnc, and theres someother SAM users on theretoo but for the life ofme I cant remember whothey are.

    You can findMonochrome bytelnetting to mono.org,which will give you a listof machines you can login on pick one andtelnet to it, then to get tothe BBS, login as monoat the prompt.

    The End?Thats it for the moment,and no doubt things willhot up in the months tocome as more and moreSAM users learn to use

    the comms facilities oftheir machines. Next ish, Ill probablybe bringing you news of the debatesfrom the SAM Users Mailing List, forthose of you who arent in the thick ofit already. And I may even serialisesome of it on the cover disk, with asmall reader program, so that you can

    catch up on what you might havemissed.

    Simon Cooke(Email:[email protected], or on

    Fidonet, Im Simon Cooke at

    2:250/124.2)

    SAM On The World Wide WebSAM On The World Wide WebThe SAM Coup Info-Base

    http://jumper.mcc.ac.uk/~simonc/samcoupeBased On An Idea

    http://jumper.mcc.ac.uk/~simonc/boaiColin Piggotts Quazar Sur round Info Page

    http://www.st-and.ac.uk/~www_socs/virtual/cgp/quazar/qintro.htmlTim Paveleys SAM Coup Scrap-Book

    http://www.soton.ac.uk/~tsp93ma/Coupe/Allan Skillmans Xcoupe page

    http://www.hep.ucl.ac.uk/~ajs/xcoupe/

    SAM On The Internet InSAM On The Internet In

    GeneralGeneralTelnet:

    You could do much worse than try out the

    Monochrome BBS speccy system on mono.org

    Email:

    To subscribe to the SAM Users Mailing List, sendan email to [email protected],with the text of your email something like:subscr ibe

    FTP:

    The SAM FTP file archive may be found onftp.nvg.unit.no login as anonymous, with youremail address as the password. Youll find mostof the files in the /pub/sam-coupe/ directory and you can upload new material to the site (aslong as its not going to cause any copyright

    problems) into the incoming directory.

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    33/40

    A HIGH SPEED SAM?

    33

    A High Speed SAM?Fact or Fiction?

    I probably don' t have to tell you tha t todays world has been invaded by

    the IBM PC and its clones. I must admit that I design all my circuit

    boards using a 286 laptop, but that's mainly because the SAM does not

    have any software to cover this field of work.

    The other thing the SAM is laggingbehind with these days is executionspeed - no I'm not criticising it, I'm

    just comparing. Bruce did an excellentjob on the SAM when you consider itscost price against its features, such asgraphics resolutions, RAM, midi etc.In fact he actually caused me aheadache when building theMultiROM because his designs are sothorough, well thought out andcorrectly designed.

    A lot of the housekeeping functionssuch as screen display are carried out

    by the ASIC. Inside the SAM theZ80B processor and the ASIC worktogether with the processor staying instep with the ASIC by the latterissuing WAIT states to the CPU. Asthe SAMs video memory is actually

    part of the general program memory,the ASIC has to commandeer thememory while it grabs video data. Thehighest priority access is given to thevideo, otherwise the display wouldeither jump and break up or wouldhave multi-coloured snow specs everytime the RAM was accessed. Hencethe ASIC can only allow the CPU to

    access the RAM during screenblanking or when it has read andstored enough bytes to be able to

    release the RAM. During this time thedisplay is continued using the stored

    bytes during one of its video data

    grabbing bursts; this is known aspipelining.

    The result of all this contention is thatthe SAM runs at a reduced effectiveexecution speed. Even so the SAMworks pretty quickly when runningmost programs.

    Those of you who were able to attendthe FORMAT SAM & Spectrumshow in October, would quite

    probably have seen a SAM with achunk of Vero board, containing amass of wires and ICs, plugged in the

    back. This was the "lets prove anaccelerator can work in principle"

    prototype and it did make most

    software run much faster. The mainproblem was that the external Z80Cwas not always responding to waitstates correctly and hence wasupsetting the screen display. I'm stillworking on the problems with the aidof my trusty oscilloscope.

    Which processor?

    Okay! Lets assume that we canovercome the problems of using a

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    34/4034

    high-speed processor, what could wereplace it with? The main attributeswhich the new processor should haveare a higher clock speed capability,obviously, and code compatibility.This code compatibility does notnecessarily mean another Z80

    processor as a high-speed processorfrom an entirely different family could

    be used to run a Z80 emulator.Emulators have an unavoidablesoftware overhead (once the softwarehas been written) which reduces itseffective operating speed. A Spectrumemulator running on an expensive(100 approx) 486 processor givesonly about a 50% speed increase eventhough the processor is running 6times faster. We have been lookingseriously at using an ARM710 RISC

    processor to run an emulator but ...

    Hence the only other option is to use aZ80 code compatible high speed

    processor. There are two processorswhich fill this requirement; the first isthe Z80H which runs at up to 20MHz

    but is virtually unobtainable. Thesecond is the Zilog Z380 which isavailable at present in an 18MHz

    version with 25 MHz and 40 MHzversions mentioned in the technicaldocs which should be available in the

    nearish future. The nice part about theZ380 is that it is not much different in

    price from the Z80H.

    What do we know about

    this stranger?

    The remainder of this article is notabout how to get this processor towork with the SAM, that might becovered in a later issue, but it is aboutthe Z380s features and functions;what it will and won't do. I mustadmit that I have all but fallen in love

    with the Z380 after having siftedthrough the technical specs of severalprocessors over the last few months;all this with a view to designing and

    building Simon Cooke's acceleratorboard. I shall go through each featurein turn, starting with the main pointsand working down to the more obtuse.

    The first and most important feature isits Z80 code compatibility, whichmeans that any code written on theSAM will work okay with the Z380,

    provided that the only undocumentedop-codes used are the IX and IYregister based codes. All the originalZ80 op codes work in an identicalfashion on the Z380.

    If the op codes are compatible then itfollows that the register architecturemust also be the same. The onlyexception is that the R register is notincremented on every memoryrefresh. It is included to allow the LDR,A and LD A,R instructions to work,

    but the R register now acts as a

    general purpose 8 bit read/writeregister.

    This is the wee beastie. More legs

    than a caterp illar on steroids

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    35/40

    A HIGH SPEED SAM?

    35

    Memory access - wellll, what can Isay other than WOW! The Z380 has acontiguous memory block of a mere 4Gigabytes, all accessible.Unfortunately the SAM was designedto fit 512K into a 64K address space

    by using 32 x 16K pages. Theaccelerator would be forced to followthis setup, for compatibility, andcontinue to page 512K into the bottom64K of the 4 Gigabyte address space.However, all is not lost as the wholeaddress space can still be accessed byusing some more specialized newinstructions. One of the functions ofthe ASIC is to multiplex the Z80s 16

    bit address bus into a form required bythe DRAMs. The Z380 has threeoutputs which become active during amemory access; these can be used to

    provide the RAS and CAS timings forthe multiplexers.

    Another aspect of the memory is thatit can be either 8 bits or 16 bits wide.This makes life a lot easier whenreading or writing 16 bit values as itreduces the execution times andsimplifies the program structure. If,however, you try to do a 16 bit wideread from or write to 8 bit wide RAM,the Z380 will store half the bits then

    insert an additional read/write cyclefor the remaining 8 bits.

    The I/O capabilities are veryinteresting. The processor can slowdown its operation during an I/O reador write by a software definablefactor; this allows interfaces ofdifferent speeds to be used together on

    the same system. The I/O is split intointernal and external ports, the formerbeing used to access special control

    registers within the Z380. Theseregisters control functions such asclock prescale, refresh rate, I/Oheartbeat rate, register selection, 64Kor extended addressing and more. Theexternal I/O address space is 4Gigabytes with three types of accessavailable. The first two of these arethe same as the Z80 using the A or BCregisters to provide the addresses andthe third works in a similar way butwith a full 32 bit address. The datatransfers can again be either 8 or 16

    bits wide.

    The interrupt system is identical to theZ80s as far as the NMI and interruptmodes are concerned. The difference,however, is that the INT input has

    been renamed INT0 and three newinterrupt inputs INT1, INT2 and INT3have been added. Only INT0 iscapable of maintaining the threeinterrupt modes selected byinstructions IM0, IM1 and IM2; theother three operate using vectors -more details later.

    The register sets have been extendedsubstantially. The BC, DE, HL, IXand IY have been doubled in length to32 bits each; the extra 16 bits are

    referred to as BCz, DEz, HLz, IXzand Iyz respectively. The Z380 hasfour complete sets of registers,including the alternate registers, ofwhich one set can be accessed at atime. There are also four sets of A, A',F and F' registers, one for each bankof main registers. The Accumulator isstill only 8 bits wide but 16 and 32 bit

    accumulator functions can be takencare of by using the HL and HLzregisters. These features not only

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    36/4036

    speed programs up by virtue ofallowing double width arithmeticoperations but also a frequently calledroutine can be assigned a set ofregisters which it uses exclusively.This does away with the need toPUSH and POP the registers to thestack on entry or exit to the routine, asyou simply switch to a different set ofregisters. The IX and IY registers areslightly different to the other registersin that they are selected independentlyof the main register banks and of eachother.

    The I register has also been extendedby 16 bits to 24 bits to allow theinterrupt vector to operate over thefull address range. The ProgramCounter PC is 32 bits wide but thiscan be restricted by using the Z380 inwhat is called native mode. Thiseffectively restricts the PC to 16 bits(ie 64K ) and address 0000FFFF hexoverflows to 00000000 (as with theZ80) as opposed to 00010000 hex.The Stack pointer is also 32 bits wide;the extension to SP is called,surprisingly, SPz just like the mainregisters and PC is extended byregister PCz.

    The Z380 has a range of internalcontrol registers which allow thesoftware to specify various

    parameters. Most of these are used tosetup various hardware configurationssuch as RAM/ROM access times andrefresh rate, I/O peripheral clockspeed and other miscellaneousfunctions.

    The refresh system for DRAM nolonger uses the R register but relies on

    the internal refresh counters built intomost modern DRAMs. The refreshrequest rate can be determined as

    between 4 and 4096 bus clock periodsin steps of four (ie n X 4) while eachrefresh request consists of between 1and 64 refresh transactions. If anyrefresh requests have been missed iedue to a bus request then the numbermissed is counted (up to 255) andwhen bus control is restored, themissing refreshes are generated. Therefresh uses the CAS before RASmethod as the Z380 is capable ofgenerating these signals direct withvery little external logic.

    I have tried to keep this to the mainfeatures and not get too involved inthe intricacies of the processor. Ziloghave described the processor far betterthan I could and have filled two entiremanuals in doing so. If an accelerator

    board is built using the Z380 then wewill run a series of both hardware andsoftware articles giving the real nitty-gritty stuff.

    Now the most important feature aboutthe Z380 is that they do actually exist.I have found a supplier and have twoZ380s in a small antistatic box in my

    workshop. The only problem is thatthey are surface mount technology inthe form of a 100 pin QFP (Quad FlatPack) package and through holesockets are expensive.

    Next issue I shall give an outline ofhow the SAM Accelerator will work.

    Till then, I wish you an empty bitbucket!

    Martin Rookyard

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    37/40

    CONTACTS

    37

    All postal addresses are in the UK unless otherwise noted, as are all phone numbers. If youre

    dialling from outside the UK, dial your international dialling code, followed by 44, then theUK number (minus the leading zero). And dont forget to send an SAE with your

    correspondence if you want a reply.

    Software

    Atomik Software, * Dept.BOAI, 20 Grove Road,Hoylake, Wirral,Merseyside, L47 2DTB.G. Services,* 64Roebuck Road,

    Chessington, Surrey, KT91JX (please write all letters/ orders clearly) ( (0181)2874180Elysium Software (SAMAdventures), * 50Chadswell Hgts, Lichfield,Staffs, WS13 6BHF9 Software,* 18 MillLane, Glenburn Rd,Skelmersdale, Lancs, WN8

    8RH ( (01695) 31163FRED Publishing,* 40Roundyhill, Monifieth,Dundee, DD5 4RZ ((01382) 535963Hilton Computer ServicesLtd,* 3 Suffolk Drive,Guildford, Surrey, GU47FD ( (01483) 578983Jupiter Software,* 2Oswald Rd, Rushden,

    Northants, NN10 0LEPersona,* 31 AshwoodDrive, Brandleshome, Bury,Lancs, BL8 1HF( (0161)797 0651Revelation Software, * 45Buddle Lane, Exeter, EX41JSSaturn Software,* 5Ivanhoe Drive, Westfields,Ashby de la Zouch, Leics.,

    LE65 2LT

    S.D. Software,* 70Rainhall Road,Barnoldswick, Lancashire,BB8 6ABSteves Software,* 7

    Narrow Close, Histon,Cambridge, CB4 4XX (

    (01223) 235150 from 6pm-9pm, Mon-SatSupplement Software,* 37Parker St, Bloxwich,Walsall, WS3 2LE ((01922) 406 239

    Hardware

    B.G. Services (see underSoftware)Colin Piggot,* 204

    Lamond Drive, St.Andrews, Fife, KY16 8RRRooksoft,* 1 DoveyClose, Astley, Tyldesley,Manchester, M29 7NP ((01942) 886084West Coast Computers, *see FORMAT Publications.

    Publications

    Adventure Probe,*

    Barbara Gibb (Editor),Adventure Probe, 52Burford Road, Liverpool,L16 6AQBased On An Idea* 1Dovey Close, Astley,Tyldesley, Manchester,M29 7NP (or email us [email protected])( (01942) 886084Crashed,* 16 The

    Avenue, Manston, Leeds,

    LS15 8JN( (0113) 2326726FRED Disk Magazine,*See FRED Publishing.FORMAT Publications,*34 Bourton Road,Gloucester, GL4 0LE (

    (01452) 412572 2 (01452)380890Zodiac,* New House,Holbear, Chard, Somerset,TA20 2HS( (01460)62118

    Books & Manuals

    B.G. Services (see underSoftware) for genuineDigital Research CP/M 2.2

    manualsFORMAT Publications (seeunder software) for SCADSmanuals

    Demo Gr oups

    Entropy,* 18 BraemarDrive, Sale, Cheshire, M334NJ (email:[email protected])

    MNEMOtech,*MNEMOtech, c/o AndrewCollier, 57 WyndhamAvenue, Bolton, BL3 4LG.( (01204) 652470

    * Postal address (oremail address) (

    Telephone number2 Fax number

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    38/4038

    The SAM Mouse next issue we explain thehardware inside the interface box.

    Instruction Timings the definitive guide An update on the Dalmation BBS The SAM Accelerator the principles behind it.

    Reviews, News, Letters, our very own help

    page and much much more!*

    Available from the end of April 2.00 per issue, or see our

    subscription offers!

    *Of course, that is, assuming that people write in with letters and queries for the help page... Hint! Hint!

    Index of Advertisers

    IFC Rooksoft, 1 Dovey Close, Astley, Tyldesley, Manchester, M29 7NP, UK

    6 SAM PD, 18 Mill Lane, Glenburn Rd, Skelmersdale, Lancs, WN8 8RH, UK

    21 Stefan Drissen, Zevende Herven 6, 5232 JZ s-Hertogenbosch, The Netherlands

    IBC Persona, 31 Ashwood Drive, Brandleshome, Bury, Lancs, BL8 1HF, UK

    BC FRED Publishing, 40 Roundyhill, Monifieth, Dundee, DD5 4RZ, UK

    IFC= Inside Front Cover, IBC = Inside Back Cover, BC = Back Cover

    Editors: Simon Cooke, Martin Rookyard DTP: Simon Cooke Contributors: Simon Cooke,Stefan Drissen, Martin Rookyard, Maria Rookyard, Dave Whitmore Text proof reading: MariaRookyard Technical proof reading: Simon Cooke, Martin Rookyard Tel: (01942) 886084

    Address: 1 Dovey Close, Astley, Tyldesley, Manchester, M29 7NP Email:[email protected] WWW: http://jumper.mcc.ac.uk/~simonc/boai/ Subscriptions to:Maria Rookyard at the above address cheques made payable to M. Rookyard please! Special

    Offer: Take out a years subscription thats 4 issues of the magazine for only 6.00!

    Published by Lame Ducks International Press Printed by Manchester Computing Centre Based On An Idea is a quarterly magazine from those talented bods at Entropy and Rooksoft.

    1996 Entropy, Rooksoft 1996 Lame Ducks International Press

  • 8/2/2019 Boai_issue_1 Base on an Idea Scads 3-31-2012

    39/40

    Blitz80

    The NewBi-Monthly Disk

    Magazinefrom

    Persona

    Persona, 31 Ashwood Drive, Brandleshome, Bur y,

    Lancs, BL8 1HF. Tel: (0161) 797 0651.

    Former ly SAM Pr ime, Blitz magazine is available for 2.00 per issue from Per sona.Cheques made payable to M. D. MacKenzie. We coul


Recommended