Jump to content
IGNORED

Check out these answers and see if they are correct


Random Terrain

Recommended Posts

I'm adding a new section to the bB page in case it will help people who know very little about BASIC, RAM, ROM, and so on:

 

www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#basic_questions

 

Anyone with a bigger brain than I have, please check it out and make sure the facts are correct. I tried to simplify some of the "I'm trying to impress my old college professor instead of trying to communicate to normal people" sentences at Wikipedia, so I could have messed up and certain things could be wrong.

 

If anyone of any brain size has ideas for more questions to add, please post them here.

 

 

Thanks.

Link to comment
Share on other sites

This doesn't make too much sense: the RAM reads the information in ROM at the start of a game and uses it to control the action

Same with: the RAM reads the instructions from the new cartridge and is ready to play.

--------

The processor (not the RAM) reads the instructions and information from the ROM.

  • Like 1
Link to comment
Share on other sites

This doesn't make too much sense: the RAM reads the information in ROM at the start of a game and uses it to control the action

Same with: the RAM reads the instructions from the new cartridge and is ready to play.

--------

The processor (not the RAM) reads the instructions and information from the ROM.

 

Thanks Atari Age magazine strikes again.

 

I'm not exactly sure how to reword this:

 

Within your video game system, the RAM is contained in the VCS console, the ROM is in the individual Game Program cartridges. The ROM contains the rules of the game—the RAM reads the information in ROM at the start of a game and uses it to control the action. When you turn off your VCS, the RAM is erased. Then, when you insert a different cartridge and turn the power back on, the RAM reads the instructions from the new cartridge and is ready to play.

 

Maybe I should just keep the first sentence and drop the rest.

Link to comment
Share on other sites

Each game can be thought of as a delectable digital dish. Our recipe is permanently printed in a cook book called "ROM". Temporary information such as the oven temperature or how full the kettle may be is scrawled on a chalk board named "RAM". The Chef uses RAM just for stuff he needs to know now because his Janitor will always wipe off the chalk board come closing time. If we were to use this same analogy in reference to Pac Man permanent instructions like how ghosts follow our player would be in ROM. Temporary things like where Pac Man is currently on-screen would be located in RAM.

Link to comment
Share on other sites

How about something like "ROM and RAM are two different kinds of memory. ROM is memory that's already filled with information you can't change. In an Atari game cartridge, the ROM contains the program instructions and the data for the graphics and sounds. RAM is memory you can change. It's used to store data that needs to be able to change, such as your game score or the positions of the sprites."

  • Like 1
Link to comment
Share on other sites

What does "value" mean?

 

A value can be virtually any kind of data: a string, a digit, or a single letter. In batari Basic, a value is simply a number.

 

bB doesn't support strings like other dialects of BASIC. I'd also move this section after variable as well. I'd change the wording to "In batari Basic a value is a number with a specific range of values."

 

What is a variable?

 

The word variable means something that is likely to vary (something that can change). In batari Basic, a variable can be thought of as a box that can hold a number. Since the Atari 2600 is an 8-bit console, a variable can only hold a number from 0 to 255. The standard batari Basic variables are the 26 letters of the alphabet (a through z).

 

Just because a processor is 8 bit doesn't mean variables can only be in the range 0 to 255. The 6502 CPU has to perform multi-precision arithmetic to work on 16, 24 or 32 bit values.

 

The text would make more sense to me as : "The word variable means something that is likely to vary (something that can change). In batari Basic, a variable can be thought of as a box with a name that can hold a value. A bB variable can hold a value from 0 to 255 and their names are all the letters of the alphabet from 'a' through to 'z'."

 

Now if you move value after this section it makes more sense ;).

 

What is ROM and RAM?

 

ROM is used to store information which does not change. It is Read Only Memory—the computer can read it to gain information or instructions but cannot change what is there.

 

RAM (Random Access Memory) is a temporary storage device. It can receive information, hold on to it, then receive different information when instructed to do so.

 

Maybe this is better as :-

 

ROM (Read Only Memory) - A memory device that contains information in the form of CPU instructions and/or data that cannot be changed by the CPU in the VCS. The information in a ROM is always there even when its not switched on! Every VCS game cartridge contains a ROM.

 

RAM (Random Access Memory) - A memory device that can have values written to it and read from it at any time under the control of the CPU. Any values written to RAM are lost when the power is removed. A VCS game uses RAM for values that need to be updated e.g. score.

 

In the RAM part "values" would link to your value definition.

 

Get people associated with bB meaning batari Basic as well.

  • Like 1
Link to comment
Share on other sites

Thanks for the replies. In case you guys don't know, I like to 'argue' things out a little to get the best results. If I ask for clarification or have a mental wrestling match with you over a phrase, it doesn't mean I don't love you anymore. :D If you think your version is better and you have a few minutes, feel free to 'fight' for it and you might change my mind or we might find an even better phrase together. Try not to get your feelings hurt if I don't use every word that you post.

 

The most important thing is that the text in this section should be understandable by someone who knows almost nothing about computers and may not even be in high school yet. If it's a five-dollar word or a short word that most people don't know, it should be replaced with a word or phrase that is more commonly known. The goal is to use the fewest, most understandable words possible.

 

 

Thanks.

 

 

 

 

bB doesn't support strings like other dialects of BASIC. I'd also move this section after variable as well. I'd change the wording to "In batari Basic a value is a number with a specific range of values."

 

Is "with a specific range of values" needed? How do you like this:

 

"In most versions of BASIC, a value can be virtually any kind of data: a string, a digit, or a single letter. In batari Basic, a value can only be a number."

 

 

 

 

Just because a processor is 8 bit doesn't mean variables can only be in the range 0 to 255. The 6502 CPU has to perform multi-precision arithmetic to work on 16, 24 or 32 bit values.

 

The text would make more sense to me as : "The word variable means something that is likely to vary (something that can change). In batari Basic, a variable can be thought of as a box with a name that can hold a value. A bB variable can hold a value from 0 to 255 and their names are all the letters of the alphabet from 'a' through to 'z'."

 

How's this:

 

"In batari Basic, a variable can be thought of as a box with a name that can hold a value ranging from 0 to 255. The standard bB variable names are the letters of the alphabet (a through z)."

 

I'd like to keep the word standard because we can also use var0 through var47 and possibly more if we use Superchip RAM. The word standard also subliminally prepares their minds for the next section about variable aliases.

 

 

 

 

Now if you move value after this section it makes more sense ;).

 

I'm still not sure what order these questions should be in. The word value is first used under the "What is a bit?" section. I thought binary, bits and bytes should come before variables, but to do that, value has to come before bit. Can you think of a better order?

 

 

 

 

Maybe this is better as :-

 

ROM (Read Only Memory) - A memory device that contains information in the form of CPU instructions and/or data that cannot be changed by the CPU in the VCS. The information in a ROM is always there even when its not switched on! Every VCS game cartridge contains a ROM.

 

RAM (Random Access Memory) - A memory device that can have values written to it and read from it at any time under the control of the CPU. Any values written to RAM are lost when the power is removed. A VCS game uses RAM for values that need to be updated e.g. score.

 

I think mixing that with SeaGtGruff's version would be easier to understand. How does this sound:

 

"ROM (Read Only Memory) can only be read. It cannot be written to. The ROM in every game cartridge contains program instructions and data for graphics and sounds that cannot be changed by the CPU in the Atari 2600. The information in ROM is always there, even when power to the console is switched off.

 

RAM (Random Access Memory) can be read and written to. It's used to store data that can change during the game, such as variables, your game score, or the positions of the sprites. Any values written to RAM are lost when the console's power is switched off."

 

 

If we use this or something similar, I'll need to add a question about the CPU. (I also need to fix the section about what an 8-bit console is. I'm not sure what to put there now.)

 

 

 

Thanks.

Link to comment
Share on other sites

Is "with a specific range of values" needed? How do you like this:

 

"In most versions of BASIC, a value can be virtually any kind of data: a string, a digit, or a single letter. In batari Basic, a value can only be a number."

 

If the reader doesn't know anything about BASIC then you are giving them information that they don't need by mentioning strings, digits etc. I also think its important to mention that numbers in bB have a limited range. Potential coders need to grasp that they are dealing with a language for a resource constrained system.

 

How's this:

 

"In batari Basic, a variable can be thought of as a box with a name that can hold a value ranging from 0 to 255. The standard bB variable names are the letters of the alphabet (a through z)."

 

I'd like to keep the word standard because we can also use var0 through var47 and possibly more if we use Superchip RAM. The word standard also subliminally prepares their minds for the next section about variable aliases.

 

Putting "a through z" in brackets makes that information seem less important to me. Its one of the most important things a user of the language needs to know.

 

I'm still not sure what order these questions should be in. The word value is first used under the "What is a bit?" section. I thought binary, bits and bytes should come before variables, but to do that, value has to come before bit. Can you think of a better order?

 

As long as it has a hot link to its meaning wherever its used then it should be OK.

 

"ROM (Read Only Memory) can only be read. It cannot be written to. The ROM in every game cartridge contains program instructions and data for graphics and sounds that cannot be changed by the CPU in the Atari 2600. The information in ROM is always there, even when power to the console is switched off.

 

Saying that a ROM cannot be written to is incorrect. Homebrew developers will potentially be using EPROMs which can be written to by a device programmer. Stating that graphics and sounds cannot be changed by the CPU is also incorrect. By using TIA resources like the ball player graphics can be subtly changed and code can also be used to alter sounds.

 

RAM (Random Access Memory) can be read and written to. It's used to store data that can change during the game, such as variables, your game score, or the positions of the sprites. Any values written to RAM are lost when the console's power is switched off."

 

If this is a beginners language section people might not know what a sprite is or even what its position means. Hence the reason I didn't use those terms. From any background people know that a score is a tally of who is winning and is an easy concept to grasp because it increments in real sports games people are already familiar with.

 

If we use this or something similar, I'll need to add a question about the CPU. (I also need to fix the section about what an 8-bit console is. I'm not sure what to put there now.)

 

Something along the lines of the CPU being the brains of the system is a good analogy.

  • Like 1
Link to comment
Share on other sites

I'd change the wording to "In batari Basic a value is a number with a specific range of values."

That sounds odd-- had you meant to say "within a specific range"?

 

The text would make more sense to me as : "The word variable means something that is likely to vary (something that can change). In batari Basic, a variable can be thought of as a box with a name that can hold a value.

I like the box analogy; that's one of the analogies they used a lot back when I was learning about computers.

 

Re: strings-- bB doesn't have string variables per se, but there's the "def" command that lets you assign a string to a logical name-- except that "string" in this case isn't quite the same as a string variable or string constant; it's closer to a string constant, but its purpose and use are different than the purpose and use of a string constant.

 

Also, values are assigned to constants as well as variables. I don't know if RT mentioned "constants" yet (I didn't see them mentioned), but it might be a good idea to mention constants and variables before mentioning ROM and RAM. Then an analogy could be drawn between constants and ROM, and between variables and RAM.

 

The following may be kind of messy or too long/complex, but it's just a first attempt.

 

Constants, variables, and values: Constants and variables are like boxes that can hold things, and values are the things that are stored inside the boxes. In the Atari 2600, each box is normally one byte, but you can also divide a box into smaller sections (bits or groups of bits), and you can combine two or more boxes to make a larger box. These boxes have addresses within the Atari's memory, but we give them names so they're easier for us to use. For example, "address $83" tells us the address of that particular box, but doesn't tell us what "lives" at that address. If we're going to be using that box to store the number of lives a player has remaining, then it's easier to write our program (and to read and understand it later on) if we call it something like "lives_remaining" rather than "$83."

 

Constants: A constant is a box that contains a value which will never change and that can't be changed once the box has been filled. For example, if we've taken a box, named it "three," and then put the number 3 in it, we can use the constant "three" in places where we want to use the number 3. That may sound silly, and that particular example is-- why not just use 3?-- but constants can be very useful in programming. Suppose you want the space ship in your game to be yellow. You can define a constant named "ship_color" and put the value for the color yellow in it. Then anywhere you want to refer to the ship's color you say "ship_color." Later on you may decide you want the ship to be light blue instead of yellow. All you have to do is change the definition of "ship_color" to be the value for light blue and it will change everywhere "ship_color" was used in your program-- you don't need to go searching for all the places it's used and change them individually (potentially missing some places).

 

Variables: A variable is a box that contains a value which needs to be able to change while the program is running. For example, if we've named a box "lives_remaining," then we can store the number of spare lives the player starts with in that variable. As the game is being played, we can reduce the value of "lives_remaining" by 1 whenever the player loses a life, or increase it by 1 whenever the player earns an additional spare life.

 

Values: Values come in two basic flavors-- numbers (numeric values) and characters (alphanumeric values, meaning letters, numbers, or other symbols). However, batari Basic doesn't have alphanumeric values, so all we need to understand in batari Basic are numeric values. A constant or variable is limited in the values it can contain. A single byte can hold any whole number from 0 to 255. A single bit can hold a 0 or a 1. So depending on the size of the box (how many bits wide it is), it can hold a value ranging from 0 to 1 (1 bit wide), or from 0 to 7 (3 bits wide), or from 0 to 255 (8 bits or 1 byte wide), or from 0 to 65535 (2 bytes wide), and so forth.

 

Memory, ROM, and RAM: A memory location is like a box with an address. Memory is used to store constants, variables, and the programming instructions that tell the Atari how the game works. Memory comes in two basic flavors-- ROM and RAM.

 

ROM: "ROM" stands for "Read-Only Memory," and is memory that can't be changed once it's been written to. In other words, a ROM address is like a constant. You can't store a variable in ROM, because then you wouldn't be able to change its value. However, you can store a constant in either ROM or RAM-- although on the Atari 2600, constants are normally stored in ROM so the RAM (what little there is) can be used for variables. Still, there are certain instances when constants are stored in RAM, such as if you're using a Supercharger and the program is being loaded from a tape and stored in the Supercharger's RAM. But in the case of games that are stored on a cartridge, the ROM inside the cartridge holds the constants and programming instructions for the game.

 

RAM: "RAM" stands for "Random-Access Memory," and is memory that can be changed. RAM is used to store variables and other information that needs to be able to change, such as a screen display. On the Atari 2600, there's no "screen memory" per se, and screen displays are often defined in ROM. But in its standard kernel batari Basic sets aside some RAM to use as "screen memory" for the playfield. The Atari 2600 has only 128 bytes of RAM, but some game cartridges have extra (or expansion) RAM on them so more variables or more detailed screen displays can be used in the game.

 

Registers, Read-Only Registers, and Write-Only Registers: A register is a special memory location that's used for some particular purpose by the Atari 2600. Registers are found on the three chips that make up the Atari's "brain"-- the 6507 or CPU (which performs the game instructions), the 6532 or RIOT chip (which supplies the RAM as well as the timer and interfaces with the input/output devices like the console switches and game controllers), and the TIA or "Television Interface Adapter" chip (which handles the video and audio). A few of these registers-- such as the accumulator and the X and Y registers inside the 6507 chip-- don't have memory addresses, but we can store information in them by using specific instructions. But most of the other registers-- those found inside the RIOT and the TIA-- are mapped to memory addresses so we can read from them or write to them. Most registers are like RAM addresses because their contents can change, but some registers-- particularly many of the ones in the TIA-- are less than 8 bits, so they can hold only specific ranges of values. And a few of the TIA's registers don't even have any bits at all-- they're called "strobe" registers that make something happen whenever we write to them. The TIA's registers come in two different flavors-- read-only and write-only.

 

Read-Only Registers: A read-only register is one you can read, but you can't write to it. The TIA's read-only registers are used to read collisions between the graphical objects-- for example, reading the CXM0P register lets you see if missile 0 has overlapped (collided) with the player 0 sprite or the player 1 sprite. There are also read-only registers for reading the paddles or the joystick buttons.

 

Write-Only Registers: A write-only register is one you can write to, but you can't read it. The TIA's write-only registers are used to draw the game on the screen, play sounds, or perform some specific action like clearing the collision registers or moving the sprites to the left or right. You can write a new value to a write-only register-- for example, writing a color value to the COLUPF register will tell the Atari what color to draw the playfield with-- but you can't read a write-only register to see what value it's currently set to.

  • Like 1
Link to comment
Share on other sites

@SeaGtGruff: Good explanations but they do assume quite a bit of prior knowledge and need more clarity. In my opinion you'd need to explain what kernels, addresses, playfield, Supercharger, collisions, "strobe", missile and sprite are (probably other terminology too) for a person not familiar with the language, the 2600 hardware or what constitutes a game to understand your definitions. Keeping the definitions as simple and concise as possible makes new concepts much easier to take in and mentally digest.

Link to comment
Share on other sites

Thanks for the replies. I'll reply some time tomorrow. Anything that needs to be explained, I can make a new section for. I can do "What is a Sprite?" and stuff like that.

 

 

 

I fell while getting into the shower about a week ago and bashed my shin on the side of the tub. Luckily, I always hold onto the safety bar when I get in and out or it would have been a lot worse. My leg blew up like a balloon almost exactly between my knee and my ankle as I stood there trying to finish my shower.

 

I mentioned that because I'm at the stage where every time I have to stand up, the pain in my leg gives me an immediate headache, so I'm having a hard time reading and concentrating right now.

 

 

Link to comment
Share on other sites

Thanks for the corrections and additional text, GroovyBee and SeaGtGruff.

 

I have an idea. Since SeaGtGruff is typing up this good info, maybe I can have the simple, shorter answers in the Basic Questions section and have links to entries in a non-alphabetical Glossary of Terms that I can put down at the bottom of the page.

 

Here is the updated Basic Questions section:

 

www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#basic_questions

 

 

And here is the Glossary of Terms section:

 

www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#glossary

 

 

You may need to refresh the page or clear your cache to see the latest version. I'll go back tomorrow and do another pass to see where I need to add links to other places on the page.

 

 

SeaGtGruff, almost everything you typed up was perfect for the new Glossary of Terms section, but the ROM section did seem to get a little "messy or too long/complex." It seemed to talk more about constants than about ROM, so for now, I removed everything except the first sentence. We can add more to that subsection later.

 

We might also want to add a subsection under Memory about EPROMs.

 

 

Thanks.

Link to comment
Share on other sites

Over the past few days, I've added more links to the table of contents section and added various other links pointing to places in the glossary:

 

www.randomterrain.com/atari-2600-memories-batari-basic-commands.html

 

A refresh/reload of the page will be needed since the style sheet has also been changed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...