Jump to content

JamesD

Members
  • Content Count

    8,999
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by JamesD


  1. As stated, most BASICs parse the line when you enter it, tokenize it, execute it in immediate mode or store it. Computers where you input the keywords with a single keystroke did so to reduce the size of the interpreter. No parser means a smaller/cheaper ROM. Later Speccy's used a tokenizer like everyone else as did the American version from Timex.

     

    To interpret a BASIC program the interpreter finds the current line and looks for a token. To interpret a token, BASIC just uses a jump table that has pointers to the routines they represent. Some tokens were two bytes long. The first byte was usually 255 which pointed to a 2nd table and the 2nd byte of the token was the routine to call from that table. If an unsupported token is found it just jumps to a routine that gives an error.

     

    Once a routine is called it has to parse the current line after the token to find parameters for that BASIC keyword. The more options for a keyword the longer it takes to parse. If the parameter is a variable there is even more work to do. Compiled languages do type checking at compile time and any conversion must be explicitly handled by the program itself. BASIC does it at runtime and is constantly checking what type variables are every time you used them and the constant conversion from one type to another.

     

    The typical way to store a BASIC program isn't exactly geared for speed either. The program is usually stored line by line with the line number, a pointer to the next line and then the tokenized code for the line.

    In the factory supplied BASICs I've looked at, they don't embed a pointer to lines that are called by GOTO or GOSUB with the call, they do a search by line number. That is done by searching through the program line by line looking for the line number. This made long programs slower than short ones. At least one replacement for Atari BASIC about doubled execution speed by adding pointers along with the tokenized lines. It did a scan of the program when you ran it to add all the pointers if you enabled that mode.

     

    Variables are handled in a similar manner. The variables are stored in a table as they are created and whenever you access them the interpreter looks them up in that table. That's why a program would run faster if you placed variables that were used the most first.

     

    Several BASICs omitted INT (integer) variables. Even loop counters are stored as FLOAT which goes back to the constant conversion. That alone slowed down many machines.

     

    On top of that a lot of the design of BASIC interpreters from back then was to fit everything in a small ROM and use little RAM instead of doing it in the fastest possible way. If someone were to rewrite BASIC for one of the 24 bit address buss CPUs (65816, ez80, etc...) where RAM and ROM limitations aren't an issue then I'm sure they could run BASIC much faster even without a lot of tricks.

     

     

    No, most BASICs didn't include support for sprites. I think the Tandy CoCo was the first machine to include an extended BASIC and even then it was an option. People had always used PEEK and POKE until then so nobody dealt with it any other way.

     

    After Microsoft created Level III BASIC for the TRS-80 Model 1, Tandy thought it was a good idea and decided to offer it with the CoCo as Extended BASIC. After a few magazines proclaimed the CoCo's Extended BASIC as the best, everyone else offered an enhanced or Extended BASIC.

     

    I have no idea why Simon's BASIC is so slow. The Plus/4 had most of it's features and did a lot of bank switching but was still pretty fast. But then the Plus/4 did have a faster CPU. FWIW, the Plus/4 also offered the largest amount of memory for a BASIC program of any 8 bit I'm aware of. It just didn't have hardware sprites or a SAM chip so people shunned it.

     

     

    I think there were plenty of BASIC compilers for most machines but many were pretty limited and usually just converted the code to a machine language program that made a lot of ROM calls. In the end they skipped most of the parsing or type conversion stages and made variable manipulation a lot faster but they were still hampered by slow ROM routines and little if any optimization to the machine code. The compiled programs were also very dependent on ROM routines being at a certain address and any upgraded ROM might cause them to fail. I think the Amiga was the first machine that really dealt with the ROM call issue well but then it was a much later 16/32 bit machine.

     

     

    I know Small C compilers made it to most 8 bit CPU's but the commercial ones were expensive on a lot of machines so very few people every bought them and it never really caught on. On top of that the size of the code the compiler could handle was pretty limited and they didn't optimize code very much if at all. Limited compatibility with the C standard was often a problem and you still see that on most of the open source cross compilers available now. Even the 6809 port of GCC fails over 1000 ANSI C compatibility tests and GCC is very compatible on other CPUs. Others don't even support floating point numbers or worse!

     

    Pascal was actually pretty popular on the Apple II and many commercial games such as Wizardry were written in it. It was a PCode interpreter (similar to Java) but by elimination of run time type identification/conversion and much more efficient code representation it was very fast. It also allowed programs that were larger than RAM to be written by swapping modules in and out of RAM. Still, the PCode interpreter it used is now looked at as pretty inefficient compared to what it could have been from what I've read. I think part of Turbo Pascal's popularity was due to people moving over from Apple II Pascal.

     

    Operating systems like CP/M, FLEX and OS-9 had many languages including Cobol, Fortran, Pascal, C, APL.... the list goes on and on but I'm not sure any machine but the CoCo had many graphics games written under such an OS. BASIC-09 was pretty popular on the CoCo and it also used a PCode type interpreter. Several commercial games were written in it.


  2. I learned on a TRS-80 Model 1 my school had (and they only had 1). I did it by taking home the manuals from school and buying a couple other books. Then I programmed a Model 3 which is pretty close to the same. I actually wrote some account tracking software (not to be confused with accounting software) for my high school.

     

    I finally bought my own computer shortly after that... a Tandy Color Computer 1.

     

    The Extended Basic on the CoCo was almost identical to GWBasic if I remember right.

     

    I also programmed on my friend's Apple II+ a lot.


  3. Supposedly the games themselves are somewhat compatible with the TI99. The biggest problem is that the OS is different. It would be neat to see the TI99 get some good arcade ports...

    My understanding was that the Tomy Tutor was that it actually had a pretty advanced OS but I'm not sure. There's a Yahoo group dedicated to it if anyone wanted more info.


  4. I didn't find the Exidy Sorcerer that attractive myself but I wouldn't give it an ugly award either. It would earn the "my cartridges look like 8 track tapes" award!

     

    BTW, I think the CDTV was one of the best looking machines made now that I think about it.

     

    The Tandy Color Computer Multipack interface was another expansion box that you could have connection issues with. If you bumped the computer so it twisted you could break the connection. A Coco with a multipack and a bunch of long carts plugged in wasn't exactly a pretty sight either.


  5. So the processor is separated from the RAM via cable? Yeesh! Could the computer do anything useful without the expansion interface? Why not just put everything in the expansion box (other than the keyboard itself)?

     

    Actually, the keyboard part came with 4K or 16K of RAM and the ROMs. It also had a cassette interface built in. The expansion interface brought it up to 32K or 48K.

    Ah, Level 1 Basic, 4K RAM and a cassette interface. Who would ever need more? ;)

    Star Trek III, V3.4, BASIC Trek at it's finest!

     

    You have to remember the Model 1 was one of the first major commercial shots at a home computer and was released in something like 1977 or 1978. I know I first used one in 1979.


  6. I have always loved the original TRS-80 Model 1. How cool is this?

     

    What was under the keyboard and what was under the monitor? The keyboard unit seems awfully thick if there wasn't anything inside it, but if the CPU is under the keyboard what's under the monitor?

    First of all, that's not the regular monitor.

    The part under the monitor is the expansion interface. It holds additional RAM, serial ports, cassette ports, parallel interface and disk interface.

     

    The cable between the keyboard and expansion interface often had problems making proper connections and caused the computer to crash. Cleaning the edge connectors with an eraser would fix it but this is where the term Trash 80 came from. Technically the term only referred to that model but owners of other brands soon adopted it for all things TRS-80.


  7. The Commodore PET is the hands down winner for SCI-FI looks.

     

    Some of the Euro computers like the early Speccy or Oric models were cute. The Atmos with it's Black and Orange keyboard was very striking.

     

    The MC-10 was also cute as was the Matra Alice which was a modified MC-10 in a red case. The followup model with a full size keyboard had angled corners and looked like a museum piece.

     

    The Ti99/4 looks pretty spiffy with the brushed aluminum.

     

    The TRS-80 Models II,III and IV all looked very professional and neat.

     

    The Atari 800 looked real slick.

     

    I guess the IIgs looked pretty good too if you had the monitor to go with it.


  8. Hands down, Silent Hill.

     

    The only Silent Hill game that didn't scare me was Silent Hill 3.

     

    Fatal Frame 1 and 2 were also very scary.

    I gotta admit that Silent Hill could be scary to a kid. I'm to old to have played most of these games when I was young enough to be bothered.

     

     

    I thought of another game that might be scary to a kid.

    I picked up a 2 PC game pack for $10 from WalMart that included American McGee's Alice and Clive Barker's Undying.

    Let me tell ya, Undying had me ducking, bobbing and weaving all over the place when the howlers came at me.

    Those 2 games were definitely worth the $10!


  9. I picked up a NEW cart of Archon for $10 last month. Fun game btw... even if the computer kicks my butt all the time.

     

    Where from? I'd happily pay $10 if there's more of them to be had from the same vendor.

    I bought it on eBay from myatari. BTW that's without shipping so it's $15 unless someone bids it up. I think they list one about once a month to keep from driving down the price. They have a lot of NOS Atari games and other items. Might even have an XEGS if you ask.

     

    Here is their eBay store:

    myatari


  10. Alright, you guys have talked me into getting a floppy drive for it too. :) I forgot that the software for these systems has been out so long that it's now considered part of the public domain. At least I assume that's the case.

    Actually, the copyrights aren't expired. The changes to copyrights regarding abandoned software were passed after they were released. But since nobody is making money on them they aren't willing to spend money to go to court. That or the copyright holders don't exist anymore.

     

    I just figured I'd have to end up buying the software on floppies, and would be risking having it not work at all, whereas a cart would be a lot more likely to still be in working order. There's someone on Ebay selling Archon on floppy with a starting bid of $64.99. Who knows, it may be worth that, but even if I REALLY wanted to play that game, I couldn't see risking paying THAT much when I couldn't even be positive that the floppy would still work.

    I picked up a NEW cart of Archon for $10 last month. Fun game btw... even if the computer kicks my butt all the time.


  11. I've run into annoying levels in a lot of games. I have to walk away and come back some time later to finish the game.

     

    In HALF-LIFE 2 and the follow up EPISODE ONE I had a lot of trouble with the giant bug (sand lion or whatever) king.

     

    Dumb luck in the first one finally got me knocked into a place where he couldn't get me and I just shot until he died.

     

    Episode One only took me around 20 hours to finish but around 6 were trying to defeat the same type of bug! I couldn't even figure out why something I'd done at least 20 times before killed the bug that time but none of the other times. Sadly, that wasn't the only frustrating part. It was way too short. Glad I waited to buy it for $10.

×
×
  • Create New...