Author Topic: Casio fx-9860G video player  (Read 29441 times)

0 Members and 1 Guest are viewing this topic.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio fx-9860G video player
« Reply #45 on: January 24, 2011, 07:51:21 pm »
Any of those would be pretty acceptable considering that we're talking about a calculator here. However, as soon as we can figure out what kind of buffer size we have to deal with (SafeRAM?) and where the heck the screen itself is, then we can start to work on video.

I'm currently on Step 2, the "Freeze your calculator and figure out how to get it unfrozen part."
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio fx-9860G video player
« Reply #46 on: January 24, 2011, 08:57:05 pm »
X.x, yeah I hope we can figure out soon. X.x It can be hard at first when the entire calc is undocumented. I hope the Ndless of the Prizm won't happen only 3 years later X.x.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio fx-9860G video player
« Reply #47 on: January 24, 2011, 09:31:24 pm »
Well, one of the main problems is the virtual memory, which pretty effectively blocks us from knowing much about the Prizm itself.

But, we're way ahead of where the Nspire was for the first year only a week or so after the calc came out, because we have the ability to run arbitrary machine code. It's mostly a matter of eliminating the checksums for convenience (probably with a shell) and getting a good assembler working.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio fx-9860G video player
« Reply #48 on: January 24, 2011, 09:58:42 pm »
Virtual memory? ???

And I see. I remember the overclock code. I hope you can find a solution about the checksums. Didn't you just replace the add-in code without touching the checksum, while making sure the file remains the same size, though?

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio fx-9860G video player
« Reply #49 on: January 24, 2011, 10:04:33 pm »
Virtual memory is kind of odd, but it basically works like this:

In reality, for many systems, the usable RAM areas are scattered far apart and a program constantly has to switch between them to use them. With virtual memory, every program(except for the OS) is presented with a continuous piece of empty memory that is free to use and may even be larger than the total RAM available. The processor keeps track of all of the complicated paging and the program has an easier to use memory space. The problem is that what we want is the physical memory. The virtual memory shields the physical memory and there's no easy way to get around it, at least without modifying the OS.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio fx-9860G video player
« Reply #50 on: January 26, 2011, 01:45:52 am »
Hmm I see. That sucks. X.x

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio fx-9860G video player
« Reply #51 on: January 26, 2011, 02:04:22 am »
That's wrong  :P

You can disable the virtual memory by writing to the MMUCR register.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio fx-9860G video player
« Reply #52 on: January 26, 2011, 02:06:22 am »
Yeah but your previous post seemed like it made it look like it caused more troubles for us to figure out how the Prizm RAM works...

Offline Horrowind

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +6/-0
    • View Profile
Re: Casio fx-9860G video player
« Reply #53 on: February 05, 2011, 03:54:55 pm »
After some experiments i wrote a short bash script for converting an avi file to a cuv file (for the video player). It doesn't have audio support and the used dither is not the best one can think of. It uses ffmpeg, image-magick and bc.

In my tests (in the SDK) the audio (played from the original video) gets asynchron, so the framerate is probably wrong

* converts Wall-E for viewing it in his Math lessons... :)

Code: [Select]
#!/bin/sh
[ -z ${1} ] && echo "Usage: $(basename $0) <filename>" && exit||filename=${1}
duration="$(ffmpeg -i $filename 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,// | cat)";
seconds="$(echo $duration | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }' | sed 's/[,]/./')";
framerate=40;
framesd="$(echo "$framerate*$seconds" | bc)";
frames=${framesd%.*}
for i in $(seq 0 $frames);
do time="$(echo "
scale = 3;
result = $i/$framerate;
if (0 < result && result < 1) {
print "0"
}
print result;
" | bc)";
echo $time;
ffmpeg -vframes 1 -ss $time -i $filename -f image2 pipe: | convert - -resize 128x64\! -ordered-dither o3x3  pbm:- | sed '1,3d' | cat >> demo.cuv;
done;

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Casio fx-9860G video player
« Reply #54 on: February 05, 2011, 04:02:36 pm »
Yeah but your previous post seemed like it made it look like it caused more troubles for us to figure out how the Prizm RAM works...

It did, simply because it prevents easy RAM dumps. Now that we have the OS, it shouldn't be as much of a problem.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio fx-9860G video player
« Reply #55 on: February 06, 2011, 01:02:40 am »
After some experiments i wrote a short bash script for converting an avi file to a cuv file (for the video player). It doesn't have audio support and the used dither is not the best one can think of. It uses ffmpeg, image-magick and bc.

In my tests (in the SDK) the audio (played from the original video) gets asynchron, so the framerate is probably wrong

* converts Wall-E for viewing it in his Math lessons... :)

Code: [Select]
#!/bin/sh
[ -z ${1} ] && echo "Usage: $(basename $0) <filename>" && exit||filename=${1}
duration="$(ffmpeg -i $filename 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,// | cat)";
seconds="$(echo $duration | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }' | sed 's/[,]/./')";
framerate=40;
framesd="$(echo "$framerate*$seconds" | bc)";
frames=${framesd%.*}
for i in $(seq 0 $frames);
do time="$(echo "
scale = 3;
result = $i/$framerate;
if (0 < result && result < 1) {
print "0"
}
print result;
" | bc)";
echo $time;
ffmpeg -vframes 1 -ss $time -i $filename -f image2 pipe: | convert - -resize 128x64\! -ordered-dither o3x3  pbm:- | sed '1,3d' | cat >> demo.cuv;
done;
Hmm nice. Unfortunately I do not know much about bash scripts, how do I run them? Do they require Linux?

On a side note, welcome on the forums. :)

Yeah but your previous post seemed like it made it look like it caused more troubles for us to figure out how the Prizm RAM works...

It did, simply because it prevents easy RAM dumps. Now that we have the OS, it shouldn't be as much of a problem.
Ok, thanks for clarifying. I'm so not tech-savy about that stuff. X.x