Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!tandem!zorch!sega0!mykes From: mykes@sega0.SF-Bay.ORG (Mike Schwartz) Newsgroups: comp.sys.amiga.programmer Subject: Re: Lemmings - a tutorial Part IV Message-ID: Date: 28 Mar 91 07:30:20 GMT References: <1991Mar25.050519.29068@mintaka.lcs.mit.edu> <1991Mar26.205540.18279@mintaka.lcs.mit.edu> Organization: Amiga makes it possible Lines: 198 In article <1991Mar26.205540.18279@mintaka.lcs.mit.edu> rjc@geech.gnu.ai.mit.edu (Ray Cromwell) writes: >In article mykes@sega0.SF-Bay.ORG (Mike Schwartz) writes: >>In article <1991Mar25.050519.29068@mintaka.lcs.mit.edu> rjc@geech.gnu.ai.mit.edu (Ray Cromwell) writes: >>>> Well, I don't care much for multitasking while playing a game, but there >>>>is NO excuse for not making a version of a game that can be HD installable. >>>>There is NO excuse for not working on 68010,68020,68030, etc. There is >>>>NO excuse for not working when a user has extra ram, or a different >>>>system configuration (e.g. Amiga 3000). >>>> There is only ONE excuse for making a game trash the current state of >>>>the system, and that is if you want to make it run for 512k ram A500's and >>>>need the extra 80k or so. >>>> >>>> Any sane programmer can make a game that >>>>1) is HD installable >>>>2) not copy protected >>>>3) saves the state of the OS and restores it when the game is exited >>>>4) works on any hardware configuration >>>> >> >>I want to point out that when you take over the machine, and get rid of >>the OS, there are a number of powerful programming tricks that you can use. >>For example, the 68000 provides an addressing mode called "ABSOLUTE SHORT" >>which normally you can't use on the Amiga. I rely heavily on this addressing >>mode by putting all my variables and jump tables in low memory, which frees up >>a register (normally the A4 register is used to provide a short addressing mode). >>I also use the 68000 in supervisor mode all the time, which frees up the USP >>register for a fast place to save an address register. > > Shaving cycles like this isn't really needed except in critical routines >like line-drawing, disk loaders and image-mapping, etc. Kill the OS for an >extra register and the ability to use 'zero-page'. (Sorry, I'm just used to it, >I programmed 6502 on the C64 for almost 7 years) Just disable the OS and >copy the page zero stuff elsewhere. > There is no place to copy it on a 512K machine and still be able to restore to the OS. >>You are also wrong about the 80 lines of assembly code to restore the system. >>If you want to use the floppy disk, keyboard, and CIA directly, you really hose >>the OS when you try to restore it. You end up with a LOT of code to restore >>things (like allocating/dealocating resource structures, etc.). >> >>Once you have kicked the OS out, you can't read from hard disks without writing >>drivers for each of the controllers around. Commodore could have made things >>easy for us hardware programmers by providing low level access routines for >>floppy and hard disk that can be called in ROM without the operating system, but >>they didn't. I'd like to see your 80 lines of code, and with your permission, >>I would gladly use it in my next product, and you will be happy. > > Welp, you're talking about totally kicking out the OS and claiming >all memory your own. A lot of games don't do that (here in the US)> >It's possible for a "partIal" takeover and leave DOS functioning. >Look at games like 'Test Drive II','Technocop','Dragon's Lair II' and >the old CinemaWare games. > Look at how slow those games performed. When you use 80% of the machine you have to go to disk 20% more often. >>I am extremely pleased with the floppy disk routines I wrote. You can see them >>in action in Budokan and the Immortal for the Amiga. They are extremely fast, >>because they use the blitter in NASTY mode to do the encoding and decoding of >>the MFM. These routines are an order of magnitude faster than AmigaDos. I >>also detect and use memory above 512K to cache data from the floppy disk. My >>caching algorithm is hard coded to make sure that the most important sectors >>from disk are guaranteed to be in RAM. If you play budokan, you will find >>that it only goes to disk ONCE for 90% of the data in the game (a RAM cache >>is faster than Hard disk!). > > Hmm, I played it over my friends house (Budokan). Perhaps he has a pirated >copy or something? All I know is that EVERYTIME I got beat in a fighT >it re-loaded all the player graphics. Maybe he only has 512k, but I think >he has 1 meg. The loading was kinda slow IHMO< compared to how my >Space-Ace loads. > He doesn't have 1Meg. >>>> I don't care how many excuses euro-hack programmers can give, it IS >>>>possible to bang on the hardware and save the state of the OS for >>>>restoration. It takes about 30 lines of assembly code to do. Processor >>>>detection is easy. Timing is easy, just steal a CIA register and use >>>>it instead of CPU delay loops. Running the blitter concurrently with a >>>>timed CPU loop is easy, just use the blitter interupt and run the code in chip >>>>ram. (note, need to detect the A3000's 32bit chip access and supply >>>>a seperate routine) >>>> >> >>I have seen quite a few programs not written by "euro-hack" programmers that >>fail to work on all amigas, too, even when they use the OS. What you are >>really getting at is that ANY kind of programming requires good programming >>practices. I agree with you. I would also love to work on a game that >>requires more than 512K, but the MARKET is just not there for them. >> >>I am not a euro-hack programmer. I am an American programmer. There are >>lots of American programmers that make games the same way the Europeans do. >>As a matter of fact, if you are aware of how big the Pirate network is for >>the Amiga and have seen how they pirate software, you'd see some of the >>best programming being done for the Amiga. It is really a shame that some >>pirate is going to make a intro screen for Mike Farren's game that makes >>the game look bad (the intros I've seen are that good). And to top it off, >>this pirate is going to compress his game down to half its size on disk... >>This is not intended as a slam against Mike, just to illustrate how a >>better approach can make a better product. > > Nah, I know a lot about the pirate seen, and I use to program demos/intros >on the C64. I know a few demo programmers personally. Most of the groups >have their own music composer and artist (who are talented!) which makes >demos look impressive. The programming (most of it bobs and vectors done >with the blitter) isn't hard. WHat is good, is that most demo hackers >spend lots of time devising clever tricks to push the hardware to the >limits. Once one coder finds a trick, the rest of them start using it. >To compress the game there are a multitude of 'time-crunchers' availible >that compress code like powerpacker/imploder. > Programming demos that take over the OS is ALOT easier than programming >the OS efficiently. When I first got my Amiga, I spent 3 days reading the >Hardware manual, and I programmed an 'intro' That a bouncing/rolling >copper-bar and a bouncing scroller. (Updated 60fps). In comparision, >I still haven't become literate with all the structures and routines in the OS. >Just compare the size of the RKM's to the Hardware manual. > Read my new .signature. >>In my book, CinemaWare started out making some pretty lame games. But over >>the years, their designs got quite good. I like Wings (although if I had >>a 68000, I'd want my money back because it is too slow). I liked It Came >>from the Desert, TV Sports Football, and Sinbad. These games are all more >>playable than most of the Psygnosis games. But Psygnosis is now the premier >>original game development company for the Amiga, and CinemaWare is out of >>business. It makes sense to me to emulate Psygnosis and make KICK ASS >>Amiga games with lots of sizzle. > > No. Psygnosis games LOOK pretty, and are fast, but they aren't playable >and are boring after a few hours. I use psygnosis games (like I use SPace-Ace) >to show off to friends and relatives, but I don't play THem. Cinemaware is out of business, Psygnosis is not. What I like about Psygnosis games is that they push the Amiga to its limits and the games are designed for the Amiga instead of being a PC or Mac port. The techniques they use are excellent (which is why you want to show it off). Now, if you took Cinemaware's game designs and implemented them like Psygnosis does, you would have the best of everything. Game design and how it is implemented are two distinct issues. I also must point out that Psygnosis is a European company, and they use PAL there. The developers don't care about the US market because we are a bunch of idiots (we buy PC's instead of amigas :). PAL makes a huge difference in the way the games play, since they run at 50Hz instead of 60Hz. They must be a bit easier to play on PAL machines. > What Mike F was trying to say was not all games need to nuke the OS. > Games like Ultima, Bards Tale, Bane of Cosmic Forge, and Lemmings >don't need 60 frames per second 100% CPU time and megafast custom disk >routines that may not work on some drives (like my friend's 3.5 AirDrive) > I didn't say ALL games need to nuke the OS, just that you shouldn't have to program in a phonebooth to get around taking over. You shouldn't be discouraged from doing it if you want to. Let the game come first. If you can take over the machine and make your game better, DO IT. If you don't want to take over, don't. Just MAKE UP YOUR OWN MIND. Don't let an abnoxious loud minority overinfluence you. > PowerMonger and Battle Squadron are about the only games That take over >the OS, that I like to play. Games of Adventure and Skill capture my >attention far more than 'blast-anything-that-moves including those >blitter objects that take up half the screen and lots of ram, but look >very pretty' > You don't need an Amiga to play those kind of games. If you get a PC, you can get 256 color graphics. Go for it. >>-- >>******************************************************* >>* Assembler Language separates the men from the boys. * >>******************************************************* > >Nah, prolog does. DOes anyone understand iT? > > >(sorry abouT The random caps, my keyboard is acting funny and >uppercasing characters at random.) > > > >-- >/~\_______________________________________________________________________/~\ >|n| rjc@albert.ai.mit.edu Amiga, the computer for the creative mind. |n| >|~| .-. .-. |~| >|_|________________________________| |_| |________________________________|_| -- ******************************************************** * Appendix A of the Amiga Hardware Manual tells you * * everything you need to know to take full advantage * * of the power of the Amiga. And it is only 10 pages! * ********************************************************