Atirez Posted July 29, 2014 Share Posted July 29, 2014 Hi, I am hoping someone can help me find out how to call these functions in assembly. With PSET in basic I can set a 2x3 grid per character position on screen, but all I have been able to do is set characters and backgrounds directly through screen memory. I tried to find the assembly code for the basic commands but seem to be struggling. Thanks Quote Link to comment https://forums.atariage.com/topic/228190-aquarius-pset-and-other-functions/ Share on other sites More sharing options...
jaybird3rd Posted July 29, 2014 Share Posted July 29, 2014 Check this post and look for the file aqromdis.zip. It is a commented disassembly of the Aquarius BASIC/OS ROM by Kenny Millar, including the built-in BASIC commands like PSET. Quote Link to comment https://forums.atariage.com/topic/228190-aquarius-pset-and-other-functions/#findComment-3042074 Share on other sites More sharing options...
Atirez Posted July 30, 2014 Author Share Posted July 30, 2014 Thanks for the pointer, however I think that is somewhat beyond me - just cant seem to get my head around what it is actually doing. That is, throwing away all of the superfluous stuff such as converting screen values in to BE and DC. What I am trying to find out is; fundamentally what portions of memory is it setting with what values to be able to set the small block on screen. Quote Link to comment https://forums.atariage.com/topic/228190-aquarius-pset-and-other-functions/#findComment-3043047 Share on other sites More sharing options...
jaybird3rd Posted July 30, 2014 Share Posted July 30, 2014 Here's the way to understand the "bloxels", the collections of "pixels" that are stored in different combinations of two columns and three rows inside the Aquarius character set. The character set was laid out in the way that it was to make it easier for you to use simple arithmetic to determine how a character cell's value should change if an individual "bloxel" needs to be turned on or off inside the cell. If you look at the whole set of "bloxels" in the set, it seems to contain a lot of unnecessary duplication; some of the "bloxel" characters, for example, can be changed into others by simply reversing the colors. At the risk of quoting myself quoting myself, here's how I explained why in an earlier post: It didn't make much sense to me, either, until I understood why the "bloxel" characters were laid out within the character set in the way that they were. It's a pretty interesting solution: put simply, they made it easier for the programmers to turn the bloxels within a character on or off, as if they were individually addressable and programmable pixels, sacrificing a few "duplicate" characters in the process.I added a detailed note about this aspect of the character set to the Astrosmash trivia entry in the Aquaricart, since that game in particular makes heavy use of bloxels. Here's part of what I wrote: Fortunately, Mattel's artists had the foresight to include a collection of general-purpose block character cells. These cells were divided into two-by-three grids of "pixels" (or "bloxels", since they were larger than the actual screen pixels), and every possible combination of bloxels was included as a separate cell. By carefully combining these cells, a programmer could create the illusion of a fully programmable, low-resolution, pixel-oriented display.These cells were arranged within the character set in an interesting way. Every bloxel in the 2x3 grid is given a value: +----+----+ | 1 | 2 | |----|----| | 4 | 8 | |----|----| | 16 | 32 | +----+----+ By determining which bloxels need to be "on" or "off" within a given cell, and by computing the total value of the bloxels which are "on", the programmer can locate the corresponding character within the character set using a simple calculation: if the total value is less than 32 (that is, if the last bloxel is "off"), it is added to the number 160. If the total value is equal to or greater than 32 (that is, if the last bloxel is "on"), it is added to 192. In both cases, the result is the corresponding character code. So, when you use a PSET command in BASIC, the computer is actually determining which character cell on the screen the specified "bloxel" should appear in, checking the character code already in the cell (if any), and calculating which character to replace it with to make it appear as if the new "bloxel" is being individually turned on.Of course, the "illusion" of (somewhat) higher-resolution graphics is shattered when you try to change the color of an individual bloxel: colors can only be applied at the character level, and you only get two colors per character. At least you can combine as many colors as you want on a single line, which still allows you to create some fairly colorful displays despite the limited color resolution. You also asked about where in memory the characters are stored. They are stored in the character matrix, from $3000-$33FF, with each byte corresponding to one character cell in the Aquarius's 40x25 character display. 2 Quote Link to comment https://forums.atariage.com/topic/228190-aquarius-pset-and-other-functions/#findComment-3043081 Share on other sites More sharing options...
Atirez Posted July 30, 2014 Author Share Posted July 30, 2014 Thanks, that clears it all up very nicely! Quote Link to comment https://forums.atariage.com/topic/228190-aquarius-pset-and-other-functions/#findComment-3043082 Share on other sites More sharing options...
Recommended Posts
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.