24 09 2017
As I said in a previous post, I’ve contributed to some samples for the VITASDK.
This one is interesting to me as I’ve never used sockets before.
This sample is going to ping the Google DNS server 126.96.36.199.
I have to admit that I scratched my head for a while when trying to ping my laptop and not getting a response even though I saw the ping request in Wireshark.
An IRC (#henkaku & #vitasdk) user by the name of xyz told me to try to ping 188.8.131.52 and that the firewall in my laptop might be blocking the PSVita’s ping request.
He was right! I pinged 184.108.40.206 and I immediately got a reply… Stupid laptop…
24 09 2017
You can find my FFT library on github now : https://github.com/pyroesp/libFFT
Since I started my PSVita FFT homebrew, I’ve added three things:
- I’ve added a function to convert the amplitude values to decibel through a 20*log() function.
- I’ve added windowing, through a function that pre-computes a lookup table. You can now choose between 7 different windowing functions:
- Rectangular window
- Triangular window
- Hanning window
- Hamming window
- Blackman window
- Nuttall window
- Flat top window
- There are 3 important defines that need to be set: FFT_POINT, FFT_POINT_2, FFT_STAGES. These have now received a default value of respectively 512, 256 and 9. These can be set through the Makefile or through the CMakeLists file if you want more or less points.
Don’t forget to read the README file for more info.
The library is under Creative Commons Attribution-ShareAlike 4.0 International license, for more info see the LICENSE file.
23 09 2017
As some of you may know the PSVita, just like its predecessor the PSP, has been hacked and reverse engineered to allow unsigned code execution on FW3.60.
I’m not going to go into the details of how you develop programs for the PSVita.
Here’s the VITASDK and here are some samples, which I’m glad that I could contribute to.
I’ve done a couple of programs for the PSP a while back and thought I could try again on the PSVita.
Having done a crude embedded spectrum analyzer before, see my earlier How to program an FFT posts, I wanted to try to program an FFT on the PSVita.
14 12 2014
Hey, it’s been a while since I posted something new here.
I’ve always wanted to try my hand at an emulator and didn’t want to start with something too difficult like a true retro console. I searched for something to emulate and found out about the CHIP-8.
It has 35 different instructions encoded in a 2 byte opcode, 16 one byte registers, 2 timers, a hexadecimal keypad, a memory of 4096 bytes where the program starts at address 0x200 and a screen with a resolution of 64 pixels by 32 rows. The display buffer starts at 0xF00 and ends at 0xFFF.
27 03 2014
Someone on the matrix multimedia forum (French) needed to drive some WS2812 LEDs and wanted to use a 16F876A at 20MHz to do so.
The WS2812 LEDs are RGB LEDs with an integrated controller chip. There’s a data input and data output so you can cascade multiple LEDs by connecting DO to DI of the next LED. Each LED reads 3 bytes, being the value of the color green, red and blue.
Once you’ve sent a color to the LED, it will stay that color until you send another code.
Driving the LEDs would require timings in the 50ns/100ns range, but you can stretch it just a bit.
This is one of those things where timing is pretty much crucial and an AVR would be a better microcontroller for this as it executes one instruction per clock cycle where the PIC needs 4 clock cycles per instruction.