Jump to content
IGNORED

Atari OS - Finished!


Recommended Posts

Good point.... I never thought of that. :) However, it , in a way is becoming an OS. Stick a program or two in the folder (i.e. Basic interpreter, notepad, calculator) and you'll have a fully functional, computer-in-a-cart.

In what folder? How does one create an AtariOS compatible program?

 

Right now you've got a pretty tech demo. When those questions are answered, then you'll have an OS. ;)

 

Maybe, the only problem is the cursor is a ball, not a player or missile. As such the color is linked to the window color and if I change one, the other will go too.

I see your problem. You could do it by switching off between missile graphics, but you may need to either ditch bBASIC or write a custom kernel to get that far.

Link to comment
Share on other sites

In five or so muinites of the last update comes another one! What's next you ask? An about screen! (hey what do you expect for five muinites of code?) This adds on to the OS premesis and gives the user (you) an idea of which version you are using (considering how many updates i've done,

LOL :lol: )But seriously expect to see (if I can get around it without flickering) a few OS-based icons popping up soon to truly transform your atari's into something the graduate and compumate can only dream about.

 

OS.bin

Link to comment
Share on other sites

In what folder?

 

The folder is the computer icon you click on which produces a window.

 

How does one create an AtariOS compatible program?

 

Atari OS programs are 100% compatible Batari basic programs. All you have to do is write code in Bb, paste it into it's own seperate section in the atari OS code , then link the two ( the os and the program) by creating an icon in the folder (using a player sprite either with flickering or otherwise) and making it so when you click on it, it jumps to the games code. To link back, simply assign a switch or button (select for example) to jump back to the os's starting point (as of now line 15 in the code) and there you have it.

 

Right now you've got a pretty tech demo. When those questions are answered, then you'll have an OS. ;)

 

....and so they are.

Link to comment
Share on other sites

How does one create an AtariOS compatible program?

 

Atari OS programs are 100% compatible Batari basic programs. All you have to do is write code in Bb, paste it into it's own seperate section in the atari OS code , then link the two ( the os and the program) by creating an icon in the folder (using a player sprite either with flickering or otherwise) and making it so when you click on it, it jumps to the games code. To link back, simply assign a switch or button (select for example) to jump back to the os's starting point (as of now line 15 in the code) and there you have it.

Erm, I think we were hoping for something a bit more automatic. Besides, you haven't been posting the code since the first version. :ponder:

 

 

 

 

BTW, merry christmas:

 

post-8100-1153174100_thumb.png

 

Hope you like it! :D

AtariOSLabel.zip

Link to comment
Share on other sites

Erm, I think we were hoping for something a bit more automatic. Besides, you haven't been posting the code since the first version. :ponder:

 

Well then, I guess the least I can do is give out the source.

 

AtariOS.bas

 

It may not be self-compiling, but it willl allow some work to be done.

Oh, and thanks for the label, that's some pretty good artwork.

Link to comment
Share on other sites

Well then, I guess the least I can do is give out the source. It may not be self-compiling, but it willl allow some work to be done.

Cool. Which version of bBASIC are you using for compiling?

 

Oh, and thanks for the label, that's some pretty good artwork.

I'm glad you like it! 8bitclassic's templates makes it pretty easy, and the rest is mostly just compositing. If you have GIMP and want to mess with it, the XCF file is in the ZIP file. Just remember to turn off the excess print area mask before you print it on a label sheet! :)

Link to comment
Share on other sites

Cool. Which version of bBASIC are you using for compiling?

 

Version .35 but in the last couple hours i've created an Atari OS Development Kit.

It should help quite a bit. ;) I did it mostly because I realized "I'm working too hard for this as-is, I need some program help!" so I wrote it. Hope it helps.

 

OSDEV.zip

 

So if you have any program ideas whatsoever for an OS feel free to run them by me (and the dev-kit) Have fun!

Link to comment
Share on other sites

If you downloaded the kit last night, be aware that I forgot to document one thing in the Readme: User programs that have line numbers need to start at 1000 or higher. All line numbers below that are reserved by AtariOS. I've reuploaded the file to fix this minor oversight. I imagine that in time I'll probably think of a few more things I forgot to document. :ponder:

 

Dragnerok X, the kit doesn't actually go beyond your original ~80ish lines. I just decided to reserve everything below 1000 to allow for expandability of the OS. In the long term, you might consider eliminating line numbers from your code. :)

Link to comment
Share on other sites

If you downloaded the kit last night, be aware that I forgot to document one thing in the Readme: User programs that have line numbers need to start at 1000 or higher. All line numbers below that are reserved by AtariOS. I've reuploaded the file to fix this minor oversight. I imagine that in time I'll probably think of a few more things I forgot to document. :ponder:

 

Dragnerok X, the kit doesn't actually go beyond your original ~80ish lines. I just decided to reserve everything below 1000 to allow for expandability of the OS. In the long term, you might consider eliminating line numbers from your code. :)

 

I downloaded it just a few muinites ago so I'm good. As for the line numbers I feel they help me organize the code much better than w/o them, so that's why they're there. But, like I said a few muinites ago this kit should really help. I think I might get started on a good OS based program real soon (though sadly, I don't think it will be a basic interpreter :sad: ) and hope to post the update asap. However, if anyone else wants to post their programs for atari os feel free to post the .bin files here. I could use all the help I can get. Thx.

Link to comment
Share on other sites

Drool...... :o

 

That should definetly help. I'll see what I can get to........

Note that the devkit is kind of jury-rigged with some Unix utlities at the moment. You should be able to create a far more robust templating engine in a language like Java. (Java is actually ideal, since it contains APIs for handling all forms of text parsing, ZIP compression streams, and other features that you may find to be useful in the future.)

 

One of the primary features you could add would be multiple program support. However, I'm not sure if your current method of icons is scalable enough. You might consider having one very large icon (perhaps composed of two sprites), then add left and right buttons at the bottom to browse through the list. This would be easy to do if you upgraded to the Multisprite kernal.

 

Upgrading to the multisprite kernal would also give you the ability to support bank switching. Bank switching would allow you to add tons of programs. Up to 32k worth in a single compile. Which will be a LOT when you have pftables support so that the programs don't chew through memory with pfXline and pfpixel commands.

 

So here's my feature suggestion list:

  • Support multiple programs
  • Use a browsable list of large icons instead of a "folder" of small icons
  • Upgrade to the Multisprite kernal
  • Support pftables (automatic with an upgrade to bBASIC)
  • Support bankswitching
  • Add more APIs

That last one probably deserves a bit more discussion. I added two APIs for you in the devkit. One resets the 2600's graphics to a default state, and the other exits the current running program. Neither one takes and parameters or returns any values. However, you might consider using the tempX variables for that. Alternatively, you can use bBASIC's function support.

 

Useful APIs would be:

  • "Mouse" cursor support
  • Routines to detect a collision by bounding box (useful for detecting "clicks")
  • Routines for Icon Display and/or simple GUI components
  • Library of common sounds like "mouse click" or "attention"

Those are just a few off the top of my head. I'm sure others will eventually start demanding more if you really get going with this project. One thing to keep in mind is that every API takes up precious ROM space. So if and when you create a more complex devkit engine, you may consider compiling in only the APIs that are used. :)

 

P.S. If you have any questions about the scripts I wrote, feel free to ask. I know that chaining sed commands can make for confusing code. It really doesn't do anything spectacular, so if you can't figure it out just give me a ring.

Link to comment
Share on other sites

Any screenshots? :ponder:

Cwertenly! Nuk, nuk, nuk. :D

 

Here's the BIN file produced by compiling the "hello" example program (Can you guess what the "hello program" does? ;)):

AtariOS.zip

 

This is the boot screen:

post-8100-1153251852_thumb.png

 

This is the GUI after booting:

post-8100-1153251861_thumb.png

 

This is the "folder of icons" (With a whole 1 icon! Yippee! :)):

post-8100-1153251870_thumb.png

 

This is the "hello" example program:

post-8100-1153251885_thumb.png

 

The Batari BASIC code that creates the example program consists of an icon and a BAS file.

 

The icon looks like this:

%00000000
%00011000
%00111100
%00100100
%01111110
%01011010
%01111110
%00000000

 

The BASIC code looks like this:

[Bunch of pfpixel commands here]


MainLoop
COLUPF = 15 

drawscreen

if joy0fire goto EndProgram

goto MainLoop

 

Note that the BASIC code above uses the EndProgram API to exit the program when the fire button is pressed.

 

Both files are in the download package I posted. The package basically contains some scripts that will take an icon and a bBASIC file, merge them in with Dragnerok X's AtariOS code, compile the .BIN file, and then spit out a nice ZIP file containing the final BIN. There aren't many changes from Dragnerok X's code, save for a few things being rearranged to make it easier to integrate the icon and extra code. That, and I added two APIs to get his creative juices flowing. ;)

Link to comment
Share on other sites

There aren't many changes from Dragnerok X's code, save for a few things being rearranged to make it easier to integrate the icon and extra code. That, and I added two APIs to get his creative juices flowing. ;)

 

Right now I am trying to get my creative juices flowing, in fact, but it seems my blender is broken. :)

Actually my code isn't compiling. Any ideas?

 

rem Atari OS Command Prompt

MainLoop
COLUBK = 0 : COLUPF = 0 : COLUP0 = 14 : COLUP1 = 14 : player0x = 15 : player0y = 20 : player1x = 23 : player1y = 20 : i = i + 1 : d = d + 1

if i = 2 then i = i - 2

if d = 25 then d = d - 25

player0:
%00000000
%11100000
%10101000
%10000001
%10000001
%10101010
%11100010
%00000000
end

if i = 0 && d = 6  then player1:
%00000000
%10111111
%10000000
%00000000
%00000000
%00000000
%00000000
%00000000
end

if i = 1 && d = 23 then player1:
%00000000
%10000000
%10000000
%00000000
%00000000
%00000000
%00000000
%00000000
end
drawscreen 

if joy0fire goto EndProgram

goto MainLoop

Link to comment
Share on other sites

Right now I am trying to get my creative juices flowing, in fact, but it seems my blender is broken. :)

Actually my code isn't compiling. Any ideas?

Seems fine to me. Is this what it's supposed to look like?

post-8100-1153259602_thumb.png

 

Here are the files I used:

blender.zip

 

Simply place them in the "Programs" folder, then run "build.bat blender" from a DOS window.

 

Can you post the BAS and ICON file you're using?

Link to comment
Share on other sites

Right now I am trying to get my creative juices flowing, in fact, but it seems my blender is broken. :)

Actually my code isn't compiling. Any ideas?

Seems fine to me. Is this what it's supposed to look like?

post-8100-1153259602_thumb.png

 

Here are the files I used:

blender.zip

 

Simply place them in the "Programs" folder, then run "build.bat blender" from a DOS window.

 

Can you post the BAS and ICON file you're using?

 

hmmm.....wierd. Here are my original files.

 

brokenblender.zip

 

I must have just compiled it wrong or something.....

 

Oh well, in case you haven't noticed (or read my source code) this is supposed to look something like the windows command prompt. I don't plan really to get any functionality out of it, but, as of now it's a good way to learn how to use the kit.

CP.bas

Link to comment
Share on other sites

bBASIC is telling you the problem here:

 

(236): Error: Unknown keyword: MainLoop

 

If you check that line, I think you'll find an extra space present. Remove it and your program will compile. :)

 

Oh! That's what it was. Well, I'm still trying to brainstorm a few utility ideas blankly, but I have some good news. The parts for a cartridge I ordered a week or so ago came in (and guess what I'm going to use it on). Here's a pic.

 

post-9847-1153271920_thumb.jpg

 

 

 

I doubt I will go full-scale cart distubution though mostly because I still haven't even aquired a way to burn my EPROM chip!!! Oh well, :roll: I'll be happy if THIS works out.

 

Cheers!

post-9847-1153272060.jpg

post-9847-1153272865.jpg

Edited by Dragnerok X
Link to comment
Share on other sites

PONG for AtariOS

 

Hi Dragnerok X! Last night I whipped up a game of Pong for your OS. It should compile with the devkit, no problem.

 

How to Play

 

You are the paddle on the left. Use your paddle to keep the ball from going off the screen. Each time you get the paddle past your opponent, you get a point. Each time the AI opponent gets the ball past you, it gets a point. The score is diplayed at the bottom of the screen. The left two numbers are your score, and the right two numbers are the AI's score. The numbers in the center are not used.

 

Controls

 

Joystick - Move your paddle up and down

Fire - Start Game

Reset - Return to AtariOS GUI

 

Download

 

Binaries: AtariOS.binSource: pong.zip

 

How to Build

  1. Download the AtariOS Development Kit
  2. Unzip "pong.zip" into the "programs" folder
  3. run "build.bat pong" from the command line
  4. load the resulting binary in your favorite emulator

Release Notes

 

Since there's no way of eliminating the center characters in AtariOS, the score is a bit confusing. If you decide to build on the devkit, you might consider adding a blank sprite to the score graphics. Technically, graphics 0xA through 0xF are not used, so you can consider adding a space, a comma, a colon, and two other graphics that you find useful. It would also be great if you added an API to set the individual characters to these values. (Normal use of the score never causes it to go outside the 0-9 range. Thus the A-F range can only be accessed by ORing the A-F values to the individual characters.)

 

The icon for Pong shows off why you should really switch to bounds checking for icon clicks rather than using collisions. If you don't line the cursor up perfectly, the game won't start.

Edited by jbanes
Link to comment
Share on other sites

Hi Dragnerok X! Last night I whipped up a game of Pong for your OS. It should compile with the devkit, no problem.

 

Wow, pretty good for 1 night. Ironically last night I was brainstorming a few program ideas and thought ...o0(What the heck! Why not stick a game in. GEEZ! Why didn't I think of this earlier?) and so it happened and what game did I choose which probably was the only which would be realistic considering my programming expieriance.....PONG!!! Too bad all I was able to get to was drawing the paddles. Yours is probably better though because I was going to use the Ball y = player1 y game engine ;) . Oh well.

 

Besides that last night I was kind of deciding what all I wanted the OS to do (at least the one I was going to stick on a cart) and came up with a few general parameters:

 

1. It needs to be bug-free.

 

2. It needs to be flicker-free.

 

3. It should be functional enough that it is not considered a tech-demo.

 

4. It should provide SOME level of computer-like functionality.

 

5. It should not bore the user.

 

.....and that's where pong comes in......

 

Talk to you later! :)

 

P.S. If you hadn't seen it already (you must have because you are in this topic) I posted a bug-fix which should help with the dev-kit .

Link to comment
Share on other sites

Nice. :lol:

Thx. ;)

 

Ironically last night I was brainstorming a few program ideas and thought ...o0(What the heck! Why not stick a game in. GEEZ! Why didn't I think of this earlier?) and so it happened and what game did I choose which probably was the only which would be realistic considering my programming expieriance.....PONG!!!

Whoops. Sorry. :ponder:

 

I figured you'd be too busy adding all those features AtariOS needs. ;)

 

Wow, pretty good for 1 night.

Standing on the shoulders of giants. It's wonderful how there's a tool for everything these days. :)

 

Yours is probably better though because I was going to use the Ball y = player1 y game engine

Ugh. That would have been... not good. Besides being (potentially) able to move faster than the paddle is supposed to, such an engine would mean that the computer would never miss. A game isn't much fun if you can't win. :)

 

The AI engine I created works by virtually making the paddle larger than it is on screen. The paddle only chases the ball when it is above or below the virtual size of the paddle. Depending on what this size is, the paddle may begin chasing it too late to catch up.

 

I then gave the paddle a more human feel with two tricks. The first was to "jitter" the size of the virtual paddle. Basically, the AI will randomly get better or worse at catching the ball every time it hits it. Adjusting the maximum value used in this jitter makes the game harder or easier.

 

The second trick was to disable the AI while the ball is travelling toward your paddle. This simulates how humans tend to "wait and see" when they're not the focus of the attention. Most programmers don't realize it, but having the opponent's paddle moving while the player is trying to catch the ball is extremely distracting, and adds to the artificial feel of the AI.

 

For another PONG clone I wrote, I actually had the AI compute where the ball will be when it reaches the AI's side (with a bit of jitter added in), then move to that location. That's just about the closest thing you can get to making the paddle feel like a real player. However, it's a bit more complicated to program, so I wasn't about to bother for this quicky program.

 

Besides that last night I was kind of deciding what all I wanted the OS to do (at least the one I was going to stick on a cart) and came up with a few general parameters:

 

1. It needs to be bug-free.

I think you mean "stable". Making bug-free code is close to impossible, even if you mathematically prove it. The probability of code being 100% bug free drops with each line of code you add.

 

2. It needs to be flicker-free.

This is doable, but you'll need to upgrade to the multisprite kernal -OR- write a kernal in embedded ASM.

 

3. It should be functional enough that it is not considered a tech-demo.

I presume this means you're looking to add more programs?

 

4. It should provide SOME level of computer-like functionality.

Is this a constraint on which programs you'll add? I presume you'll want things like a Caculator, a Notepad(?), a playfield-based Paint program, a sound/music player and composer, and (of course) games? If you're a hardware wizard, you could even add printer and disk drive (memcard? AtariVox?) attachment points into the cart to make permanent copies of the files.

 

P.S. If you hadn't seen it already (you must have because you are in this topic) I posted a bug-fix which should help with the dev-kit .

Yes. I saw it. It doesn't seem to be compatible with the devkit.

 

Speaking of which, feel free to take the devkit as your own. I whipped it up just to show you the way, not to do all the work for you. (You wouldn't get any personal education or fullfillment that way! ;)) I'll happily answer any questions you have, as well as provide you with webspace for distributing kits if you'd like, but I'm not looking to take over the development from you. It's your baby, not mine. I'm just trying to help out. :)

 

One of the key things you need to do if you want to reach your goals is to provide a method for handling more than one program. Which means that the current devkit is fine for development, but not very useful for deployment. You'll need to work out a more complex methodology, then create an engine to support it. I'll happily help with any technical difficulties you have.

 

Good luck! :)

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...