50 Commits

Author SHA1 Message Date
James Coon
ffb6911dc6 Merge pull request #8 from payonel/patch-1
add mac tips and run tips
2015-09-03 16:29:44 -06:00
payonel
e1f94a43db add mac tips and run tips 2015-09-03 15:26:19 -07:00
James Coon
9953b72b60 Merge pull request #5 from payonel/develop
Modem component implementation.
2015-09-02 12:33:45 -06:00
payonel
f367469171 indent table initializer 2015-09-02 05:47:39 -07:00
payonel
771ae94ad5 refactor modem code for robustness 2015-09-02 05:38:50 -07:00
payonel
101d4feed1 check for modem not nil in main.lua event handling loop, preexisting machines won't have one 2015-09-01 09:14:59 -07:00
payonel
7e7851f0de change white space to tabs instead of spaces 2015-09-01 00:17:46 -07:00
payonel
1b83c83d6d initial modem implementation. this does not support disconnecting clients 2015-08-31 23:57:14 -07:00
gamax92
6ac67312ae Cleanup boot.lua 2015-08-25 23:54:08 -06:00
James Coon
e33eab3e9f Merge pull request #4 from payonel/non_posix_rmdir
use lfs.rmdir for os.remove of dirs when os is not posix compliant
2015-08-25 23:48:53 -06:00
payonel
1310d651e8 use lfs to rmdir instead of os.remove because windows is not posix compliant 2015-08-25 22:19:23 -07:00
gamax92
f2aa100686 Steal code from ds84182 and not give credit
I totally wrote this code and ds84182 didn't at all make a pr for this.
2015-08-24 17:10:25 -06:00
James Coon
3c284b0ba3 Allow save path to be specified from the command line to boot.lua 2015-06-27 23:50:46 -06:00
James Coon
fd4c364243 Polish up windows build script 2015-06-27 23:27:35 -06:00
James Coon
76e648464d Add Windows build script 2015-06-27 12:16:11 -06:00
gamax92
2f11080f1f Resolution switching
Implement actual resolution switching!
Not as good as I'd like, but it works for now
Also destroy everything on shutdown instead of relying on sdl.quit for
that
2015-06-26 17:45:44 -06:00
gamax92
4e9d49bce7 More graphical fixes
Add yet another variable for wanted palette
Add monochromeColor configuration
Fix getForeground and getBackground output
Implement depth color changes
Fix up the computer.beep stub
Update the README
2015-06-26 16:23:08 -06:00
gamax92
c4475849ff Higher success
Check for and clamp to NUL in the unicode api
math.floor depth when changing screen depth
Fix getForeground and getBackground to return the palette index when
using a palette, which is still not really correct but will mostly work
for depth 8
Have palette changes recolor the screen
2015-06-26 01:54:56 -06:00
gamax92
dd2daa2554 Configuration update
Centralize all of the configuration settings and defaults into one file
Move the available components into the configuration
Move the verbose debugging into the configuration

Also start work on a modem component

Also fix configuration not saving on computer shutdown
2015-06-25 20:45:08 -06:00
gamax92
95405445d9 Various fixes
Unicode:
Replace \0 with \xC0\x80
Limit max codepoint to 0xFFFF (Java chars are wonderful)
Fix wtrunc and math.huge
Fix wtrunc with a pos of 0 returning the entire string

GPU (not screen):
Simplify rdepthTbl
Add depth names table
return the old depth when changing depth
limit the resolution change correctly
allow gpu.get to work with a little over the max dimensions

Screen:
Don't modify characters if it's a wide character at the very edge of the
screen
Have getColor set the palette index instead
Return true in cec.fill
Floor the resolution when changing
2015-06-24 17:52:07 -06:00
gamax92
618504f9cd Completely fix internet patch?
Take 2 ... 3 ... 11?
Remove the default port from the https library, preventing injection of
port 443
Remove the default port from the http library, preventing injection of
port 80
Check specifically for https, injecting port 443, else 80
2015-06-23 14:52:46 -06:00
gamax92
b6aeb90d67 More fixes
trim the url string when doing a request
Check the protocol to make sure it's valid or supported
Add in another patch to http to actually preform http requests when
asked, the hack however prevents you from doing HTTP on 443, but it's
much better
Add in the SDL2 scancode to cprint debugging
Ignore Escape key
Artificially generate various characters for various keys
Also default to 0 in key_up

Add in a secondary list for the artificial characters:
Backspaces
Tabs
Enter
Delete
2015-06-23 13:38:52 -06:00
gamax92
2fc29e6f8d Keyboard fixes
All non mapped codes will default to zero
Add in a quick hack to correct the codepoints for tab and enter, which
SDL doesn't generate a SDL_TextInputEvent for
2015-06-23 00:11:14 -06:00
gamax92
046907c44d Color fixes
Correct the Tier 3 palette
Add in a more accurate color system, comparing wanted values to 6-8-5
levels and palette colors
Actually return the palette setting in get/setForeground and
get/setBackground, it used to only be nil and seems to be fixed
setDepth now loads the respective palette for tier2/tier3
Palette changes now affect the current color if the respective palette
entry was modified

The droping colors to 6-8-5 levels is probably not entirely correct,
since converting back to a normal color can incur further loss, but it's
working
2015-06-22 23:19:08 -06:00
gamax92
7cd8dc3197 Descriptive Commit Name Here
Add some more checks into component.connect
Add component.disconnect
Send signals component_added/removed when adding/removing components,
except on boot
Add some checks to eeprom component
Add checks to filesystem component
Add checks to gpu component
Add checks to screen component
Remove showWindow, causing issues in linux and doing nothing in windows
Remove a useless renderchange calculation
Fix internet.request for response codes 400 and above, oppm now works
Add a ocemu component, which will be used to control the emulator from
inside
Add a basic configuration program, allowing to insert and delete
components
Add ocemu component to the list
2015-06-21 21:04:39 -06:00
gamax92
ea8e600800 Add a few TODO's
That's it for today
2015-06-19 21:03:02 -06:00
gamax92
d29c2bc7d7 Moar fixes
wrap unicode.lower/upper since utf8's handling of numbers differs than
oc's handling of numbers
move getCharWidth out of unicode.lua and into main.lua
Fix characters being rendered when they should be hidden by a wide
character
Fix wide characters not setting the overlapping cell as a space
Fix the overlapping character not being rendered when the wide character
is removed
Fix fill treating wide characters as not wide characters
Fix set being crashed on invalid characters
Change checkArg and compCheckArg to non merge versions, and edit the
error message in compCheckArg to be similar to actual error messages
2015-06-19 19:02:16 -06:00
gamax92
744e640bea Fix the hack
I totally tested the previous hack
New hack! Allow us to travel backwards in time, as far as the computer
is concerned, that minute long request only took about ~0 seconds
2015-06-19 16:18:56 -06:00
gamax92
b3494872f1 Some more internet fixes
Add logic for when the socket should be closed
Same for HTTP requests
Add support for when HTTP requests fail
Remove and readd machine.lua's sethook to get around how slow
http.request can be at times
Patch socket.http to return a table for headers only when there are
multiple values, only because other code will break
Support table's for headers in our internet component
Change header case to a more normal version
2015-06-19 15:45:38 -06:00
gamax92
ca66a9e20c Various things
Add persistence code to the eeprom, so it will actually work when
booting OCEmu
convert a print -> cprint
Implement the HTTP side of the internet card
Add clipboard support to the keyboard
Edit the readme to mention luasocket and luasec
2015-06-19 12:17:55 -06:00
gamax92
53f8bcbd13 Add internet folder when internet card is present
Move component connecting logic into its own function
Add lua/component/internet when loading internet card
Adjust slot numbers to more realistic numbers:
5 = HDD slot
7 = Floppy slot
2015-06-18 21:09:02 -06:00
gamax92
ff7e1911a2 Fix bugs
Check if internet component can be used (requires luasocket)
Add cprint's everywhere in internet component
Fix connecting to an address with port included
Fix screen fill/copy/get/set being crashable with non integer numbers
Add math.trunc to help out screen component (truncates to integer)
Add internet component by default
2015-06-18 20:49:10 -06:00
gamax92
c943c42bb9 TCP Sockets!
Fix a typo in the readme
Fix unicode.wtrunc
Implement TCP Socket support in the internet card
Correct name of machine.lua to machine >_>
2015-06-18 19:01:57 -06:00
gamax92
2ea268de54 I really need to push this, so do so 2015-05-19 11:57:20 -06:00
James Coon
fd4c8b80dd Fix (cec) screen.setResolution 2015-04-26 00:45:25 -06:00
James Coon
2e48c20cca Quick 'fix' windows support 2015-04-26 00:05:09 -06:00
gamax92
5f294d1074 Mouse stuff
Also a configuration system
2015-04-25 21:56:28 -06:00
gamax92
d25b780d1f Bunch of updates
Have component stub generator also generate documentation
Add documentation to the components
Support components defining their own type
add return nil, "no such component" to more component functions
fix component.doc
Add argument checks to computer api, maybe implement computer.realTime?
Implement unicode isWide, charWidth, and wlen
clean up boot.lua a little
Implement readonly mode in eeprom, and implement crc32 checksum
Add more readonly checks to filesystem, implement filesystem.rename
makeDirectory returns false if the path exists
suffix keyboard and screen with _sdl, and check for SDL before loading
move sdl_to_lwjgl to the support folder
2015-04-25 18:41:03 -06:00
gamax92
0004498294 Copy is now a lot faster
Use the magic of updateTexture that didn't exist in the old binding.
2015-04-25 14:17:57 -06:00
gamax92
3ab368da8c Merge branch 'master' of https://github.com/gamax92/OCEmu 2015-04-25 11:20:04 -06:00
gamax92
f650873066 luasdl2 is too restricting
So lets switch to full sdl, via luaffi
Also, check that the component actually loaded

(This copy of sdl2-ffi has been slightly modified to work with luaffi,
it is otherwise exactly the same)
2015-04-25 11:19:24 -06:00
James Coon
e1a558843f Fix a bug with windows 2015-04-25 00:57:17 -06:00
gamax92
dfa9cd79bd Some more things
Implement component.filesystem.remove
Use cleanpath in all filesystem methods that take a path, and check that
the path doesn't start with "../" or is ".."
Only rerender screen portions when the existing data differs
Bubble up and use render:drawPoints instead of calling render:drawPoint
thousands of times
move machine_thread to machine.thread
support boolean yield (shutdown and reboot)
2015-04-22 23:34:49 -06:00
gamax92
7b5dadedbd Implement moar things!
createDirectory will now create parent paths
getDirectoryItems will ignore . and ..
added getLastModified, getSize, and getSaveDirectory
(getSaveDirectory points to $HOME/.ocemu or $APPDATA\.ocemu)
Add some basic argument checking to computer.beep
Add component type checking to component.eeprom, replace math.huge with
actual value, and do size checks
extend component.eeprom.makeReadonly stub
have component.filesystem use the address as a directory name if not
specified, and store them + tmpfs in the save directory
set the label to nil if using the address as the name
Add component type checking to component.filesystem, and implement a lot
of functions (or extend stubs)
Extend stubs in component.screen, implement
component.screen.getKeyboards()
Add a fake HDD to the default components list, since writing works
2015-04-22 22:00:24 -06:00
gamax92
d2374a6edd It had to be done
Good bye Love2D, you served us well, but couldn't serve us enough.
2015-04-22 18:19:50 -06:00
James Coon
a7d6a98739 Well, copy works faster now
Use the imagedata-ffi replacement
Also fix keyboard repeat by enabling it
2015-04-22 10:41:14 -06:00
James Coon
e6b93f176e push a working (cec) screen.copy 2015-04-22 08:36:10 -06:00
gamax92
d39f6478f1 push wip stuff 2015-04-22 07:51:12 -06:00
gamax92
e2355d6dad Lets upload the really bad emulator code! 2015-04-22 00:31:15 -06:00
James Coon
4a02fc5739 Initial commit 2015-04-22 00:28:41 -06:00