Jump to content

Recommended Posts

Sometimes' Piet Mondrian pictures gave me an idea for an animation that would work in the TI's odd color modes. The animation is a simple roto-zoomer programmed in Java, resulting in 360 256x192 images.


post-35226-0-11678700-1487349025_thumb.png


I originally planned to run the animation through a project I have been working on for a while: a 'video encoder' that takes a series of images and calculates how to get from one image to the next with the fewest possible changes. The encoder is also programmed in Java, but the result can be played back on the TI given enough storage space. Unfortunately I could not get the desired result from the encoder because it's based on "half-bitmap" mode, which is more flexible than graphics I mode, but makes double buffering difficult. If you want to see how far I got with this, open "rotozoom-encoder-8.bin". This example uses around 1100 bytes for each of the 360 frames, which fits nicely into a 512K cart. As you can see it has a lot of noise, resulting from the lack of double buffering.


I then switched to Graphics I mode, and instead of using the encoder I imported each image using the map import code from Magellan (which was improved in the process :-). This method resulted in more bytes per frame, so I could only fit half of the frames (180 frames) into a 512K cart, but on the positive side Graphics I mode can easily be double buffered. The result is quite pleasing to look at as you can see from "rotozoom8.bin" and "rotozoom8.rpk".


Note that these carts do not require 32K as the code is running primarily from scratchpad.


rotozoom-encoder-8.bin

rotozoom8.bin

rotozoom.rpk

  • Like 17
Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/
Share on other sites

  • 1 month later...
  • 3 years later...
On 2/17/2017 at 5:46 PM, Asmusr said:
Sometimes' Piet Mondrian pictures gave me an idea for an animation that would work in the TI's odd color modes. The animation is a simple roto-zoomer programmed in Java, resulting in 360 256x192 images.

 

 

 

 

post-35226-0-11678700-1487349025_thumb.png

 

 

 

 

 

I originally planned to run the animation through a project I have been working on for a while: a 'video encoder' that takes a series of images and calculates how to get from one image to the next with the fewest possible changes. The encoder is also programmed in Java, but the result can be played back on the TI given enough storage space. Unfortunately I could not get the desired result from the encoder because it's based on "half-bitmap" mode, which is more flexible than graphics I mode, but makes double buffering difficult. If you want to see how far I got with this, open "rotozoom-encoder-8.bin". This example uses around 1100 bytes for each of the 360 frames, which fits nicely into a 512K cart. As you can see it has a lot of noise, resulting from the lack of double buffering.

 

 

 

 

 

I then switched to Graphics I mode, and instead of using the encoder I imported each image using the map import code from Magellan (which was improved in the process :-). This method resulted in more bytes per frame, so I could only fit half of the frames (180 frames) into a 512K cart, but on the positive side Graphics I mode can easily be double buffered. The result is quite pleasing to look at as you can see from "rotozoom8.bin" and "rotozoom8.rpk".

 

 

 

 

 

Note that these carts do not require 32K as the code is running primarily from scratchpad.

 

 

 

 

 

rotozoom-encoder-8.bin 512 kB · 22 downloads

 

rotozoom8.bin 512 kB · 24 downloads

rotozoom.rpk 106.1 kB · 9 downloads

What is meant for double buffering ? 

 

Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-4680427
Share on other sites

4 hours ago, whoami999ster said:

What is meant for double buffering ? 

It means you have two screen buffers: one that's displayed and another where the next frame is being drawn. When the frame is ready you show that buffer instead and start drawing the next frame in the buffer that was displayed before, and so on. If you sync the buffer flipping with the VPD's vertical refresh you can get flicker free animations. The 9918A is good at double buffering because you can choose where in VRAM the different tables are stored. Double buffering is most important at high speed and when you change multiple tables at the same time, e.g. patterns and name table.

  • Like 1
Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-4680541
Share on other sites

... but in which memory area did you stored all the 180 frames.

just to simplify ... then you load the first two frames in the buffers and then load/dispaly the name table with the content of the first buffer and then load the second one in the and in the mean time you get a new frame from the "frames staging area" and so on all this into an infinite loop ?

something like that? or I'm very far from... 

Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-4683216
Share on other sites

4 hours ago, whoami999ster said:

... but in which memory area did you stored all the 180 frames.

 

He used a 512 KiB cartridge as he described here:

 

On 2/17/2017 at 11:46 AM, Asmusr said:

This example uses around 1100 bytes for each of the 360 frames, which fits nicely into a 512K cart.

 

ROM cartridges, such as the 512 KiB cartridge @Asmusr used, employ bank-switching in the >6000 – >7FFF memory space of the CPU.

 

...lee

  • Like 1
Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-4683297
Share on other sites

that's exactly this 512K that make me confused (with all the rest LOL) .... to much wizardry here :( ... KiB stand for Kbits ? 

I know that my explanation is at kid-garden level ... but help me and I will grow up quickly ... I'm reading tons of document/books and i need time to metabolize but with practical example everything is boosted... 

 

@Asmusr : no way to have an example of one frame from the demo? 

 

Thanks for your patience and your time

Sincerely 

Francesco 

Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-4684030
Share on other sites

1 hour ago, whoami999ster said:

@Asmusr : no way to have an example of one frame from the demo? 

The frames are all there in the cartridge bin. The first frame starts at offset 300 hex. It consists of:

 

Color table: 32 bytes

Total number of patterns in frame: 1 byte

Number of patterns for run 1: 1 byte

Start pattern index for run 1: 1 byte

Patterns for run 1: number of patterns * 8 bytes

...

Number of patterns for run n: 1 byte

Start pattern index for run n: 1 byte

Patterns for run n: number of patterns * 8 bytes

Name table: 768 bytes

End marker: 1 byte. 255 if last frame in ROM bank, 0 if next frame is in the same ROM bank.

 

The next ROM banks starts at address 2000 hex, 4000 hex, and so on and the first frame in a bank is always at offset 300 hex.

Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-4684091
Share on other sites

2 hours ago, whoami999ster said:

KiB stand for Kbits ?

i = binary powers

KiB = Kilo(binary)byte = what we used to call KB earlier; 1 KiB = 1024 byte

MiB = Mega(binary)byte = 1024 KiB

1 KB is now 1000 byte (which would be the ideal case, but it is clear that not everyone will follow that recommendation)

 

https://en.wikipedia.org/wiki/Binary_prefix

  • Like 1
Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-4684120
Share on other sites

2 hours ago, whoami999ster said:

KiB stand for Kbits ?

 

“KiB” is the International Electrotechnical Commission (IEC) abbreviation for “KibiByte”—short for “Kilo Binary Byte”. The “Ki” part stands for 210, which is what we all use(d) for a binary “kilo” in “kB” or “KB” for “kilobyte”. This definition was necessary to avoid confusion with the International System of Units definition of “kilo” (abbreviated ‘k’) as 103.

 

‘B’ always stands for “byte” and ‘b’ for “bit”—so, 512 KiB is 512 x 210 = 512 x 1024 = 524288 bytes.

 

...lee

  • Like 1
Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-4684129
Share on other sites

7 hours ago, Lee Stewart said:

B’ always stands for “byte” and ‘b’ for “bit”—so, 512 KiB is 512 x 210 = 512 x 1024 = 524288 bytes.

Ahh. I was waiting to see the bit representation...so I just multiply by 8

 

Edited by GDMike
Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-4684456
Share on other sites

  • 3 years later...

Hello Rasmus,

 

It's been a long time but still on my keens with the frames identification./ generation..

 

May I kindly ask you a little help with the frame generations o sort of "how to" procedure like

- where/how did you produced the frames ? 

- which tool did you used ? 

- How did you "encode" the frames in "bytes" for VDP  

- How did you loaded the frame in the ROM banks 

 

Sorry for a lot o questions and be free to send me to hell if you don't want waste time 

Thanks as usual for your patience and time 

 

Ciao

 

 

Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-5558536
Share on other sites

I really don't remember much about this after 7 years, but I will try to answer your questions. 

 

- where/how did you produced the frames ? 

- which tool did you used ? 

 

Few modern tool are able to deal with the color and resolution limitations of retro home computers. I have written my own tools in Java for drawing and saving graphics for the TI-99/4A, which I have used for several different projects. In this case I wrote some code to rotate an image that I drew in Magellan. I don't mind sharing my code, but unless you know Java it would be of little value.

 

- How did you "encode" the frames in "bytes" for VDP  

 

Again using a Java program. Reading through the posts, I apparently used "code from Magellan" for the flicker free version, which no longer rings any bell. The "Encoder" that I used for the flickering version, I still have, and I have used it for multiple projects including the Mega Demo and my attempt at doing a Bad Apple animation, but again it's not code that's generally useable.

 

- How did you loaded the frame in the ROM banks 

 

The simple answer is that I took the file with the assembled, binary program code, padded it to 8k, and concatenated it with the file produced by my encoder tool as described above, e.g. using copy /B command in Windows.

 

When I create a large ROM cart file today, which would usually depend on the 32K, I first use my ea5tocart tool on the E/A#5 files to generate a 32K bin file. I then combine it with whatever other files I have that need to go into the other banks. It's a simple process of concatenating files, where you just have to be aware that each bank is 8K in size.

 

So basically you can take any old file, call it .bin, and load it on the TI-99/4A. The thing that makes it work is that the first bank at least, but better also the last bank, and even better all of the banks, contain a header that tells the TI-99/4A that this is a ROM, what the name of the program is, and at which address to start the program. Again I have a Java program that copies the header from the first bank into the other banks, which I can use in my script to build the final cartridge file.  

 

  • Like 3
Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-5558701
Share on other sites

This concept would make a hell of a background for a lunar/Martian lander or black hole Parsec FPS gunner type game.. if a bitmap could be used. I could imagine using images of real NASA surface details.. DEM data.. I think it is/was called to generate bitmaps from. The game could pull from a library of those images based on other factors selected by the player.. coordinates, missions, artifacts.. heck randomness!

 

Really impressive!

Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-5558996
Share on other sites

On 11/1/2024 at 8:17 PM, Asmusr said:

I really don't remember much about this after 7 years, but I will try to answer your questions. 

 

- where/how did you produced the frames ? 

- which tool did you used ? 

 

Few modern tool are able to deal with the color and resolution limitations of retro home computers. I have written my own tools in Java for drawing and saving graphics for the TI-99/4A, which I have used for several different projects. In this case I wrote some code to rotate an image that I drew in Magellan. I don't mind sharing my code, but unless you know Java it would be of little value.

 

- How did you "encode" the frames in "bytes" for VDP  

 

Again using a Java program. Reading through the posts, I apparently used "code from Magellan" for the flicker free version, which no longer rings any bell. The "Encoder" that I used for the flickering version, I still have, and I have used it for multiple projects including the Mega Demo and my attempt at doing a Bad Apple animation, but again it's not code that's generally useable.

 

- How did you loaded the frame in the ROM banks 

 

The simple answer is that I took the file with the assembled, binary program code, padded it to 8k, and concatenated it with the file produced by my encoder tool as described above, e.g. using copy /B command in Windows.

 

When I create a large ROM cart file today, which would usually depend on the 32K, I first use my ea5tocart tool on the E/A#5 files to generate a 32K bin file. I then combine it with whatever other files I have that need to go into the other banks. It's a simple process of concatenating files, where you just have to be aware that each bank is 8K in size. 

 

So basically you can take any old file, call it .bin, and load it on the TI-99/4A. The thing that makes it work is that the first bank at least, but better also the last bank, and even better all of the banks, contain a header that tells the TI-99/4A that this is a ROM, what the name of the program is, and at which address to start the program. Again I have a Java program that copies the header from the first bank into the other banks, which I can use in my script to build the final cartridge file.  

 

Hi Rasmus 

For first thanks for your answer and time ...

During the week end I red stuff about ROM Banks and switching and I realize I miss a lot of knowledge :(

Anyway I took a look to your (fantastic) tool tividconvert.exe and I think I've more or less understood almost the macro technique implemented...

Now just to be sure If i'm totally wrong or I'm almost on the right path ... let me try to summarize my thought and get from you an OK or KO 

 

tividconvert "allign" some tasks that are related to the image and sound processing (at the moment I'm not ready to understand the sound part but primari in the video) of the video you want to "cart-erize" .

Sorry to be very banal with the description but when the frames have been "selected" the other tool convert9918 produce the .TIAC and .TIAP files ... then that the contents of those files are "wire" in ROM back format and finally the cart (.bin) is produced ... 

 

As far I could undestand in this case the ROM is a sort of additional memory extension to the console rom (and eventually the 32K ext.) can be user as "data reporitory" as in this case the pattern and color are stored ..or even with some part of programs that can be called from a EA program in RAM ... 

 

Obviously there an infinite set of details that I've to understand and metabolize (i.e. understand the two source cartheaderx.a99 and cartheader.a99 what was used for)

 

I would be interested on how "wire" the data in ROM bank , how to access (read) and use the ROM as data staging area or program area ... do you have any lecture to suggest (probably here in the forum there is already something ... I'm sure) ... any book... documentaion... link would be very helpful

 

Please let me know if I'm complety lost or I've undertood almost the peek of iceberg  

 

Thanks once again!

  

Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-5560126
Share on other sites

6 hours ago, whoami999ster said:

For first thanks for your answer and time ...

During the week end I red stuff about ROM Banks and switching and I realize I miss a lot of knowledge :(

Anyway I took a look to your (fantastic) tool tividconvert.exe and I think I've more or less understood almost the macro technique implemented...

Now just to be sure If i'm totally wrong or I'm almost on the right path ... let me try to summarize my thought and get from you an OK or KO

Well, tividconvert wasn't done by me but by @Tursi.

  • Like 1
Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-5560237
Share on other sites

1 hour ago, Tursi said:

It's all right, nobody ever thinks I've created anything ;)

 

I'm not sure I understand the questions though... can you be more direct in what you'd like to know?

 

I understood that the .bin creation that  creation of the .bin file is "quite simple" I mean it a copy /b in order to concatenate the pgm assembled and the data from the encoder  then with your tool ea5tocart tool you can create the cart and eventually "add" further banks (I don't know the tool yet ... I'll make some test as soon as I understand which kind of data I must produce)

So maybe an example of the "raw" file just before the cart creation would help me to understand and see the content (i guess it's a simple binary code) ... 

Is it possible to "wire" a ROM bank with a program or some subroutine(BL xxxx or BLWP xxxx) and then can be called from a pgm in RAM? 

 

Thanks and sorry again for the missunderstanding ... you Great and you know!  and I'm looking forward for the new super mega demo!!!

 

Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-5560577
Share on other sites

ea5tocart is an app I deprecated many years ago. All its functionality and more are incorporated in Classic99 - though you do need to know a little more about the program (where it loads).
 

As it stands, the output cartridge is just a quick way to view your video (or, I suppose, to share it).

 

finalPACK.bin contains the interleaved audio and video data, packed solidly. This is not necessarily the most useful, but if you know what you need, this is the source data.

 

finalPACK8.bin contains the player and the video data. This attaches the player program and it breaks the data up into 8k pages (ie: no video frame splits across a page boundary).

 

I didn't build anything /specifically/ for interfacing the code in your own programs. If you look at the source for videoblaster, though, that's the playback code:

https://github.com/tursilion/videoblaster

 

It has been a long time since I've been in that code, but currently it loops at the end of playback. If you just wanted a video player, it should be easy to convert it to a subroutine that returns instead. You could remove or disable the joystick code if you don't want forward/rewind/pause functions ;)

 

Link to comment
https://forums.atariage.com/topic/262332-roto-zoom-animation/#findComment-5560608
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...