Jump to content
Bruce Abbott

Aquarius 320x200 Bitmap Graphics Hack

Recommended Posts

I hadn't thought about that, until now! I want to create commands for defining characters, loading bitmap screens etc. Perhaps I should add sprites to the list.

 

Any progress on this too?

PS I think as soon as you have these commands sorted out and more fonts loaded, a nice demo video of the capabilities would do the promotion of the board really good!

Share this post


Link to post
Share on other sites

Looks like Windows fonts can't be used without a lot of work.

 

I found a bunch of fonts in '64c' format, which just need the first 2 bytes stripped to work on the Aquarius. These files can also be loaded into PixelFontEdit, which can export character maps as c or asm source code.

 

The only problem is C64 characters are arranged in 'PETSCII' rather than normal ASCII. Moving them to the correct positions by hand is tiresome, so I wrote a FreeBASIC program to translate them. With a few modifications this program could also be made to work with character sets from other computers with non-standard maps.

 

That should be all the tools required, now I just have to get on with it...

 

post-40459-0-08249100-1451859419_thumb.png

64ctoAq.zip

  • Like 2

Share this post


Link to post
Share on other sites

Looks like Windows fonts can't be used without a lot of work.

 

I found a bunch of fonts in '64c' format, which just need the first 2 bytes stripped to work on the Aquarius. These files can also be loaded into PixelFontEdit, which can export character maps as c or asm source code.

 

The only problem is C64 characters are arranged in 'PETSCII' rather than normal ASCII. Moving them to the correct positions by hand is tiresome, so I wrote a FreeBASIC program to translate them. With a few modifications this program could also be made to work with character sets from other computers with non-standard maps.

 

That should be all the tools required, now I just have to get on with it...

 

Great find and good luck with the task ahead :) !

Share this post


Link to post
Share on other sites

My collection only had 60 fonts. Now I have 10 times more!

Glad I could help! Although now you also have to look through all these fonts, to see which ones you want to choose :grin:

Edited by Aquaman

Share this post


Link to post
Share on other sites

Here is what I have done so far - 55 fonts.

 

 

You have been working hard I see and you put in some very nice sets! PS I noticed you only took the non-special characters of each font, any special reasons for that?

Share this post


Link to post
Share on other sites

you only took the non-special characters of each font, any special reasons for that?

C64 fonts generally only have 128 characters, and many of the graphics shapes are the same as the Aquarius. I did include graphics characters in the C16 and CBM348 fonts.

 

However it's not finished yet; I want to add more useful graphic tiles, perhaps with some fonts designed to enhance existing Aquarius games.

Share this post


Link to post
Share on other sites

C64 fonts generally only have 128 characters, and many of the graphics shapes are the same as the Aquarius. I did include graphics characters in the C16 and CBM348 fonts.

 

However it's not finished yet; I want to add more useful graphic tiles, perhaps with some fonts designed to enhance existing Aquarius games.

Of course you are right, I forgot that the other C64 characters are mostly reversed characters of the first 128. And I like your idea of having for example an actual frog in froggy or pac-man in Mr.Pac. This would certainly make the existing games look a lot better.

Share this post


Link to post
Share on other sites

 

However it's not finished yet; I want to add more useful graphic tiles, perhaps with some fonts designed to enhance existing Aquarius games.

What font designer do you use? I can recommend CBM Prg Studio, which also has a great graphics tool. It can be downloaded here: http://www.ajordison.co.uk/download.html

Of course this is intended for C64 Graphics, but with your 64ctoAq tool the graphics can easily be converted into Aquarius readable graphics.

Edited by Aquaman

Share this post


Link to post
Share on other sites

I hadn't thought about that, until now! I want to create commands for defining characters, loading bitmap screens etc. Perhaps I should add sprites to the list.

 

Hi Bruce, if possible could you share an update on this great project?

Share this post


Link to post
Share on other sites

Hi Bruce, if possible could you share an update on this great project?

There's a problem with sending pattern data to the board. It occasionally misses bytes if the data is sent too rapidly (needs about 6 NOP's between writes, and I don't know why!).

 

Right now I am finalizing the PCB for my micro-expander. Hope to get the main board design finished and off to OSH Park next week, then I will take another look at the PCG.

  • Like 1

Share this post


Link to post
Share on other sites

There's a problem with sending pattern data to the board. It occasionally misses bytes if the data is sent too rapidly (needs about 6 NOP's between writes, and I don't know why!).

 

Right now I am finalizing the PCB for my micro-expander. Hope to get the main board design finished and off to OSH Park next week, then I will take another look at the PCG.

Many thanks for the update!

As for the missing bytes, I wish I could be of any help, but unfortunately my technical knowledge is much to limited :( ! However I am sure you will figure it out and solve the problem yourself but maybe some other forum member can be of any assistance?

Exciting to hear that the new Micro-Expander is nearing it's completion, this is also a big step ahead for the existing hardware. :)

Share this post


Link to post
Share on other sites

Wow, amazing stuff! I have an Aquarius but I never imagined it could do these kinds of things. I'm more of a Commodore guy and I have a project to add bitmap graphics to the Commodore PET using a similar method with the character rom. Just need time to work on it.

 

Anyway, it seems to me like all the pieces are out there to make a new "Aquarius III" motherboard, with everything included... extended BASIC, new OS, full RAM, USB drive, mini expander, bitmapped graphics / custom fonts, built-in games, and composite video (or maybe RGB) video out. If you leave out the RF modulator and packed the chips tighter together you could make a cool drop-in replacement motherboard for the Aquarius case, or better yet go all the way and design a new 3D-printed case and put in a "real" keyboard. The possibilities are endless ;-)

 

Steve

Share this post


Link to post
Share on other sites

There's a problem with sending pattern data to the board. It occasionally misses bytes if the data is sent too rapidly (needs about 6 NOP's between writes, and I don't know why!).

 

Right now I am finalizing the PCB for my micro-expander. Hope to get the main board design finished and off to OSH Park next week, then I will take another look at the PCG.

Did you manage to solve the missing bytes problem?

Share this post


Link to post
Share on other sites

Did you manage to solve the missing bytes problem?

 

I found a timing anomaly in the code below that increments the pattern data pointer (x register). I had correctly counted 2 cycles for execution of the 'adiw' instruction, but forgot that it only consumes 1 cycle when skipped. Thus when storing the first 7 bytes of each character pattern the code was short by 1 cycle, causing the MCU to gradually lose sync with the data bus.

  sbrc xh,6          ;16    skip next instruction unless bit 6 of xh is set (row  
  adiw x,1           ;17,18 x+1 = advance to next char#

Here's the corrected code. The 16 bit 'adiw' instruction is replaced with two 8 bit instructions that do the same job. R10 and R11 are previously set to a 16 bit constant value of 1 (ie. R10 = 1, R11=0).

  sbrc xh,6          ;16    skip next instruction unless bit 6 of xh is set (row 
  add  xl,r10        ;17    xl+1 = advance to next char# 
  adc  xh,r11        ;18    extend add to 16 bit         

It seems to work OK now (can load a full screen without needing any NOPs). Next step is to see if it can handle continuous streaming direct from the USB port.

Edited by Bruce Abbott
  • Like 1

Share this post


Link to post
Share on other sites

 

I found a timing anomaly in the code below that increments the pattern data pointer (x register). I had correctly counted 2 cycles for execution of the 'adiw' instruction, but forgot that it only consumes 1 cycle when skipped. Thus when storing the first 7 bytes of each character pattern the code was short by 1 cycle, causing the MCU to gradually lose sync with the data bus.

  sbrc xh,6          ;16    skip next instruction unless bit 6 of xh is set (row  
  adiw x,1           ;17,18 x+1 = advance to next char#

Here's the corrected code. The 16 bit 'adiw' instruction is replaced with two 8 bit instructions that do the same job. R10 and R11 are previously set to a 16 bit constant value of 1 (ie. R10 = 1, R11=0).

  sbrc xh,6          ;16    skip next instruction unless bit 6 of xh is set (row 
  add  xl,r10        ;17    xl+1 = advance to next char# 
  adc  xh,r11        ;18    extend add to 16 bit         

It seems to work OK now (can load a full screen without needing any NOPs). Next step is to see if it can handle continuous streaming direct from the USB port.

Great to hear it seems like you have solved this tricky problem. :thumbsup: Please keep us posted :)

Share this post


Link to post
Share on other sites

Sorry for bumping the thread after more than a year later but after finishing the reading I want more :)

 

Was the project continued?, can we help in some way?

Edited by jltursan
  • Like 1

Share this post


Link to post
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.

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