Commit graph

4473 commits

Author SHA1 Message Date
Moshe Piekarski
85a437780e Pacbox AI Improvements
-Make pacbox AI score agnostic.
 -Fix corner case of Game Over/reset with AI on.
 -AI can now start on level where pattern starts facing right.

Change-Id: Ibc5416a53ebc07506c31434051b6d47b276cf668
2019-11-03 21:31:19 -05:00
Franklin Wei
19c154fe8f wolf3d: change version to shareware
This makes wolf3d work with the shareware files available on the wiki. This
will make things work out-of-the-box with Rockbox Utility.

Change-Id: I9118ecf8715c688565982fc4feb29a8641d68b6a
2019-10-30 00:07:09 -04:00
William Wilgus
7f1e6b4638 lua rockev cleanup
with the addition of suspending all events on thread start and exit
we don't really need to block on THREAD_QUIT in so many places

Removed suspend clearing on event unregister and updated comments

Change-Id: Id9c6a460def558c5331ee292035691a9f82b2c43
2019-10-07 22:07:22 -05:00
William Wilgus
19084181a1 lua rockev fix possible race on thread exit
report of call after free on event thread on Agptek Rocker
I'm guessing its a race condition between the thread and the timer
but can't say for sure without some more testing

Change-Id: If11bd718b3cfa81ea13fff378df56d12afa17a7f
2019-10-08 01:09:52 +02:00
Franklin Wei
c0cc9aa9e8 quake: clean up asm mixer
Fixes my ugly formatting.
2019-10-07 14:52:30 -04:00
William Wilgus
01cccaf2d2 lua move strip_extension and create_numbered_filename out of main binary
rb.strip_extension and rb.create_numbered_filename
have been moved to include_lua/files.lua
to use simply add require('files') to your script

Change-Id: I95af7b312c8614cb10da4b71b22714b3e282e08a
2019-09-28 03:15:15 +02:00
William Wilgus
4fb783582f lua rocklib_aux.pl support for enums
everything that would have been added has already been added or
needs more supporting functions so they've been excluded for the time being

Change-Id: I4ae4753c543287934702a3bd2eeccce5b032235d
2019-09-27 11:11:34 -05:00
William Wilgus
bad739c0d8 Fix red lua remove and consolidate some rb plugin functions
I'll revisit adding enums once I research it a bit more

Change-Id: If10c445cf770e5b90defc543f08d8de0817b2f3d
2019-09-27 00:17:33 -05:00
William Wilgus
de06a06351 lua remove and consolidate some rb plugin functions
removes some usless / duplicated functions
removes atoi - lua tonumber() does this for you
removes strlen - lua string.len does this for you
removes system_memory_guard - if a device that actually implements
              system_memory_guard needs it we can add it back conditionally

consolidates talk_number and talk_spell (on backend)
consolidates talk_shutup and talk_force_shutup talk_shutup(bForce)

Change-Id: Id132642f087975a7c132e99a668a41c977942b81
2019-09-26 23:45:38 -05:00
William Wilgus
d0883d747a lua give luadir the ability to return table of attributes
for fname, isdir, attrib in luadir.dir(scrpath, true) do

passing true for the second argument returns table of
file/dir attributes in attrib

Change-Id: I7c999e2fc5dac95b8ccbe169f2119c31b63f6a41
2019-09-18 21:20:42 -05:00
William Wilgus
13245ebf76 lua add menu callback
forum user fprockboxer asked for a way to detect long presses within the
do_menu routine this adds that functionality

result = rb.do_menu("Title",t_items, start, menu_callback)

function menu_callback(action)
    ...
    return action
end

Change-Id: I110c590095a743a57d0a7d45b24309899a4629cf
2019-09-14 04:48:04 -05:00
William Wilgus
f9225da811 Fix red Lua extend error splash timeout and stop cutting off info
Change-Id: Icd6fe0fa1088ab59b8214f7c860f262ce67fe205
2019-09-06 21:13:16 -05:00
William Wilgus
bbd4a6cb91 Lua extend error splash timeout and stop cutting off info
Change-Id: Ia1a9e39b9f203002cbbea85ef965e66c334b83fc
2019-09-06 20:19:42 -05:00
William Wilgus
267d04d2bd Lua add metadata and settings reading helper module
Adds example scripts for reading track metadata + dumping albumart
and rockbox settings

settings are now stored as a table of strings rather than a table of tables
as it saves ~15 kb of ram without adding much complexity

Change-Id: I611c312b2a60ab96e595e4710b17aedbd6c0689b
2019-09-07 03:10:59 +02:00
William Wilgus
c251d1879f lua fix mem_read_write, strtol
back when I wrote this I was running the sim on a 32 bit machine
I didn't catch the hardcoded LONG_MAX reference or the fact that
lua_tointeger maxes ot at 32 bits

on 64 bit machines strtol caused all kinds of issues especially since
it returned the real LONG_MIN/MAX values

Change-Id: I3571ebbd9df333f7cbf4077562412c27429bfadc
2019-08-28 00:56:08 -05:00
William Wilgus
b99d4d7fa9 lua optimize poly_draw add draw_number, poly_points modules
Change-Id: Id36e765f18234f5a4f3092d090c0adffa3da1612
2019-08-26 22:17:33 -05:00
Vencislav Atanasov
9f551b09f6
sdl: Fix path substitution in log messages, fix game names in comments
Change-Id: I7854d55153d656e84e791759f8ed664e41bff7e5
2019-08-22 22:00:43 +03:00
William Wilgus
ecfb4590ad lua fix polydraw missing functions
Change-Id: I9e2537e4839e2b4f9beddbc887610213ed954a87
2019-08-20 01:58:16 -05:00
Solomon Peachy
22c6326974 Improvements for vbrfix plugin:
* Properly account for ID3v1 tags
 * Play time computation fixes
 * Add speech feedback

Patch by Igor Poretsky

Change-Id: Ia6df8fb171882a88527cfa9d3b76b705f09becdd
2019-08-13 17:07:07 +02:00
William Wilgus
3d06d35bf6 lua rock events crash on error in main state
on errors thread stack overflows
yielding before thread_exit() is a bad idea apparently

Change-Id: Iac45d4321fac496738384fdbbeb480356ef2a1bb
2019-08-12 07:28:24 +02:00
Sebastian Leonhardt
3b75f98700 Windows shortcuts: remove warnings
Change-Id: I987cbf14da2f320ddbe3190b48ba5f8006d2ea3f
2019-08-11 22:57:08 +02:00
Sebastian Leonhardt
5c701b0280 Add support for Windows shortcuts (*.lnk files)
Supports only relative links across the same volume.

Change-Id: I4f61bb9d5f2385d5b15d2b9d9a3f814a7ac85b54
2019-08-11 22:26:49 +02:00
Franklin Wei
49dd38c184 quake: further optimize D_DrawSpans8
Found on http://forums.insideqc.com/viewtopic.php?f=3&t=3327

Adds 1.1FPS (+8%) on ipod6g.

Change-Id: I608588ff99d70ff5ce28d2c649afa4b10038cc03
2019-08-09 23:05:46 -04:00
Franklin Wei
4397194110 quake: enable PQ_OPT5 (a fixed-point DrawSpans8)
This boosts performance to 13.0FPS on ipod6g for `timedemo demo1'. That's a
+34% increase from baseline.

Change-Id: I50bae7783ff2fce46e8257c251c6b639c069e7cb
2019-08-09 21:27:55 -04:00
Franklin Wei
f5bb7fddec quake: merge the remaining Pocket Quake PQ_OPT changes
I didn't do _OPT3 because it's disabled in the PQ source.

This gives as +0.2FPS boost over the last commit.

Change-Id: I9c3c8fb7bd23262beb810da6e9469d6b6c4b2a81
2019-08-09 21:27:55 -04:00
Franklin Wei
ee70dad305 quake: merge some fixed-point optimizations from PocketQuake
The PocketQuake project, available below, has some nice fixed-point code:

https://web.archive.org/web/20150412233306/http://quake.pocketmatrix.com/PocketQuake0062_src.zip

I'd like to see most of them merged into our Quake port. This commit
gives +0.9FPS on ipod6g. (A big change given that it was running at
only 9.7FPS to begin with!)

Change-Id: I91931bdd5c22f14fb28616de938a03b4e7d7b076
2019-08-09 21:27:42 -04:00
Solomon Peachy
7737327bfe Fix mikmod plugin build on armv4 targets (broke in 5b23c9e)
Change-Id: I1c79fbe44c13396388c533c4664b4ce1db150ac9
2019-08-08 23:04:11 +02:00
Solomon Peachy
5b23c9eb0a Introduce HW_SAMPR_MIN_GE_22 macro
Gives us the lowest HW sample rate that's >= 22KHz.

Needed because some targets that don't support 22K support 11K or 8K, so
HW_SAMPR_MIN will give us much lower quality than is acceptable.

Take advantage of this new macro in the SDL, MIDI, and MIKMOD plugins,
and implement a crude "fast enough" test to enable higher sample rates
on more capable targets.

Change-Id: I6ad38026fb3410c62da028e78512e027729bb851
2019-08-08 22:37:30 +02:00
Solomon Peachy
a430e275dd Fix lua compile error on most targets, introduced in 8d77ec8
Change-Id: I217f78a9e348a18552563c6c3b235c9aed956f54
2019-08-08 15:09:04 +02:00
William Wilgus
8d77ec88a5 lua LCD fix
forgot to set new size after realloc

forgot to set sizelineinfo to 0 after free

Change-Id: Iaf7533aafaba1e2abf9599c9e1d0b75d913a8c36
2019-08-08 07:36:04 -05:00
William Wilgus
d61ea6c5ee lua LCD (Lua Compact Debug) patch
LCD developed 9/2015 by Terry Ellison

 We've already discarded the ldebug module from lua
 it only makes sense to discard the debug info as well
 adds 1.5 K to the binary
 saves 8 Kb on the base state
 once scripts start getting called i've seen 10-50Kb savings but it all depends on
 what exactly you are running

Change-Id: Ibb74f344df1c4c96380ec6c98b010a810e9ae9cc
2019-08-08 07:11:30 +02:00
Franklin Wei
1dabca6c26 sdl: document some pointer voodoo
This was lifted straight from pictureflow...

Change-Id: Ie09184390e6fcea007e7daea001f075de307f878
2019-08-08 00:10:34 -04:00
Solomon Peachy
b1f2c795a6 Speech feedback in the pictureflow plugin
Patch by Igor Poretsky

Change-Id: I99d789e43d1093c69b4d76f58704303d3c1b3c80
2019-08-07 09:50:27 -04:00
Solomon Peachy
2ebb8da275 Mikmod plugin improvements
- Improved sound quality (use 44.1KHz)
 - Conventional mixer is now used
 - Playback is performed in a separate thread
 - Speech feedback in menus

Patch by Igor Poretsky

Change-Id: I13baa224cefd67aefe6d62b988971bfbd421757d
2019-08-07 09:48:15 -04:00
William Wilgus
951a614852 lua fix lua_close on os.exit(0)
Change-Id: Ib225ecf9ea64c95e438c4114b23239c118ab19a2
2019-08-05 21:25:01 -05:00
William Wilgus
1b41e6ec43 lua fix crashes EGC failure to lock stack in concat
Change-Id: I980637b1d8aa91d7ac0ed71fd0e7d21bda7876c4
2019-08-05 21:20:30 -05:00
Solomon Peachy
ed724fecb1 Midiplay plugin ehancements
- Improved robustness
 - Improved sound quality
 - Use mixer and DSP

Patch by Igor Poretsky

Change-Id: I6fa617158cbaa53ae842295cdbdbe3a478e49ded
2019-08-05 20:48:40 +02:00
Solomon Peachy
701bf06b26 Voice enable properties plugin
Patch by Igor Poretsky
Updated by Solomon Peachy

Change-Id: Ia2adf4a65723b08d6c438f836e3e811cba3dced0
2019-08-05 04:10:25 +02:00
Solomon Peachy
2a737d3e6f Fix stack overflow issues in properties plugin
Patch by Igor Poretsky
Updated by Solomon Peachy

Change-Id: I6b90845712ff92ce7b08b41e5ec92eb33faeff50
2019-08-05 03:25:17 +02:00
Solomon Peachy
40da2f7ba7 Speech enabled main menu config plugin
Patch by Igor Poretsky

Change-Id: Idffba2b1f1d225fc9278dcfab6a728fca5afe81d
2019-08-05 02:33:37 +02:00
Franklin Wei
08fd69c347 sdl: fall back to minimum supported sample rate if 22 kHz is not supported
Fixes too-fast audio playback on devices that don't support 22 kHz.

Change-Id: I78d4934bfd40f69c0d7bc9e8021df3f4edf0a9fb
2019-08-04 22:57:58 +02:00
Solomon Peachy
4ad76652ef Speech feedback in mpegplayer menus
Patch by Igor Poretsky

Change-Id: Idc6920e17be6537557f2b1cf00f7e559e30b45e8
2019-08-04 22:47:00 +02:00
Franklin Wei
7234de58ae sdl: don't set alignment trap if < ARMv5
This should fix crashes on ARM7TDMI as reported by foolsh.

Change-Id: I9aaf6196837d284a67a9e2b0edc72ecd644fd59f
2019-08-04 20:59:30 +02:00
William Wilgus
d1f349bf77 lua optimize print include, fix draw_poly
Change-Id: Ibb530cfa63681727be518173404952e897c9d297
2019-08-04 17:54:03 +02:00
William Wilgus
f85df30e3e lua add rlimg.lua example script split large includes to separate files
Change-Id: I67cac5bc4ce5525ab30abf9443f6cc1a33190512
2019-08-04 16:57:02 +02:00
Franklin Wei
827c881583 quake: update readme
Change-Id: Ic9ec250ad9c58dad33b703f0874c0307962fd199
2019-08-03 12:30:40 -04:00
Franklin Wei
7ba2ef566e sdl: use mutex in printf()
This prevents lines of output being overwritten by different threads.

Change-Id: I24cee52238b53c8a4b2536e082bb4bcd103d8d60
2019-08-03 05:05:35 +02:00
Franklin Wei
fee68fc612 quake: synchronize Mod_LoadModel and S_LoadSound
This is not a very pretty fix, but code that doesn't crash is better than
code that crashes... "If it runs, it's done."

Change-Id: Ia1d0c537e5e5e60fb80cf7d7de2332e1c712806f
2019-08-03 05:05:05 +02:00
William Wilgus
9d2af8777f lua update tagnav.lua with reload menu and bug fixes
Change-Id: I0e7364a3432bf867cb368c131bf83643115f9d0b
2019-08-02 05:16:43 +02:00
Vencislav Atanasov
722ddcf6ba sdl: Fixes for the SDL apps, so they support building simulator on Windows
Change-Id: I277d391482a80e5bf9dd8049cd3b78c5cae7205e
2019-07-31 19:34:18 +02:00