Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ub!dsinc!bagate!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.programmer Subject: Re: Lemmings - a tutorial Part IV Message-ID: <20152@cbmvax.commodore.com> Date: 27 Mar 91 05:32:11 GMT References: <23787@well.sf.ca.us> <1991Mar25.050519.29068@mintaka.lcs.mit.edu> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 112 In article mykes@sega0.SF-Bay.ORG (Mike Schwartz) writes: >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. True. That doesn't mean the program can't load from HD, for example. However, you don't get _that_ big a benefit from these tricks. You do get an extra few % here and there, but not orders of magnitude. And you give up something by doing this: witness your laments about not being able to access hard drives if you blow the OS away. It also costs you signifigantly more programming time (== cost$) over using some parts of the OS, or in using those tricks. Someone with a faster processor didn't need for you to use those tricks in the first place (in fact, they slow you down, since for example short address modes point to chip ram, not fast ram). >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.). It's not really that bad if you allocated them in the first place instead of grabbing them. For example: trackdisk. You can ALL YOU WANT to the hardware so long as you called GetUnit() first. To undo it, merely call GiveUnit(). Simple. >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. No way. We support arbitrary disk hardware, though a well-defined interface that relies on the system being up. That's why we have successful 3rd-party hardware developers, because we didn't lock it in. >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. Suprise, the floppy disk routines in 2.0 are also up to twice as fast as 1.3. (1.3 didn't use wordsync). The overhead in the floppy driver under 2.0 is almost nothing - a tiny fraction of the transfer time. Suprise - the CPU is faster at decoding if you want to have a checksum than the blitter is. It's also faster if the destination is fast mem. NASTY mode really isn't that important - it only gives up cycles if the processor wants to use them. > 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!). Fine. This has no relation to the "take over the machine" question. (Though those buffers get filled far faster from HD.) >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. Absolutely. > I would also love to work on a game that >requires more than 512K, but the MARKET is just not there for them. Some people seem to think there is. Others think there is a market that will pay more/be more likely to buy games that make use of extra ram and/or processor. Flight simulators (taking advantage of faster processors) being one example, games that have additional features being another. Europe is a different market, such things are a harder sell there (less expanded machines). Most machines in the US are not 512K A500's, certainly not when you multiply ut by the amount of money spent per year on games/software. >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. Too bad (sort of, some of the european stuff is good, a LOT of it is utter dreck). >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. I think you read too much into what happened. Cinemaware over- extended. Their sort of software, btw, is far more likely to play well on a CDTV system (they can make far better use of all that extra space/speed). Personally, Lemmings is the only Pysgnosis game I've ever found interesting in the least (and lemmings is from an outside company). Realize a lot of why companies like Pygnosis are successful in Europe is that _there is NO nintendo in Europe_ (effectively). The A500 (and to a lesser extent, fading, the C64) IS the nintendo of europe. Therefore nintendo-like games are the main order of the day there. Commodore is unlikely to ever unseat nintendo/sega/nec in the US, and may not hold it's position if nintendo/etc ever really try hard in Europe (post-92 if they're going to). Commodore may benefit if there's another videogame bust (ala 83-84) and consumers/parents/kids turn to computers as they grow up (we may see the "Eddie won't go to college/get a job/etc if he doesn't have a Commodore computer" commercials again...) If we do, the consumers may well be looking for games that are more than just high-animation-rate shoot-em-ups. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup Thus spake the Master Ninjei: "To program a million-line operating system is easy, to change a man's temperament is more difficult." (From "The Zen of Programming") ;-)