Commit Graph

2350 Commits

Author SHA1 Message Date
brandman211 1d21a89f3a Converting merges one at a time...here's SMS.
-Because of Reset and Pause being separate from everything else, I had to code a special condition for these.
-Line count: 1081.
2012-03-25 01:32:44 +00:00
brandman211 8686cc87ff Converted the switch statement in InputConfig_Load to a dictionary. 2012-03-25 00:54:40 +00:00
brandman211 0eae992403 Created general functions Do and Update.
-Because I have been advised not to convert the objects to dictionaries, and because using the equivalent of typedef seems confusing if it isn't outright impossible, I had to implement switch statements to handle certain aspects on a platform to platform basis.
-These will end up being much bigger than I would have hoped, but the entire file will be much, much smaller.

TODO: Implement all of the other platforms using these functions.

Note: It seems that the Enabled checkbox doesn't do anything other than persist its state. I checked the latest release, and the same issue was there, so I didn't break it!
2012-03-25 00:39:51 +00:00
Rolanmen1 e9e988a83e When Loading An Script With An Error, BizHawk Won't Crash. For Some Reason I Couldn't Show The Script Error In The OutputBox. 2012-03-24 21:55:37 +00:00
brandman211 d7453a3770 -Shrunk UpdateNES. 2012-03-24 21:06:47 +00:00
brandman211 f6a353196d -Started refactoring InputConfig.cs as adelikat requested:
--Created CONTROLS constant which contains all of the controls in one dictionary.
--Shrunk DoNES significantly.

TODO:
-Shrink UpdateNES.
-Generalize both functions and apply to NES.
-Have all of the platform specific functions utilize these generalized functions.
-Combine all of the platforms.
2012-03-24 19:45:50 +00:00
Rolanmen1 d0afec182f Pause/Resuming Scripts Have Been Implemented 2012-03-24 18:59:24 +00:00
zeromus e7eb6d8dcd fix input.get 2012-03-24 18:39:55 +00:00
zeromus 0bb9f65038 try not to crash when size of arrays in config file changes 2012-03-24 17:47:52 +00:00
adelikat 96fc783107 Lua - implement input.get() 2012-03-24 15:55:22 +00:00
rolanmen1 d0995970fc User Can't Toggle, Edit Nor Pause Or Resume To Separators. Edit Buttons Now Opens Multiple Scripts Instead Of The First Selected. 2012-03-24 13:25:19 +00:00
rolanmen1 87f9ace0d9 Added Resume/Pause Script Option Everwhere It Should Be And Also Added Pause Icon To All Of Them. 2012-03-24 12:43:11 +00:00
adelikat 8714b6da75 Small amount of code cleanup - remove unnecessary code in mainform load function, move function to a better file 2012-03-24 12:20:21 +00:00
rolanmen1 661565cf3e Added Pause Property To Scripts, Menu Option To Pause/Resume Scripts, Enabled And Paused Scripts Change It's Background To Red (May need to change this). Label Above ListView Shows How Many Scripts Are Paused. Need To Add Pause Icon To The Menu Option. 2012-03-24 10:53:26 +00:00
zeromus 0cf6b0bcb7 switch atari 2600 to new 6502 core 2012-03-24 03:45:47 +00:00
zeromus b9dd682f1d name the context menu items better things 2012-03-24 03:18:02 +00:00
zeromus 5f39ba5bbd add emu.yield, which when used allows a script to run while emulation is paused and interact with the gui/main window in realtime 2012-03-23 23:03:39 +00:00
zeromus 216a44e3f0 add input.getimmediate 2012-03-23 22:52:02 +00:00
zeromus adcb03f8d5 fix context menu open logic to not rely on indices 2012-03-23 22:06:42 +00:00
zeromus aaf92e0e25 how did that happen 2012-03-23 19:48:45 +00:00
zeromus bc3e8606a2 refactor lua scripts to be more flexible 2012-03-23 19:44:47 +00:00
zeromus b64ee06a8c since our luainterface and lua are so hacked up now, we need to check it in so we dont lose it 2012-03-23 19:03:22 +00:00
zeromus 0372969f13 change lua to use lua coroutines for multiple scripts instead of .net threads 2012-03-23 18:24:29 +00:00
adelikat bbf282e131 Atari - implement lag counter, refactor implementation of frame counter slightly, add frame and lag counters to savestates 2012-03-23 02:55:46 +00:00
adelikat 2e5ec4fdcb Fix bugs in input config regarding atari controllers, fix auto-fire controllers for atari (both controllers) 2012-03-23 02:15:58 +00:00
adelikat 715d46ed1d Hook up atari controller 2 to input config dialog. 2012-03-23 00:39:21 +00:00
adelikat 684252a816 Fix mainform context menu logic from the screenshot to clipboard addition 2012-03-23 00:06:20 +00:00
pjgat09 e708527168 TIA: Implemented missile copying. Also added the missile 1 size which was missing before. 2012-03-22 22:01:20 +00:00
zeromus fa25305d67 atari-add player 2 controls? 2012-03-22 06:33:28 +00:00
zeromus dc2107bd3b nes-make fake boards for almost every mapper, unless i missed one. 2012-03-22 06:20:10 +00:00
pjgat09 a56ddcdb15 Atari 2600: Modified how memory read/writes are handled, to better emulate the address bus. Cleaned up some comments. Turned off CPU debugging. Added functions to read console switches and player 2 buttons.
M6532: Mostly re-written, this time based on the datasheet. 
TIA: Removed console debug outputs.
2012-03-21 20:28:26 +00:00
rolanmen1 dcaf724dae Fixed A Bug When Saving A Session That Prevented Them To Be Loaded Correctly. 2012-03-21 12:51:52 +00:00
zeromus d8c0e3b27e make GetExeDirectoryAbsolute more robust (handle # in paths) 2012-03-21 06:38:19 +00:00
adelikat f4bd799484 Atari - hook up main ram memory domain 2012-03-21 02:57:26 +00:00
adelikat 365f60988e Hook up Atari to the controller config dialog (interim only) 2012-03-21 02:44:01 +00:00
pjgat09 5b5932696d M6532: Added a dedicated cycle count variable to fix a timer issue.
TIA: Increment the M6532 cycle count when in wsync.
2012-03-21 01:02:24 +00:00
pjgat09 5e65c7e977 TIA: Removed code for cosmic ark starfield (to be added back later, in a cleaner way). Changed the definition of a frame to start with the first scanline where VSYNC is disabled.
MOS6507: Fixed a copy-paste mistake with SBC instructions where it would remove another cycle. This fixes the screen bounce issue with pitfall.
2012-03-20 22:45:15 +00:00
andres.delikat bb7e320f92 Lua Console - when opening a duplicate lua script, don't turn script on if the disable lua script on load option is checked 2012-03-20 21:44:34 +00:00
rolanmen1 652fea7392 If User Opens A Script That Is Currently On The Session, It Will Toggle It On.
If User Deletes The Script From The Session, It Will Stop.
Script Counter Now Updates On More Circumstances.
2012-03-20 15:31:06 +00:00
brandman211 22feb43b78 joypad_set works. 2012-03-19 19:10:30 +00:00
andres.delikat da634a45f1 Lua Console - autoload session 2012-03-19 16:49:47 +00:00
andres.delikat 33383b533b Lua Console - option to disable scripts on load 2012-03-19 16:19:31 +00:00
andres.delikat adda412369 Lua Console - track changes on Move Up / Down 2012-03-19 15:33:38 +00:00
andres.delikat 40b057a474 Lua Console - drag & drop .txt files 2012-03-19 15:26:05 +00:00
andres.delikat 9f6420b2bc Lua Console - Open Script - add a *.txt option in the openfile dialog 2012-03-19 15:23:08 +00:00
brandman211 78d8effcfc Made joypad_get independent of mnemonics. Here's the Lua script I used to test:
while true do
	joypad.set("Up", true)
	local buttons = joypad.get()
	local result = {}
    for index, value in pairs(buttons) do
        table.insert(result, index .. ": " .. tostring(value))
    end
	gui.text(0, 36, table.concat(result, "\n"))
	emu.frameadvance()
end

For some bizarre reason, after a while, the ordering of the buttons goes from stable to chaotic, making it impossible to read the buttons pressed. adelikat says not to worry about this because order is meaningless in Lua. Still, this is very curious...

TODO: Set using a ClickyVirtualPadController and Global.StickyXORAdapter.SetSticky(Controller + " Up", false)...whatever that means.
2012-03-19 14:52:23 +00:00
brandman211 a4a8dec005 Lua glue for zeromus. 2012-03-19 03:39:56 +00:00
adelikat 0bdce38dc4 Add atari to path config dialog (interim builds only) 2012-03-19 02:12:43 +00:00
zeromus 0131b23501 nes-fix a pretty gnarly regression from earlier today 2012-03-18 21:46:56 +00:00
adelikat c92f1b556c Lua - implement movie.filename(), movie.getreadonly(), movie.setreadonly() 2012-03-18 19:52:28 +00:00