Jump to content

Photo

Animation playback on the TI-99/4A


103 replies to this topic

#26 acadiel OFFLINE  

acadiel

    Stargunner

  • 1,438 posts
  • www.hexbus.com
  • Location:USA

Posted Sun Feb 8, 2015 11:21 AM

After that, build, load and run videoblaster.a99 from the distribution package (EA#3, program name MAIN), and your video should play.

attachicon.gifclassic99BigFileHack.zip

 

Output from assembling the pics and sound:

C:\Users\Jon\Desktop\tursi\5-sao_tipics>videopack.exe OUT converted_ti_sao_sound
 OUTPUT2TEST

OUT03034.tiap
3034 frames, Audio ended with 276 bytes left 

276 is pretty good!  Lots less than 1500.  

 

Tried to assemble the videoblaster.a99 with WinASM99 and keep getting some errors...  Mostly an undefined SOUND label, as well as VDPWA/VDPWD labels (don't see them defined anywhere).  Any ideas what I'm doing wrong?

 

Edit:  Defined VDPWA and VDPWD in ASM99 settings... wasn't too sure what to define for SOUND equate though.  

VDPWD  EQU  >8C00             * VDP write data
VDPWA  EQU  >8C02             * VDP set read/write address 

Attached File  output.png   28.5KB   2 downloads

 

It's loading the output.  Just need to get the video player going :)  I tried equating SOUND to >8400 and some of the other equates and I get some really funky stuff when I try to run the modded Classic99 with the output file.



#27 OLD CS1 OFFLINE  

OLD CS1

    Technomancer

  • 5,687 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sun Feb 8, 2015 12:15 PM

Is there any discussion on how to do the audio encoding?  On my list of conversions to do is Berzerk and I would like to include the speech with the option to do so without the Speech Synthesizer.  I have attached samples for which I think our console-based playback is well-suited.

Attached Files



#28 nanochess OFFLINE  

nanochess

    Processorus Polyglotus

  • 5,633 posts
  • Coding something good
  • Location:Mexico City

Posted Sun Feb 8, 2015 12:18 PM

Impressive! :) :thumbsup:



#29 --- Ω --- OFFLINE  

--- Ω ---

    HexaCoreRunner

  • 12,989 posts

Posted Sun Feb 8, 2015 12:28 PM

On my list of conversions to do is Berzerk...

 

 YES!  Our little silver box TI is decades overdue for that game!  This is some of the best TI news I've heard all week.  I'm happy to hear that!   :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:



#30 acadiel OFFLINE  

acadiel

    Stargunner

  • 1,438 posts
  • www.hexbus.com
  • Location:USA

Posted Sun Feb 8, 2015 1:00 PM

This is what mine does when I assemble equating SOUND to >8400.  Probably am doing it wrong.

 

 



#31 Tursi OFFLINE  

Tursi

    Quadrunner

  • Topic Starter
  • 5,322 posts
  • HarmlessLion
  • Location:BUR

Posted Sun Feb 8, 2015 4:51 PM

Tried to assemble the videoblaster.a99 with WinASM99 and keep getting some errors...  Mostly an undefined SOUND label, as well as VDPWA/VDPWD labels (don't see them defined anywhere).  Any ideas what I'm doing wrong?


Ah... see, that's what happens when I start using convenience tools, nobody else can use my code. ;) I am using the 'fav equ/defs' function in Asm994A.

That said, you defined them correctly, I'm not sure why it isn't playing for you. I'll check if the source file is messed up after work, in the meantime, here's a working obj file. I played your video - it corrupts after the boss is defeated - I'm not sure how many frames you originally had (it should loop in theory), but that suggests a byte (or more) is missing somewhere.

Attached File  video.zip   844bytes   6 downloads

#32 Tursi OFFLINE  

Tursi

    Quadrunner

  • Topic Starter
  • 5,322 posts
  • HarmlessLion
  • Location:BUR

Posted Sun Feb 8, 2015 5:01 PM

Is there any discussion on how to do the audio encoding?  On my list of conversions to do is Berzerk and I would like to include the speech with the option to do so without the Speech Synthesizer.  I have attached samples for which I think our console-based playback is well-suited.


I thought I talked about it, but I can't locate it. For game speech though, you'll either need a clever main loop or you'll have to pause the game to talk (Berzerk should allow for the former, though, and that would be bloody amazing).

You can look at the source for 'audioconvert' in my package, but the discussion that I thought I'd written up somewhere was pretty simple.

Basically, the straight-forward way to do it, is just to divide the audio down to 4-bit resolution. This actually works and sounds okay as long as the audio has reasonable volume. For soft things like the intro to Let It Go, I was getting very staticy or outright silent areas.

The second approach I tried, what I use in my MOD converter, was to map each audio level to the sound chip's logarithmic output (just using a simple search, there are only 16 values). This is technically more accurate reproduction, but loud audio loses a lot of resolution and quiet audio still suffered from the problem of ending up muted a lot. The main reason this is an issue is that audio goes positive and negative around a center point, but TI audio is (essentially) positive only, with all the resolution down near 0.

I /did/ attempt to map all audio positive - I tried two approaches. One was to swing negative transitions positive. This worked, but was crazy noisy. The other was to /discard/ negative transitions. Surprisingly, this /also/ worked and was less noisy. But playing the whole waveform centered in the TI space still sounded better. The problem was once you're in the center of the logarithmic scale, you've already lost a lot of the resolution available at the low end - that's now at the bottom of the curve.

So for this converter, I threw accuracy out the window, and hand-wrote a volume mapping table that emphasized softer sounds. That seems to work pretty well - although very loud sounds are now a little more staticy, at least EVERYTHING can be heard. ;) Each sample is just matched to the value in the table that it comes closest to.

It's just a sample mapper, your basic trick will be to determine the sample rate that your code outputs at. This video player is around 13khz. Since Berzerk used a speech chip, it was around 8khz, and you could probably easily get away with 4khz. That should give you room to play. :) The sample conversion doesn't care about the rate, you do that externally.

#33 acadiel OFFLINE  

acadiel

    Stargunner

  • 1,438 posts
  • www.hexbus.com
  • Location:USA

Posted Sun Feb 8, 2015 5:35 PM

I posted it on YouTube... except for the very last part where it messed up :)

 

 

This is gonna be fun to play with, especially with short sequences with the new 2MB board and beyond!  Thanks for your help, Tursi!



#34 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 4,159 posts

Posted Mon Feb 9, 2015 12:10 AM

I /did/ attempt to map all audio positive - I tried two approaches. One was to swing negative transitions positive. This worked, but was crazy noisy. The other was to /discard/ negative transitions. Surprisingly, this /also/ worked and was less noisy. But playing the whole waveform centered in the TI space still sounded better. The problem was once you're in the center of the logarithmic scale, you've already lost a lot of the resolution available at the low end - that's now at the bottom of the curve.

 

Try this one. In GoldWave lower the volume (Effect, Volume, Change) to about half the power, then lift the sample into the positive (Effect, Offset). In both cases 50% should get you going. Or maybe that was about what you already did ?


Edited by sometimes99er, Mon Feb 9, 2015 12:12 AM.


#35 Tursi OFFLINE  

Tursi

    Quadrunner

  • Topic Starter
  • 5,322 posts
  • HarmlessLion
  • Location:BUR

Posted Mon Feb 9, 2015 10:13 PM

Yeah, that's essentially what I already did (except I didn't do it in Goldwave, but in the converter). I was just discussing various other approaches I tried, but the final essentially does as you suggest.



#36 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,082 posts
  • Location:Uzbekistan (no, really!)

Posted Tue Feb 10, 2015 2:54 PM

Incredible! I guess cartoons work well because they are very colourful (i.e. not natural). Try this:

 

 

The above has an interesting mix of cartoon and "real life" footage. Be interesting to see how that comes out.

 

What about black and white stuff? If I might suggest any particular scene from one of the best films ever made:

 

 

:-D



#37 Tursi OFFLINE  

Tursi

    Quadrunner

  • Topic Starter
  • 5,322 posts
  • HarmlessLion
  • Location:BUR

Posted Thu Feb 12, 2015 7:01 AM

Sorry, Willsy, I can't download videos here, it's too unreliable. Greyscale should look good, though, I got good results when I added greyscale conversion to Convert9918.

 

I am just posting to confirm I looked at the assembler issues and yes, videoblaster.a99 is broken. This is where I admit that I screwed up and lost the source code, and had to re-create it from the cartridge version, then didn't test it. ;)

 

Here's the fixed source, and it is tested. I'll update the archive on my website in a couple of days, I want to update the docs to use ffmpeg and see whether using sox for audio would make the process scriptable.

 

Spoiler

 



#38 OLD CS1 OFFLINE  

OLD CS1

    Technomancer

  • 5,687 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Thu Feb 12, 2015 7:29 AM

+1 for Sox.



#39 Tursi OFFLINE  

Tursi

    Quadrunner

  • Topic Starter
  • 5,322 posts
  • HarmlessLion
  • Location:BUR

Posted Sat Feb 14, 2015 12:24 PM

And here it is!

 

You'll have to forgive a Windows app instead of a script, but since all my other stuff is, what's one more? ;)

 

I haven't published this package yet, so it's just in my temp folder, but, unpack this, and it comes with all the tools needed. /IF/ I did it right, you don't need any extra packages or DLLs installed.

 

What's it do? Run "tividconvert myVideoFile.mpg", and in a little while you'll have both a raw and cartridge version of your video file.

 

The one gotcha that I noticed that isn't in the readme file is if your aspect ratio is taller than 4:3, you'll get a white edge on your video - it can only crop horizontally. The one gotcha that IS in the readme file, is that it will fail after all the hard work if there's no audio stream - so make sure your video file has an audio track, or a lot of time will be wasted. ;) So use a converter to size appropriately and add an audio track if needed.

 

Since it uses ffmpeg, it can manage any video file ffmpeg can. ;) The maximum raw output file is unlimited (but if you want to play it in Classic99, it will be fully loaded into RAM), and the maximum cartridge image is 32MB (it will write larger, but won't bother to pad it.)

 

I also updated Classic99 - the current version crashes if you load a 378 type file larger than 2MB. I rolled the command-line hack for 'big file hack' mode into the release as well.

 

Anyway... current location: http://www.harmlessl...IVidConvert.zip

 



#40 Tursi OFFLINE  

Tursi

    Quadrunner

  • Topic Starter
  • 5,322 posts
  • HarmlessLion
  • Location:BUR

Posted Mon Feb 16, 2015 7:42 AM

... anybody try the script yet? ;)

 

There's a bug if you have more than about 6500 frames, it will hang during the mogrify step. I've got that fixed but it will have to go into the final release version. (6500 frames is about 12 minutes).



#41 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,082 posts
  • Location:Uzbekistan (no, really!)

Posted Mon Feb 16, 2015 9:57 AM

I'm converting a video right now!



#42 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,082 posts
  • Location:Uzbekistan (no, really!)

Posted Mon Feb 16, 2015 11:54 AM

Tursi, what do use to capture the video playback in classic 99 (in order to upload it to YouTube)?

#43 --- Ω --- OFFLINE  

--- Ω ---

    HexaCoreRunner

  • 12,989 posts

Posted Mon Feb 16, 2015 12:09 PM

Tursi, what do use to capture the video playback in classic 99 (in order to upload it to YouTube)?

 

This sounds promising....  I'll be keeping my eyes open.  :)



#44 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,082 posts
  • Location:Uzbekistan (no, really!)

Posted Mon Feb 16, 2015 12:26 PM

It's just the money for nothing video (see further up in this thread). I'm not expecting very good results. I think it's too demanding too many colours. An old fashioned cartoon like Tom and Jerry might give excellent results. Still, it'll be great to get Dire Straits blasting out of a TI :-)



#45 OLD CS1 OFFLINE  

OLD CS1

    Technomancer

  • 5,687 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Mon Feb 16, 2015 12:34 PM

I want to see a video playback of a game played on the TI :)



#46 acadiel OFFLINE  

acadiel

    Stargunner

  • 1,438 posts
  • www.hexbus.com
  • Location:USA

Posted Mon Feb 16, 2015 6:36 PM

Just tried it and let it run for about 4-5 hours on a ~3:30 animation.    Downloaded the latest version of Classic 99 and did an open cart -> Other on it.

 

Works for a little while, and then loops only after like 20-30 seconds.

 

I must be doing something wrong. :)

 

 

Attached Files



#47 Ksarul OFFLINE  

Ksarul

    River Patroller

  • 4,815 posts

Posted Mon Feb 16, 2015 7:33 PM

A 30-second clip is about what the 2048K cart can hold, Acadiel. If it is looping at that point, maybe the computer thinks it is looking at a 2M file instead of your whole file. . .



#48 acadiel OFFLINE  

acadiel

    Stargunner

  • 1,438 posts
  • www.hexbus.com
  • Location:USA

Posted Mon Feb 16, 2015 8:15 PM

Yep, it was a 32M image that Tursi's scripts made. So I figured from the notes included with the above .zip that it would have handled it. Maybe you have to manually define the cart.

#49 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,082 posts
  • Location:Uzbekistan (no, really!)

Posted Tue Feb 17, 2015 1:24 AM

I also updated Classic99 - the current version crashes if you load a 378 type file larger than 2MB. I rolled the command-line hack for 'big file hack' mode into the release as well.

 

 

 

Is it something to do with this?



#50 Tursi OFFLINE  

Tursi

    Quadrunner

  • Topic Starter
  • 5,322 posts
  • HarmlessLion
  • Location:BUR

Posted Tue Feb 17, 2015 1:39 AM

Classic99 will only load 2MB carts. To play longer videos don't use the cart version, use the command line hack to pass in the packed output file (not the 8.BIN, the other one). Then EA#3 load videoblaster.obj (should be included), program name MAIN.

 

I use Open Broadcaster Software to do my captures of Classic99, Willsy. It's worked for everything I've got and is my current fav. It has the additional benefit of being able to stream, but it records just fine.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users