Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - pbfy0

Pages: 1 [2] 3
16
You don't need to send ndless_installer. nlaunch automatically installs ndless if it detects that ndless_resources it there.

17
TI-Nspire / Re: z80 emulator for Nspire
« on: April 11, 2014, 08:17:51 pm »
My experience with 3.6 is that it works, but you can't exit. If you reset with the button, you have about a 10% chance of getting a system error. I got a system error from this on 3.1 as well.

18
TI Calculators / Re: TI-Nspire Bricked
« on: April 08, 2014, 08:49:24 pm »
If it's stuck on the screen with the clock, as your ti-planet post says, taking the battery out and replacing it should fix your problem.

19
TI-Nspire / 2048 for Nspire
« on: March 29, 2014, 12:55:02 pm »
Since no one else has, I decided to take the plunge and write a version of 2048 in Nspire lua. It still has a few bugs, but it should be playable and fun

Controls: Arrow keys or 8/6/2/4 to move tiles. Enter to reset after winning or losing, or ctrl-del to force a reset during a game. Use any letter to change to a different save slot, to allow multiple games at the same time.

New: Now has graphics based on NBonaparte's modification

20
TI-Nspire / Re: z80 emulator for Nspire
« on: March 26, 2014, 10:54:46 pm »
I have a copy

21
TI-Nspire / Re: nvid - Compressed video player for the Nspire
« on: March 12, 2014, 06:24:18 pm »
Well, if the fps is reduced, it will play closer to the correct speed. However, it won't increase the framerate on the calculator; that will stay low.

22
TI-Nspire / Re: nvid - Compressed video player for the Nspire
« on: March 12, 2014, 03:52:39 pm »
I know, it is kind of slow. I have a few ideas for optimizations, but i'm not sure how much effect they will have. The README is a good idea, too.

23
TI-Nspire / Re: nvid - Compressed video player for the Nspire
« on: March 12, 2014, 03:47:57 pm »
I thought it added the association automatically...

24
TI-Nspire / Re: nvid - Compressed video player for the Nspire
« on: March 12, 2014, 03:19:18 pm »
Sorry if I was unclear:
  • The VP8 codec is compressed lossily (ie, after decoding the result is not exactly the same as the original)
  • Nspire Movie Player also uses lossy compression (its format is a zip of jpegs, and jpegs are lossily compressed)
  • As a result of using a video codec, rather than compressing each frame individually, it can result in much smaller file sizes with similar quality.

25
TI-Nspire / Re: nvid - Compressed video player for the Nspire
« on: March 12, 2014, 11:50:02 am »
Yes, although the player doesn't actually use the Webm container.

26
TI-Nspire / Re: nvid - Compressed video player for the Nspire
« on: March 12, 2014, 08:28:56 am »
The compression is lossy. It plays movies that are about 1.5 megabytes per minute of video, compared to 4 for nspire movie player. The quality is also better.

27
TI-Nspire / nvid - Compressed video player for the Nspire
« on: March 11, 2014, 10:02:05 pm »
Nvid is a video player for the Nspire. It is not the first such project, but it is unique in that it uses vp8 video. This allows long videos to be stored with a relatively small file size and good quality, although it results in somewhat slow playback.

Nvid supports both the Nspire CX, in full color, and the Touchpad/Clickpad in grayscale.

One example video is included, sintel.ivf.tns. To create your own videos, drag any video onto wrapper.bat in the "converter" folder. This creates a file called output.ivf.tns that can be transferred to the calculator.

Nvid does not have a file browser, so you need a version of ndless that supports file association. Run nvid.tns once to install the file association. After that, you should be able to open an ivf file and have it play.

Download here:
https://github.com/pbfy0/nvid/releases/download/v1.1/nvid.zip
Spoiler For File format details:
The file format is 320x240 YUV420P vp8 IVF. Any file of that format should work; you don't need to use the encoder.

28
To add  CAS support:

  • Update your calculator to OS 3.1. Download it from here. Be careful not to get anything newer.
  • Download Nlaunchy from here.
  • Download TNOC from here
  • Follow the instructions for Nlaunchy in README. Use the 3.1 CAS OS for phoenix.tns

29
Calculator C / [Ndless] Strange crash on load
« on: March 09, 2014, 05:23:32 pm »
I'm working on a vp8-based video player for the nSpire, but i'm getting very strange errors that seem to be unrelated to the vpx library. When I include the block
Code: [Select]
if(fread(frame, 1, frame_sz, infile) != frame_sz)
            die("Frame failed to read complete frame");
, the program crashes as soon as it loads, before that line is even executed. At first, I thought the error was because of libvpx, but the version below, which has everything related to libvpx commented out, still crashes in the same way. This occurs in both the kArmTi emulator and a physical calculator. What am I doing wrong? The full source is available at https://github.com/pbfy0/nvid
Code: [Select]
/*
  Copyright (c) 2010 The WebM project authors. All Rights Reserved.


  Use of this source code is governed by a BSD-style license
  that can be found in the LICENSE file in the root of the source
  tree. An additional intellectual property rights grant can be found
  in the file PATENTS.  All contributing project authors may
  be found in the AUTHORS file in the root of the source tree.
 */
 
 
#include <os.h>
#include <libndls.h>
#include <nspireio2.h>


FILE            *infile;
nio_console csl;
#define printf(...) nio_printf(&csl, __VA_ARGS__)


//#define VPX_CODEC_DISABLE_COMPAT 1
//#include "vpx/vpx_decoder.h"
//#include "vpx/vp8dx.h"
//#define vpx_interface (vpx_codec_vp8_dx())
//#define clamp(x) (x < 0 ? 0 : (x > 255 ? 255 : x))
 
 
#define IVF_FILE_HDR_SZ  (32)
#define IVF_FRAME_HDR_SZ (12)
 
static unsigned int mem_get_le32(const unsigned char *mem) {
    return (mem[3] << 24)|(mem[2] << 16)|(mem[1] <<|(mem[0]);
}
 
static void die(char *text) {
    uart_printf(text);
    if(text[strlen(text)-1] != '\n')
        uart_printf("\n");
      fclose(infile);
    exit(EXIT_FAILURE);
}
 
/*static void die_codec(vpx_codec_ctx_t *ctx, char *s) {
    const char *detail = vpx_codec_error_detail(ctx);
    uart_printf("%s: %s\n", s, vpx_codec_error(ctx));
    if(detail)
        uart_printf("    %s\n",detail);
      fclose(infile);
    exit(EXIT_FAILURE);
}*/
 
 
int main(int argc, char **argv) {
      uart_printf("asdasdasd\n");
    //vpx_codec_ctx_t  codec;
    int              flags = 0, frame_cnt = 0;
    unsigned char    file_hdr[IVF_FILE_HDR_SZ];
    unsigned char    frame_hdr[IVF_FRAME_HDR_SZ];
    unsigned char    frame[256*1024];
    //vpx_codec_err_t  res;
     
      nio_console csl;
      clrscr();
      // 53 columns, 29 rows. 0px offset for x/y. Background color 0 (black), foreground color 15 (white)
      nio_init(&csl, 53, 29, 0, 0, 0, 15, TRUE);
      nio_fflush(&csl);
      nio_set_default(&csl);
      printf("hello world!");
 
    //(void)res;
    /* Open files */
      if(argc!=2){
         die("Wrong number of arguments.");
         return 0;
      }
      if(!(infile = fopen(argv[1], "rb"))){
         die("Could not open input file");
         return 0;
      }
      //return 0;
 
    /* Read file header */
    if(!(fread(file_hdr, 1, IVF_FILE_HDR_SZ, infile) == IVF_FILE_HDR_SZ
         && file_hdr[0]=='D' && file_hdr[1]=='K' && file_hdr[2]=='I'
         && file_hdr[3]=='F'))
        die("Not an IVF file!");
 
    //printf("Using %s\n",vpx_codec_iface_name(vpx_interface));
    /* Initialize codec */
    //if(vpx_codec_dec_init(&codec, vpx_interface, NULL, flags))
//        die_codec(&codec, "Failed to initialize decoder");
 
    /* Read each frame */
    while(fread(frame_hdr, 1, IVF_FRAME_HDR_SZ, infile) == IVF_FRAME_HDR_SZ) {
        unsigned int               frame_sz = mem_get_le32(frame_hdr);
        //vpx_codec_iter_t  iter = NULL;
        //vpx_image_t      *img;
 
 
        frame_cnt++;
            uart_printf("x%u\n", frame_sz);
        if(frame_sz > sizeof(frame))
            die("Frame data too big for example code buffer");
           
        if(fread(frame, 1, frame_sz, infile) != frame_sz)
            die("Frame failed to read complete frame");
           
            //if(vpx_codec_decode(&codec, frame, frame_sz, NULL, 0))
        //    die_codec(&codec, "Failed to decode frame");
 
       
    }
     
    printf("Processed %d frames.\n",frame_cnt);
    //if(vpx_codec_destroy(&codec))
//        die_codec(&codec, "Failed to destroy codec");
 
    fclose(infile);
    return EXIT_SUCCESS;
}

Edit: I figured out what the problem was. The nspire apparently doesn't like large initializing large arrays. When that block was omitted, the initialization of the frame variable got optimized out, so the crash didn't happen. I replaced the array initialization with malloc, and now it works.

30
TI-Nspire / Re: nGL - a fast (enough) 3D engine for the nspire
« on: February 27, 2014, 05:00:37 pm »
No, it still crashes. Sorry.

Pages: 1 [2] 3