Jump to content
IGNORED

3 Aquarius Programs I Made


Recommended Posts

Just starting to get into this computer now, specifically the Logo software. Here's a couple programs I made (featured in the instruction manual) to start get acquainted.

 

My next project is making a running man - or something to that effect - using the figures within the native character set.

 

One question about that stuff, though. Is it possible to make the shapes appear larger on the screen? Or do we need to work with them exactly as they are?

 

 

4760F0D6-DD09-4A99-ACB7-1963D7EF979D.jpeg

6CC8306E-4EF0-4267-87F3-38DFCAE4A155.jpeg

Edited by Intelligentleman
  • Like 3
Link to comment
Share on other sites

Awesome!  Logo is a great introductory programming language, ideal for free-styling.  Aquarius Logo suffers from the limits of its character-oriented display, but it's a good implementation of the core language, particularly for a 16K program cartridge.

 

(I doubt that Mattel implemented Aquarius Logo from scratch, but I don't happen to know what version of Logo it would have been based on.  Many home computers of the time used some version of LCSI Logo, but the packaging usually identified it as such, whereas the Aquarius version does not.  The core language is fairly similar across most versions, so if you find an example Logo program for another home computer that you like, that doesn't rely on platform-specific features like sprites, you should be able to run it on the Aquarius with minimal modifications.)

 

EDIT: Speaking of the display ... no, unfortunately there's no built-in way to increase the character size.  The Aquarius is a strictly character-oriented system, so you get a 40x25 character matrix and the built-in character set, and that's it.  (At least, for now ...)

  • Like 2
Link to comment
Share on other sites

Thanks. I'm excited to play with the native character set. It's like Mattel ASCII.

 

Regarding Logo vs Extended BASIC, which is another program I'm minimally familiar with, can you recommend one over the other?

 

My ultimate goal is to make a program where I can move a little guy around the screen. I don't know if that's possible in Logo, or BASIC for that matter.

Edited by Intelligentleman
Link to comment
Share on other sites

You could do that with either language, though BASIC might be more straightforward.  You don't even need to use any Extended BASIC commands; the regular version of BASIC has all the language features you'd need.  By adding a little inline machine code, you could even write a program to move the man with the hand controllers; Martin v.d. Steenoven provides a helpful tutorial on his website.

  • Like 2
Link to comment
Share on other sites

11 minutes ago, jaybird3rd said:

You could do that with either language, though BASIC might be more straightforward.  You don't even need to use any Extended BASIC commands; the regular version of BASIC has all the language features you'd need.  By adding a little inline machine code, you could even write a program to move the man with the hand controllers; Martin v.d. Steenoven provides a helpful tutorial on his website.

Oh that's fantastic! I wasn't even going to hold out hope for hand controllers.

 

I don't think I saw mention of hand controllers in the Logo book.

 

In addition to moving something around the screen, could I also add a function to the player character? Something like, push button to... Honestly do anything. Like, push a button to paint the tile beneath you a color.

 

Maybe you'd have a pallet of 6 colors mapped to each of the six buttons.

 

And maybe it would be a two player game where you can work together OR against each other - painting over or erasing each other's designs?

 

If I want to eventually get close to an experience like this, do you still suggest using the native BASIC program?

  • Like 1
Link to comment
Share on other sites

Yes, you can read from the hand controller keys as well as the direction disc; it's all part of the same input code.  You'd have to do some arithmetic to determine from the code which key(s) are being pressed, just as you would to decode the disc direction, but this is not too difficult.

 

Anything you want to do can be theoretically be done in BASIC, though it might be a bit slow.  A common approach was to build a prototype using pure BASIC, and then to add machine code routines (like the hand controller code I linked earlier) to speed up the most time-critical parts of the code.  (I don't happen to remember if Aquarius Logo allows the use of machine code—some Logo implementations did, and others did not—which is why I recommended BASIC first.)

 

Another example is filling the screen with a different color in a BASIC program.  This is very slow if you do it in a FOR loop with a succession of POKE statements, as was often done, but very fast if you do it with machine code.

  • Like 1
Link to comment
Share on other sites

4 minutes ago, jaybird3rd said:

Yes, you can read from the hand controller keys as well as the direction disc; it's all part of the same input code.  You'd have to do some arithmetic to determine from the code which button(s) are being pressed, just as you would to decode the disc direction, but this is not too difficult.

 

Anything you want to do can be theoretically be done in BASIC, though it might be a bit slow.  A common approach was to build a prototype using pure BASIC, and then to add machine code routines (like the hand controller code I linked earlier) to speed up the most time-critical parts of the code.  (I don't happen to remember if Aquarius Logo allows the use of machine code—some Logo implementations did, and others did not—which is why I recommended BASIC first.)

 

Another example is filling the screen with a different color in a BASIC program.  This is very slow if you do it in a FOR loop with a succession of POKE statements, but very fast if you do it with machine code.

Thank you for this context and insight.

 

Only thing is, I don't know anything about machine code.

 

Is there just one universal machine code or is there an Aqurius subset like BASIC or Logo?

  • Like 1
Link to comment
Share on other sites

"Machine code" refers to the native instructions of the hardware.  BASIC and Logo are interpreted languages, meaning that every line of code must be translated from the human-readable language that it was originally written in (such as BASIC or Logo) into machine code, before the computer can execute it.  The overhead incurred by this process is is one of the reasons that programs written in these languages tend to be slower than the equivalent programs written in pure machine code; by using machine code, you're talking to the hardware directly, without the need for any intermediary interpreter.  The Aquarius uses a Z80 (or compatible) microprocessor, so the "machine code" in this case is Z80 machine code.  (Incidentally, this is one of the nice things about the Aquarius: many other home computers also used the Z80, so there are lots of resources and examples that can be applied to the Aquarius, even if they were originally intended for very different machines.)

 

Most programmers, however, generally do not write machine code directly; working at the level of zeroes and ones is very error-prone and time-consuming, especially for large programs.  Instead, they work in assembly language, which is one level of abstraction higher.  You see some examples of this in Martin's example hand controller code, which breaks down the individual opcodes used in the inline machine language program.  LD, IN, and OUT are assembly language mnemonics: LD means "load" (as in, load a value into a memory location or register), and IN and OUT mean "input" and "output" (as in, read or write a value to an I/O port; in this case, the port numbers assigned to the PSG chip in the Mini Expander).  These mnemonics and their operands are translated into the corresponding machine code by an assembler.  Once you have the machine code—which, as with everything in computers, is nothing but numbers in memory—you can slip it in to a BASIC program as a series of DATA statements and execute it with a USR instruction, as Martin's program does.  (That's what the numbers which follow the DATA statement in his program actually mean; they're the individual bytes of the machine code, entered into the program as a succession of decimal numbers.)

 

If all this sounds intimidating, *please* don't let it deter you from your exploration of programming!  You can work happily in BASIC or Logo, and write very excellent programs, without having to know anything about assembly or machine code.  When you begin to run up against the limits of what these languages can do for you, that's when you would start to think about sprinkling in some machine code to overcome these limits.

  • Thanks 2
Link to comment
Share on other sites

The 1541 ROM on the Aquaricart has specific commands for reading the controllers.

 

LOGO, sadly does not.  It's one of the unfortunate omissions they had to make, it seems.   Another one I can think of is there is no way to perform a screen print to the printer. You can print the procedures, but that's about it.  :(

 

1541.pdf

  • Like 1
Link to comment
Share on other sites

5 minutes ago, MattelAquarius said:

The 1541 ROM on the Aquaricart has specific commands for reading the controllers.

 

LOGO, sadly does not.  It's one of the unfortunate omissions they had to make, it seems.   Another one I can think of is there is no way to perform a screen print to the printer. You can print the procedures, but that's about it.  :(

 

1541.pdf 392.86 kB · 2 downloads

But, IF this version of Logo can accept assembly language, then maybe it could be retrofitted to read controller input?

Link to comment
Share on other sites

5 minutes ago, Intelligentleman said:

Filling the screen with a different color is INSTANT in Aquarius Logo, fwiw.

 

? Paper 7

 

For example.

You can do instant color changes with the SCR command in the 1541 ROM.

 

I highly doubt Aquarius LOGO will allow you to call machine language routines (unless someone perhaps hacks the ROM).  It would have been one of the first things axed when the developers were trying to shoehorn the language into the available ROM space.  Well, maybe 2nd thing, after they removed the standard Aquarius splash screen and replaced it with simple text.  ;)

 

  • Like 1
Link to comment
Share on other sites

3 minutes ago, MattelAquarius said:

You can do instant color changes with the SCR command in the 1541 ROM.

 

I highly doubt Aquarius LOGO will allow you to call machine language routines (unless someone perhaps hacks the ROM).  It would have been one of the first things axed when the developers were trying to shoehorn the language into the available ROM space.  Well, maybe 2nd thing, after they removed the standard Aquarius splash screen and replaced it with simple text.  ;)

 

Alright. I'll switch back to BASIC for the time being.

 

... And I was just getting used to Logo. ?

Link to comment
Share on other sites

1 hour ago, Intelligentleman said:

Alright. I'll switch back to BASIC for the time being.

 

... And I was just getting used to Logo. ?

By all means, continue having fun with Logo!  If you're just learning programming, and if you have to choose between BASIC and Logo on the Aquarius, I think Logo is a much better place to start.  BASIC may have certain capabilities that Logo lacks, but its very old-fashioned, non-structured approach to programming encourages too many bad habits.  If you learn with a language like Logo first, I think that experience will help you to avoid or mitigate the worst parts of BASIC.

 

(I first learned programming in BASIC on the TI 99/4A and Atari computers, and that experience taught me many valuable things about computers, but it also proved to be a hindrance in certain ways.  It took me the longest time to get used to the very idea of programming without line numbers!)

  • Like 1
Link to comment
Share on other sites

Just now, Intelligentleman said:

I really appreciate how, in Logo, you can type EDIT Procedure_name to jump to a full screen of the close with insert and delete commands.

 

Does BASIC have a thing like that? Is there a way to go back and fix mistakes?

Yes, that was a major omission in BASIC.  Extended BASIC does add an EDIT command, but you can only edit one line at a time.

  • Like 2
Link to comment
Share on other sites

Just now, Intelligentleman said:

I really appreciate how, in Logo, you can type EDIT Procedure_name to jump to a full screen of the close with insert and delete commands.

 

Does BASIC have a thing like that? Is there a way to go back and fix mistakes?

 

I agree that LOGO is a very good way to learn "proper" programming, and that editor is great.

 

With Extended BASIC (including the 1541 version) there is an EDIT command.  However, it is not as easy to use as LOGO's.

  • Like 1
Link to comment
Share on other sites

Depending on how you're calling your subroutines, you may have overflowed the stack?

 

I've attached Aquarius_Extended_Basic.pdfaquarius_extended_basic_manual.pdf so you can see how to use the EDIT command.

 

You always have the option to retype the whole line, otherwise.  :)

 

  • Thanks 1
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...