Commit Graph

147 Commits

Author SHA1 Message Date
MineRobber9000 91b116b417 Make sure cart.p8 is loaded 2018-07-15 10:52:05 -04:00
MineRobber9000 03e26ba70c Fix conf.lua 2018-07-15 10:51:47 -04:00
MineRobber9000 fdf4a8bd68 Remove assert causing failure 2018-07-15 10:51:32 -04:00
MineRobber9000 614fc2787e Add makefile 2018-07-15 10:51:04 -04:00
MineRobber9000 1cbe637569 Use matthughson's micro platformer as demo cart 2018-07-15 10:50:16 -04:00
MineRobber9000 f200ef7797 Update README 2018-07-15 10:48:50 -04:00
gamax92 67b2607f74 Fix minor mistake 2018-07-14 23:57:10 -06:00
gamax92 166a4f485d Tweak audio to better match pico-8
Updated all volumes based on wav export results
Removed sample blending, pico-8 no longer has this
Noise is much more accurate now

For some reason LOVE is quieter than pico-8, hence the old louder values
2018-07-14 23:53:14 -06:00
gamax92 69ac5fe487 Fix bugs reported by hsandt, closes #20 and closes #21
stat(34) uses the wrong bit operation
tostr() in hex mode shifts the upper part by too little
2018-06-08 22:08:28 -06:00
gamax92 a24c02a30d Connect cart data to memory 2018-04-24 16:10:10 -06:00
gamax92 5ba49b688b Add getmetatable 2018-04-14 12:13:41 -06:00
gamax92 a4f0136331 More robust cart loading
Initialize spritesheet and spriteflags with default values
Fix default music values

Check if headers exist before loading them
Allow too little data and handle too much data

Remove now invalid asserts
Fix version 2 gff handling
2018-04-12 16:05:42 -06:00
gamax92 50e9cd26d1 Correct love version in README 2018-04-12 12:21:31 -06:00
gamax92 8e4323c12b Implement various stat() functions
clipboard, keyboard input, mouse input, rtc, other minor things
Also fix right-ctrl and right-gui being ignored.
2018-04-10 13:06:10 -06:00
gamax92 5ef81d3456 Add support for binary literals 2018-04-09 16:43:34 -06:00
gamax92 110189bb09 Update for LOVE 11.0
Fixed color
Fixed canvas being accessed while enabled
Fixed screenshots
Updated love.run
Removed shader workaround
Removed usage of depreciated apis
Fixed cart argument

Not thoroughly tested but does atleast run and look correct.
2018-04-09 16:17:01 -06:00
gamax92 7850bae68b oops 2018-04-09 14:42:02 -06:00
gamax92 99979103ff Add in some new functions and "implement" a few others
Added: tonum, tostr, peek4, poke4, ceil, lshr, rotl, rotr, t
Implemented: login, logout, bbsreq, scoresub, radio
    They all don't seem to do anything besides return nil
    Though scoresub and radio also returned an extra zero
2018-04-09 13:54:38 -06:00
gamax92 99e8958bd8 Fix bug with filled circles
checking x doesn't make sense here.
2017-09-09 20:25:40 -06:00
gamax92 d3563cd662 Clean up cart parsing code
Use a better line loop
Always increment row at the end of the line regardless of col
Bail out of the loop if col or row get too high
Move some local variables in loop
2017-07-12 11:42:40 -06:00
gamax92 bd23872263 Implement time() and trace() 2017-03-12 13:11:32 -06:00
gamax92 30c22d5161 Add touch screen controls to iOS 2017-03-12 13:04:53 -06:00
gamax92 aca92193db Remove this debugging rectangle
oops
2017-03-12 13:02:51 -06:00
gamax92 0460a2f68e Fix some music() and sfx() bugs
Backported some fixes from pico-emu
2017-03-12 12:59:14 -06:00
gamax92 f9a858fd65 Add stubs for missing functions
To be filled in later
2017-03-12 12:27:26 -06:00
gamax92 2e882a6c2d Fix love2d shader bug
Love 0.10.2 has a bug where a dummy value is needed in shader unpacks
2017-03-12 12:24:46 -06:00
gamax92 d56daf466c Improve fake console cart
Map 0x5f26 and 0x5f27 as cursor locations
Hacky set _ENV as the environment, since LuaJIT is 5.1 based, not 5.2
Attempt to resolve the filename extension

Redo a good chunk of nocart.p8 using the new support
2016-10-05 15:59:51 -06:00
gamax92 b1e07c2752 Fix a small scale calculation bug 2016-09-30 13:15:07 -06:00
gamax92 38dcb88dfa Audio fixes
pulse waveform was off by a tiny amount
vibrato was too slow
appreggio doesn't take into account the sfx speed
make zero-volume/no-sfx ramp down properly

allow sfx to replace a channel of the same sfx if no channels are free
2016-09-23 12:16:41 -06:00
gamax92 ac30b475d9 Clean up compression_map
Compact that into a nice neat string instead of a huge array
2016-09-23 11:53:34 -06:00
gamax92 474a5e1fc7 Minor code cleanup
Remove some useless graphics calls
Try to avoid reuploading the display palette if no changes
Do not reupload the display palette info to the shader every frame >_>
2016-09-23 11:52:50 -06:00
gamax92 5bd3737654 Improve fullscreen support
Switch to PICO-8 0.1.9 style resizing
Use non-pixel perfect scaling on Android
Always force a love.resize call incase we didn't get the desired window size or we're running in fullscreen mode

Move default window size and title into conf.lua to prevent the initial wrong window size flickering
Allow window to be resized

Should fix raspberry pi showing wrongly sized content
2016-09-21 18:59:23 -06:00
gamax92 ed7eea26c0 Fix shaders for proprietary Broadcom video driver 2016-09-21 11:37:56 -06:00
gamax92 fe93fb51d9 Fix load/run/CTRL-R
Bring together the code to load and kickstart a cart into _load
Clean it up >_>
Make api.run, api.load, and the ctrl-r handler use _load

Make it a little bit more accurate by having it reset camera/clip/palette/color/memory/etc
2016-09-19 23:30:58 -06:00
gamax92 5a4d119fce Fix loading carts with carriage returns
PICO-8 seems to strip out carriage returns by eating the character next
to them, regardless if it's a line feed, so emulate this behavior
2016-09-18 12:30:06 -06:00
gamax92 f706088ce5 Fix missing mapdraw alias
Accidentally lost this in the refactor
2016-09-18 12:29:15 -06:00
gamax92 36d4a12be9 Revert "Merge pull request #5 from gmarty/clsc"
Pretty much all of this was completely wrong.

Changing the clear in flip_screen screws up the black border color
Clearing the canvas to a palette color screws up the shaders
They expect 0-15, not a palette color
----
Fix cls() not resetting the clip
Fix clip not requiring all 4 parameters
Clean up clip()
2016-09-13 23:28:55 -06:00
gamax92 8433b7f56c Add in print scrolling support
Also fix scrolling changing x cursor position, it shouldn't
2016-09-13 20:02:05 -06:00
gamax92 e7658d41b5 Make King-Tut demo work
Fix print of multi line strings
Fix print's cursor set behaviour
Fix sillyness in poke for sfx data
Add a newline to the lua code, fixes shorthand-if missing the last line

This fixes King-Tut demo
2016-09-13 15:03:32 -06:00
gamax92 ca41585358 Add in update60 support
Check for _update60 and set fps to 60
adjust update_buttons and btnp to support 60fps
Simplify btnp slightly
2016-09-13 14:56:37 -06:00
gamax92 b0f866c15b Exact audio timing
My last experiment was flawed due to host audio mangling, so from asking
PICO-8 to record directly, it's been determined that the minimum
duration is 183 samples.

Also use the average of the last sample to the current one.
This emulates behavior of PICO-8's audio output
2016-09-01 13:47:26 -06:00
gamax92 bfb2848732 Fix reading sfx data, add music stat()
reading sfx data would crash on reading the first note byte pair
Add stat 16 to 23 for geting info on the music engine

change all math.floor to flr
2016-08-29 20:37:46 -06:00
James Coon e08121d208 Merge pull request #13 from samhocevar/bugfixes-for-gamax92
Ensure atan2(0,0) returns 0.75 like official PICO-8.
2016-08-25 15:18:42 -06:00
Sam Hocevar eca8883171 Ensure atan2(0,0) returns 0.75 like official PICO-8. 2016-08-25 21:47:18 +02:00
James Coon 604db46f25 Merge pull request #12 from samhocevar/bugfixes-for-gamax92
Bugfixes for gamax92 fork
2016-08-25 00:23:57 -06:00
Sam Hocevar 3a9def228a Propagate SFX editor mode when loading carts.
This fixes memcpy(), peek() and poke() that would fail to read or write
these specific bytes (64 in total).
2016-08-25 05:39:31 +02:00
Sam Hocevar 25467909c5 Fix atan2() prototype.
PICO-8 atan2() uses (x,y) arguments instead of the standard (y,x). This
fix gets rid of the “FIXME: why does this work?” code that was here to
compensate for the x—y swap.
2016-08-25 05:36:29 +02:00
gamax92 cbefe41ab9 Fix srand being broken
srand needs to call math.randomseed, not return a random value.
2016-08-15 16:29:23 -06:00
Matt Sephton 8438cf940d fix rect being off by one vertically (#8)
fix rect using 0.5 offsets
2016-08-11 18:30:53 -06:00
gamax92 421b3e3b19 Support version 8 carts.
Nothing changed it seems.
2016-08-06 11:30:24 -06:00