lua would not return or set arbitrary file positions
file:seek("set", 0) worked file:seek("cur") worked
but setting an offset or file:seek("end") failed
I tracked this down to a bug checking the return of rb->lseek
on error lseek returns a negative number and returns the file
position otherwise, the function was checking for if(N) instead of
if(N < 0)
Fixed - limited size of lseek to size of signed LuaNumber
Fixed - io:lines() stopped after first line containing only a newline
instead of returning a blank line and continuing till EOF
this fixes file:read("*l") as well
Fixed - ssize_t for read() with error checking
Change-Id: Ie859b288fb8f6814f1b3ae30992ecf78f2669de7
Lcd_update rect was hanging during horizontal screen update x = 238 and width = 2
which was within the bounds of the screen, this seems to be a weird corner case
but more testing needs done.
Update_rect now properly bounded between 0 - screen w/h
--Cleaned up code
Pixels in x are now multiples of 4.
Datasheet states:
-------------------------------------------------------------------------------------------
WORD_LENGTH=0 implies the input frame buffer is RGB 16 bits per pixel.
DATA_FORMAT_16_BIT field indicates if the pixels are in RGB 555 or RGB 565 format.
Limitations:
— BYTE_PACKING_FORMAT [3:0] should be 0x3 or 0xC if there is only one pixel per word.
— If there are two pixels per word, BYTE_PACKING_FORMAT [3:0] should be 0xF and
H_COUNT will be restricted to be a multiple of 2 pixels.
and
WORD_LENGTH=3 indicates that the input frame-buffer is RGB 24 bits per pixel (RGB 888). If
BYTE_PACKING_FORMAT [3:0] is 0x7, it indicates that there is only one pixel per 32-bit word
and there is no restriction on H_COUNT.
Limitations:
— If BYTE_PACKING_FORMAT [3:0] is 0xF, it indicates that the pixels are packed, i.e. there
are 4 pixels in 3 words or 12 bytes. In that case, H_COUNT must be a multiple of 4 pixels.
-------------------------------------------------------------------------------------------
We are using 16 bits per pixel and byte_packing = 0xF but device crashes with multiple of 2 pixels
Behaviour can be verified with plugin - oscilloscope, Horizontal mode device hangs as indicator
reaches right of screen
Change-Id: I1445f5334f4e7fe59304c65c76b47d0daa0614b2
This patch was supposed to only remove scroll worker from devices without
remote displays, the build system said otherwise
Change-Id: I240db89ee6b55818dbd2567338515b53ebe09300
fixed: conditional define
The upstream code changed a little bit with regard to the request_keys()
API. Also, we save some bytes (especially on the c200v2) by compiling with
-ffunction-sections and -fdata-sections, which allows Net to fit once again.
Change-Id: I3ab30127169c73e4cd8996f0c12e1223ee18d79f
This includes an upstream change to the Galaxies help text. `genhelp.sh'
no longer leaves temporary files sitting around, and the self-test feature
of lz4tiny.c works again.
Change-Id: I787f4cb3c258baade31638d6be18f95b7aa0705e
This brings the upstream version to b3da238 (though some of my own
changes are included on top of that).
Change-Id: Ida73e8cd86765413147ce891af3cc2b7aeda2b2a
This should cut just enough size off the binary to let Net still compile
for the c200v2. This is probably close to the last time I'll be able to do
this; I'm already resorting to dirty hacks like writing super terse error
messages.
Change-Id: I43344b9a601696d7ca56fc02af4a611fd9d1a150
They all work now :). I merged in part of Chris Boyle's Android port of
Puzzles to give the front end a way to know what keys the back end needs.
This also re-syncs to the latest upstream sources.
Change-Id: Ie0409bbb32f617ae5abf4f81be3b45d1552db9bb
The help text is now processed to generate a style array to pass to the
display_text library in addition to the text itself. The help text is still
compressed using LZ4, and still fits on the c200v2.
Change-Id: I7a3a664f90f67a1a018956c72d2b62d92b8ffd17
This prevents a (highly improbable) race condition when exiting, and uses
pcm_set_frequency() instead of mixer_set_frequency(), since that seems like
the Right Thing to Do (TM).
Change-Id: Icb6a4597843215f08b3835490ac63f67c9a04736
Rather than holding intermediate results as fixed-point, this converts them
directly to normal integers (in the range of the PCM sample) while mixing,
instead of waiting till the end to perform a separate shifting step. Also,
this precalculates some constants in the reverb code.
Change-Id: Ie04e444d145bc28ce67eef9ae0ead6d328acf28a
This allows CPU load to drop below 100%, which is good for anything
that scales frequency and voltage based on CPU load. Also conserves
some energy by letting the core go idle if there aren't any available
buffers.
Change-Id: I9385ac9e030f97010b12eb825875a900463ab0ac
Windows now ignores the hidden flag, so just nullify the entries
to hide depending upon whether or not bootloader install mode is
activated.
Change-Id: I00d0797e40ea3b5f5d5d8e1243b50cfcdd029bb4
Using the coprocessor was a good idea in theory, but didn't actually work.
This moves all SDL threads to the main core, which isn't ideal, but at
least works. Additionally, this also adds some good-practice stuff such as
setting the default sample rate on exit.
Change-Id: If1636b33d439000ec7c4e50f46e8d002708d3121
This is attempt to simplify porting programs to rockbox (as plugins).
Currently this compat layer implements:
fopen(), fclose(), fflush(), fread(), fwrite(), fseek(), fseeko(),
ftell(), ftello(), fgetc(), ungetc(), fputc(), fgets(), clearerr(),
ferror(), feof(), fprintf()
In order to use it you need to include in ported sources
"lib/stdio_compat.h"
Change-Id: I5add615dd19c5af9c767ccbfb1bd5a4e466741cb