Merge branch 'master' into master

This commit is contained in:
zeromus 2017-07-13 19:17:09 -05:00 committed by GitHub
commit d54fee4d91
892 changed files with 149529 additions and 249419 deletions

View File

@ -827,6 +827,34 @@
"Power": "",
"Reset": ""
},
"PicoDrive Genesis Controller": {
"P1 Up": "UpArrow, J1 POV1U, X1 DpadUp, X1 LStickUp",
"P1 Down": "DownArrow, J1 POV1D, X1 DpadDown, X1 LStickDown",
"P1 Left": "LeftArrow, J1 POV1L, X1 DpadLeft, X1 LStickLeft",
"P1 Right": "RightArrow, J1 POV1R, X1 DpadRight, X1 LStickRight",
"P1 A": "Z, J1 B1, X1 X",
"P1 B": "X, J1 B2, X1 A",
"P1 C": "C, J1 B4, X1 Y",
"P1 Start": "Return, J1 B10, X1 Start",
"P1 X": "A, J1 B3, X1 B",
"P1 Y": "S, J1 B5, X1 LeftShoulder",
"P1 Z": "D, J1 B6, X1 RightShoulder",
"P1 Mode": "E, J1 B9, X1 Back",
"P2 Up": "",
"P2 Down": "",
"P2 Left": "",
"P2 Right": "",
"P2 A": "",
"P2 B": "",
"P2 C": "",
"P2 Start": "",
"P2 X": "",
"P2 Y": "",
"P2 Z": "",
"P2 Mode": "",
"Power": "",
"Reset": ""
},
"WonderSwan Controller": {
"P1 X1": "UpArrow, J1 POV1U, X1 DpadUp, X1 LStickUp",
"P1 X3": "DownArrow, J1 POV1D, X1 DpadDown, X1 LStickDown",

View File

@ -3701,11 +3701,7 @@ E1FC445D594F33D89DBB033C5A11C66E8F41315C Opium (19xx)(Ludia)(fr)(Side B) AppleI
2286E2150CD7EF3B880AD6937CA3B2A1E2980526 Orbizone (1989)(Pangea Software)(SW)(Disk 3 of 3)[graphics 2] AppleII
FB0C887C7902106A72327F9797CDD14A254E3228 Oregon Trail (1985)(MECC)(US)(Side A) AppleII
8CA19D02C1B3EB35061B97F8640CC338BA129B9F Oregon Trail (1985)(MECC)(US)(Side B) AppleII
FB0C887C7902106A72327F9797CDD14A254E3228 Oregon Trail (Disk 1 of 2) AppleII
8CA19D02C1B3EB35061B97F8640CC338BA129B9F Oregon Trail (Disk 2 of 2) AppleII
430407E976418119A71F4E8A524D05EE2D23F960 Other Side, The (1985)(Tom Snider)[cr Man O War] AppleII
FB0C887C7902106A72327F9797CDD14A254E3228 Otrail_1 AppleII
8CA19D02C1B3EB35061B97F8640CC338BA129B9F Otrail_2 AppleII
BDF98D821CD2A9C1E717D6213232EBACC31892BE Out of This World (1992)(Interplay)(Disk 1 of 2)[non boot] AppleII
693F40BF0424B1F512189796C25D8837FD34BF12 Out of This World (1992)(Interplay)(Disk 2 of 2)[non boot] AppleII
7B41C9339F47E314830A98957C4785CFCE5646C6 Outliner v1.0 (1988)(MECC)(US)[no boot] AppleII
@ -5516,7 +5512,6 @@ DB31F1DE00B56AD8FCF35B0EC79242C12CAE12FE ZZZ-UNK-Basic Games_hangman_jigsaw Puz
0DD5A4F87B6F109966A5FCED114F39F450EE8C40 ZZZ-UNK-Basic Programs - Hellos - D02s2 (19xx)(-)[Name unknown] AppleII
F9C291D3E167B0F693261C6634ACE5504103A4A0 ZZZ-UNK-Bbshow Deltadrawii Ezdraw Graphicstoolbox Jln AppleII
99AA686AA7D145A4A8132E27BF924D733B75065C ZZZ-UNK-Blackstone (Wizardry 1 Mod)[PASCAL] AppleII
67F5D6AA79E18905D540F7B8E01CE90E40696D44 ZZZ-UNK-Bolo - Cheat Version, Pest Patrol, Serpentine AppleII
67F5D6AA79E18905D540F7B8E01CE90E40696D44 ZZZ-UNK-Bolo - cheat version, Pest Patrol, Serpentine AppleII
A43AC3294FDCD4E26956792C8A8E65D5BA11E37C ZZZ-UNK-Boot62f0 (19xx)(-)[nb] AppleII
B7C43C1F58FD0FC16F805A53072D3A670C11BE68 ZZZ-UNK-Boot62f1 (19xx)(-)[nb] AppleII
@ -5645,7 +5640,6 @@ FE03EDFF0CF45BAA04AA8D7541CBE78BACE9733E ZZZ-UNK-lode runner data2 AppleII
500CD3C79352C49AD029BD6843F2B0957FBD8857 ZZZ-UNK-Looney Tunes Graphics Disk O4b (19xx)(-) AppleII
D8D30398A32B5046B1E568A030BE64E0D5B401E2 ZZZ-UNK-Main Hall & Beginners Cave (-) AppleII
8D58456CE81AF53F2E798450FE3A55F71DFB9414 ZZZ-UNK-Mario Bros [nb] AppleII
67D88DDE7389FB5092C7F7826DBBE2B6D73BC2AF ZZZ-UNK-Mario [compil] AppleII
67D88DDE7389FB5092C7F7826DBBE2B6D73BC2AF ZZZ-UNK-mario [compil] AppleII
C6BBD0DB1E2E05987CC752547ADDF8827C4BF29D ZZZ-UNK-Misc Catdialers AppleII
58F6DD77A9376AB49ABC3CE39705F6258C21268D ZZZ-UNK-Misc Disk Utils (19xx)(-) AppleII

View File

@ -465,7 +465,6 @@ A70C6B0E90E7B8BA3E5BC06C9AE7D6AF344E491F Juno First (Japan) (Alt 1)" MSX1
846BD4D89BD034AC5346CBC559752635AD2BDA6B Juno First (Japan)" MSX1
4991DC097E248436506ED5C8BC3F367A65267EE7 Jyan Friend (Japan)" MSX1
17E1111B1D6AA80E8BC525BE345C25E3B00ED504 Jyankyo (Japan)" MSX1
C6227431BFBC3AA921120EC3DA7F6429A1A799A0 Jyanyuu (Japan)" MSX1
666E82D8A8E5D2672A9B7159ADCDC861A31C8FA1 Kage no Densetsu - Legend of Kage, The (Japan) (Alt 1)" MSX1
FFC8C57B26F2F495BD77EFAC5B815EFE9C25336C Kage no Densetsu - Legend of Kage, The (Japan)" MSX1
632EF250C76B222158BA90DFC68B9E004DBAFE3A Kakikukekon (Japan) (Program)" MSX1

View File

@ -19,8 +19,10 @@
;games which might be good according to goodNES, but which are almost positively not according to bootgod, who has dumps with different hashes
;these we tend to mark as Unknown, because maybe these are variants of the cart which bootgod didnt happen to dump, or maybe bootgod's is wrong (?)
sha1:E80FF0B707B0D675FDBEF474E3FDB1A83E2B7C44 U Mississippi Satsujin Jiken (J) NES board=JALECO-JF-11;PRG=128;CHR=32;PAD_H=1
;GoodNES marks the following (alt) rom as B [h2]
sha1:8A5FD1061ADACDEABF422A2D2E555FF70749AE7C U Mississippi Satsujin Jiken (Alt) (J) NES board=MAPPER066;PRG=128;CHR=32;PAD_H=1
;possibly good roms for games which arent in bootgod's db yet, most likely due to obscurity or incompleteness at the present.
;when they appear in bootgod's db then we can re-evaluate this category.
sha1:91CECCFCAC90E417E9AEE80E8F7B560A20EB33CC Ai Sensei No Oshiete Watashi No Hoshi (J) NES board=IREM-G101;PRG=256;CHR=128;WRAM=8
@ -96,7 +98,6 @@ sha1:2028940CF7C757A3A7931A741D5EC79C3554D38C O Wally Bear and the No Gang (AVE)
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
;these roms are in goodNES but theyre junk. hacks, mostly. ideally we would put ever game from goodNES that was labeled as a hack in a list here.
sha1:111D38E2FB41D0B43753E18757D427A91B0DBCB9 H Dragon Ball Z II Gekishin Freeza!! (J) NES board=BANDAI-LZ93D50+24C02;PRG=256;CHR=256;WRAM=0
sha1:A907E600CEDA175ECD115B406B28155397A4C1FA H Dragon Ball Z Gaiden Saiya Jin Zetsumetsu Keikaku (CH) NES board=BANDAI-FCG-1;PRG=512;CHR=256;WRAM=0
sha1:A13EAF0132905FBE3D0456BB075028A30C084D0E H Dragon Ball Dai Maou Fukkatsu (J) [hFFE] NES board=BANDAI-FCG-1;PRG=128;CHR=128;WRAM=0;VRAM=0
sha1:8885F4F00C0B73C156179BCEABA5381487DBEAAD H Spy vs Spy (J) NES board=HVC-CNROM-256K-01;PRG=32;CHR=8;WRAM=8
sha1:8C676CC9BEF5B93C5A7630D12B8A5B2FEBCE3438 H Rad Racket Deluxe Tennis II NES board=NINA-06;PRG=32;CHR=32
@ -169,7 +170,6 @@ sha1:12DDD9EDB8894C200C9D89B9EE5673F1202ABA19 Falsion (FDS Conversion, Whirlwin
sha1:D6E9F3722CFA26CBC582649F197D780809F575CA O Family Circuit '91 (J) [o1] NES board=MAPPER210;PAD_V=1;PAD_H=0
sha1:387E7B477F5A61A165A41CD2BFE8A467B3816323 O Family Circuit '91 (J) [o2] NES board=MAPPER210;PAD_V=1;PAD_H=0
sha1:68ADA89BC7539679871AD14C5C1FFADF04D71280 O Family Circuit '91 (J) [o3] NES board=MAPPER210;PAD_V=1;PAD_H=0
sha1:8A5FD1061ADACDEABF422A2D2E555FF70749AE7C B Mississippi Satsujin Jiken (J) [h2] NES board=MAPPER066
sha1:C1F7AD0A347078B9213B2748D4ADFF33305A6647 O Mississippi Satsujin Jiken (J) [h2][o1] NES board=MAPPER066
sha1:4BBD4C55C37F531031177DE51F007B10418AD760 O Pyramid (AVE) (PRG1) [o1] NES board=MAPPER000
sha1:BAF860940369C54B3FF547DA7E759515015B1131 O Pyramid (AVE) (PRG1) [o2] NES board=MAPPER000
@ -180,7 +180,6 @@ sha1:43E3ED6480E7BF32FFAF1AEBC7F534E0A9B775E6 T Super Mario Bros 2 (Lost Levels)
sha1:F32E366828DCA94A612DD39613858DD8E26FA2DC T Thunder & Lightning (U) [t1] NES board=MAPPER066;WRAM=0
sha1:8554112E83B5978F5D4EC6E4551F390D5F698E00 B U-Force Power Games (U) (Prototype2) (Defaced by NA) [b1] NES board=NES-GNROM;WRAM=0
sha1:A6A0A3DC8438558FA5DA3AF8D3349AA8CF080404 Xi You Ji Hou Zhuan (Ch) NES board=MAPPER162
sha1:BC1734BEE472D34F489A6F5F2530A019F28055B7 B 800-in-1 [p1][b1] NES board=MAPPER236
sha1:BC1734BEE472D34F489A6F5F2530A019F28055B7 G 800-in-1 [p1][U] NES board=MAPPER236;VRAM=8
sha1:BD167D1BCC9A008D04136EB91396EBEBCAC976E2 B R.B.I. Baseball (Tengen) [b] NES board=TENGEN-800002;WRAM=0;PAD_H=1;PAD_V=0
sha1:DEE958845DC528BED899557FB2A8A3B61F1BA7D1 Bao Xiao San Guo (Ch) [a4] NES board=WAIXINGMAPPER176
@ -289,7 +288,6 @@ sha1:B5C4E5E858113F5AA5E063BC79A12D7F6B856E6C Contra (Konami Collection 2002) N
;chinese shit
sha1:BFA31777E077E64AF0E274B5A22B57C6765D36E1 Fan Kong Jing Ying (Unl) (Ch) NES board=MAPPER241;MIR=H
sha1:17473C223453D2D80FCB9DCFA317947287DC5C52 Xing He Zhan Shi (Ch) NES board=MAPPER176
sha1:0B58E16B7FD5ABE62B1D9B1841875582DF5A9195 Ying Lie Qun Xia Zhuan (Ch) NES board=MAPPER192
sha1:27CB8AEAF0EA97A6C69D3D90BC056C5EB61695F6 Dai-2-Ji Super Robot Taisen (Ch) NES board=MAPPER194;VRAM=2
sha1:F5FA7807F2B70ADFE5707D9BF88F90DAC1436DB0 Di 4 Ci Ji Qi Ren Dai Zhan (Ch) NES board=MAPPER074;VRAM=2

View File

@ -5777,100 +5777,100 @@ DCB24422572D9ACF8DC158AA734EBB79 Zoom! (JU) [!] GEN
; ************ Sega 32X ************
B13EB9474A946EFF30546A9A2A768649 32X Babe Picture by Fonzie (32X) (PD) [a1] GEN
2449E7F984FB74AFD350777439DD3294 32X Babe Picture by Fonzie (32X) (PD) GEN
E1E65872EABC294A2ACFB7C3BD85C837 32X Qinter Demo by Fonzie (32X) (PD) GEN
DBC990DB554E98958CBFB90B270A3F13 32X Sample Program - Celtic - PWM Test (32X) (U) [b1] GEN
62D3B8F18C3D90AFE343D07EAD9C1D4C 32X Sample Program - Celtic - PWM Test (32X) (U) GEN
F772E22B574406E3E20C172117050973 36 Great Holes Starring Fred Couples (32X) (E) [!] GEN
902F28EBDAFBDDE3E1BA58EB3D4E2CB0 36 Great Holes Starring Fred Couples (32X) (E) [b1] GEN
B90A2A1EEC015911AA445F9C41D7BC32 36 Great Holes Starring Fred Couples (32X) (JU) [!] GEN
A8E05BD3CDF97E1811EBD6D52C4371A7 After Burner Complete (32X) (E) [!] GEN
EC9529858CC7961B39F5382B2F657B8F After Burner Complete (32X) (JU) [!] GEN
E6A3E8049631C65EA7193C15159012D9 Back and Forth Rotating XOR Palette by DevSter (32X) (PD) GEN
ADEA726D3A7186292274014024620FB8 Backward Rotating XOR Palette Demo by DevSter (32X) (PD) GEN
35A11E021CA0B7FF909E4774EB8B3236 BC Racers (32X) (W) [c][!] GEN
C238B112113B0297B2B9F4F618D56598 Blackthorne (32X) (U) [!] GEN
1738A479B0253BCB0BCFB7BF09C03ADD Brutal Unleashed - Above the Claw (32X) (U) [!] GEN
8AADC467D31BC64F95A7FBE8F95AFEB3 Cosmic Carnage (32X) (E) [!] GEN
32F3002A46A462735AA12CA856CB7652 Cosmic Carnage (32X) (JU) [!] GEN
30EE320F76DB70A836EDEFF2C8CE9CD2 Darxide (32X) (E) (M4) [!] GEN
833653B5FD3D49C73E562A42EB7F4F8B DevSter Owns! Text Demo (32X) (PD) GEN
1ABE8B9B1855B1B101CB7F1D86395C22 Doom (32X) (E) [!] GEN
79339867D9D4F58B169753D9A29EA1A5 Doom (32X) (JU) [!] GEN
C2B642FDCFFF8BFF511E45203A1E8679 ECCO the Dolphin CinePak Demo (32X) (JU) GEN
24AAA6EF307D20147CE10E7610E59AA2 FIFA International Soccer 96 (32X) (UE) (M6) [c][!] GEN
11990609886231D241BD284FD2C05ADB Green Rotating No Stretching XOR Palette Demo by DevSter (32X) (PD) GEN
D6F06432D0E6A01940EB64C4A3F8A554 Green Rotating XOR Palette Demo by DevSter (32X) (PD) GEN
A62154ED4F0CFACD79012CDB2A164191 Hot Chick by DevSter (32X) (PD) GEN
4C6906C7D0E7A0A01268806A8A7FA788 Hot Chick Drawn Without the SH2s for Emulators by DevSter (32X) (PD) GEN
FF00FE687C0712952176510A0CEB1046 Hot Chick Drawn Without the SH2s for Hardware by DevSter (32X) (PD) GEN
546823F02D20458C20113CF23E41C764 Hot Chick in High Quality 15BPP by DevSter (32X) (PD) GEN
174FCBC5026408D00E727B907970F660 Hot Chick in VDP Mode 2 by DevSter (32X) (PD) GEN
E68D3DBA08FED9B6301502E89E226595 Hot Chick in VDP Mode 3 by DevSter (32X) (PD) GEN
DDE7F49364694285EDC48B7362C45C91 Hot Chick Spinning Demo by DevSter (32X) (PD) GEN
CA13D2EC9F208B0EBF90DD7B60124F6E Hot Chick Spinning Slower Demo by DevSter (32X) (PD) GEN
D6DBD0DC6748D90D69095F9C473A40C2 Hot Chick with Genesis VDP Overlay by DevSter (32X) (PD) GEN
B3AFA1355EDD3D8EA546A3562DE877B3 Hot Chick Zoom Shot by DevSter (32X) (PD) GEN
4CE9E6B6E8883D8A678D90AABCE022D0 Knuckles' Chaotix (32X) (E) [!] GEN
72D3EB77A39F28ADF0C679B6EDDBF95E Knuckles' Chaotix (32X) (E) [f1] GEN
47B1095E68B053125CD2CD5B1AC4EB50 Knuckles' Chaotix (32X) (JU) [!] GEN
D0981100ADF924A085C4C43FFD3F8B4C Knuckles' Chaotix (32X) (JU) [f1] GEN
6AF6207B1E67072A9104178130C61712 Kolibri (32X) (W) [!] GEN
489DED0CC43448881CD863418BACF8E6 Mars Check Program V1.0 (32X) (JU) GEN
CF2A08955A2C92CF6B3A562807F0896E Mars Sample Program - Egypt (32X) (JU) [b1] GEN
7B84A8F2BA03B9A610DB594D47693B45 Mars Sample Program - Egypt (32X) (JU) [b2] GEN
4213C4846622DBEFB514A0441A553ACE Mars Sample Program - Egypt (32X) (JU) GEN
97DBCC7366802B37A7F1FBBDCB5BD943 Mars Sample Program - Gnu Sierra (32X) (JU) [b1] GEN
FC5DC432CEF5D977A7B9A0575ACD884E Mars Sample Program - Gnu Sierra (32X) (JU) GEN
D79B2E1D3EFAA1FA85B83AFED474EFC6 Mars Sample Program - Runlength Mode Test (32X) (JU) [b1] GEN
915472C8D25C79F819492F660E5A8D06 Mars Sample Program - Runlength Mode Test (32X) (JU) GEN
2CD456B784DFB3B214B51086D5954839 Mars Sample Program - SOJ (32X) (JU) [b1] GEN
68E63E08AA1B95D4B5B249EF6DE7B1B3 Mars Sample Program - SOJ (32X) (JU) GEN
0EDED8598A9D1D83C1ABAEF65FE7EA54 Mars Sample Program - Texture Test (32X) (JU) [b1] GEN
BD0B324D1EDD51103A350E1973179FB7 Mars Sample Program - Texture Test (32X) (JU) GEN
5AB011DAE907F77E68EB764BEC3870D8 Metal Head (32X) (E) (M2) [!] GEN
9ADD3DFA94ADEC73FB9A8EBD972DA04E Metal Head (32X) (E) (M2) [b1] GEN
03CC5D7549D71BA4E9DDC1BEAE3805FB Metal Head (32X) (JU) (M2) [!] GEN
A95C0E7C1D35FD42CD2E3EB7B06CB6D0 Mortal Kombat II (32X) (W) (Dec 1994) [!] GEN
9D258D11FE1E4CAC2C1AAB370C35E57A Mortal Kombat II (32X) (W) (Jan 1995) [!] GEN
6BC365808A00B8A640DD86CCB5A0EA24 Motocross Championship (32X) (E) [!] GEN
2C4A934985021624D48725B8D7B039E8 Motocross Championship (32X) (JU) [!] GEN
966A5E00DD7BCDC70B05C5A0C0E8F7AA NBA Jam Tournament Edition (32X) (W) [!] GEN
E273C10114351CDAFEBA1ABCCCA8909D NFL Quarterback Club (32X) (W) [!] GEN
F5954481E3CCC894E2BB1CFC258EEE2D Optimized Rotating XOR Palette Demo by DevSter (32X) (PD) GEN
E091E542F7EA29EF3DAF6022B36E219B Pitfall (32X) (U) [!] GEN
E1EFC5804D3360E7B19F7542219BF964 Primal Rage (32X) (W) [!] GEN
5F955B5FEAB07C072FC345F1FEE52A60 RBI Baseball 95 (32X) (U) [!] GEN
40D1AC4AEC5D036BC635724503A6AA39 Rotating No Background Fill XOR Palette Demo by DevSter (32X) (PD) GEN
FBFD4E7544095684573E7968C22FC526 Rotating Pixel Skipping XOR Palette Demo by DevSter (32X) (PD) GEN
9D5BAC98307ECCC776BAC4831F60C524 Rotating XOR Palette Demo by DevSter (32X) (PD) GEN
F4BB8844D77442DBB5BEE78D0246B456 Sangokushi IV (32X) (J) [!] GEN
1415A8675ADF3E8647B3DF673B50056D Shadow Squadron (32X) (UE) [!] GEN
4619E328E1719BEE165941D891C08D81 Space Harrier (32X) (E) [!] GEN
6180E973F678BFC96705E8BE4E0783F1 Space Harrier (32X) (JU) [!] GEN
A60B0838A776966E17A8F10B94BADDEF Spider-Man - Web of Fire (32X) (W) [!] GEN
78086FBA202066FF4F968D35E7C21C11 Star Trek - Starfleet Academy Bridge Simulator (32X) (U) [!] GEN
BFAA6FD031490C26E25F3D59D9C37497 Star Wars Arcade (32X) (E) [!] GEN
F6E8648A6CED9017C9F0BF0CA544F17F Star Wars Arcade (32X) (J) [!] GEN
AE3A42C6297EF25C6018A209FDA0194E Star Wars Arcade (32X) (U) [!] GEN
1E233836CACF3EBEF42CF0FC78397FB1 Star Wars Arcade (32X) (U) [b1] GEN
E93C5656EB04C97A9CD37B6F56C19323 Super-X Raycasting Engine Test 1 by Fonzie (32X) (PD) GEN
024773EAB6B3AACD7D4528F18C110D60 Super-X Raycasting Engine Test 2 by Fonzie (32X) (PD) GEN
9349B07AF5CF6C7DD39EA0E43AE6A29D Switching CRAM Palettes by DevSter (32X) (PD) GEN
1B06C84CAF09206A8D9F0BB3EAABA512 T-MEK (32X) (W) [!] GEN
30989C83D4E4EA3C35A1F3E2620B8465 Tempo (32X) (JU) [!] GEN
386D99D132CE5699ADE81B4473CEF5B4 Toughman Contest (32X) (W) [!] GEN
ADCF6C6150D1BC3D073D3754B22EBC69 Virtua Fighter (32X) (E) [!] GEN
17DE0712018B95CD307A4C7C835EE426 Virtua Fighter (32X) (E) [b1] GEN
901E97C9F731FBDF1F1EAD0FBF58249A Virtua Fighter (32X) (JU) [!] GEN
C30A6430B1A7E819BD2DDE63A41D4D57 Virtua Racing Deluxe (32X) (E) [!] GEN
FB8B10729078DE36A736BC4DECAE97D6 Virtua Racing Deluxe (32X) (E) [b1] GEN
31D1280D97A866C35180ACDDBBE0BA34 Virtua Racing Deluxe (32X) (E) [h1C] GEN
08CAE0A96D9EE07001C6E1C247D407C6 Virtua Racing Deluxe (32X) (J) [!] GEN
72B1AD0F949F68DA7D0A6339ECD51A3F Virtua Racing Deluxe (32X) (U) [!] GEN
4D14EAB0585E79E2FC4789E090755F2D World Series Baseball '95 (32X) (U) [!] GEN
B3788F861803D21CFA0E559695835F44 WWF RAW (32X) (W) [!] GEN
8456CAE9975BA6CB041C4EF2BE54B1A1 WWF Wrestlemania Arcade (32X) (W) [!] GEN
FEF67ECDF8C5369BA4ACAFAC99C768B5 XOR Palette Demo by DevSter (32X) (PD) GEN
BD32A5E46D0159DC88CB31EA4BD9D899 Zaxxon's Motherbase 2000 (32X) (JU) [!] GEN
B13EB9474A946EFF30546A9A2A768649 32X Babe Picture by Fonzie (32X) (PD) [a1] GEN 32X=true pico
2449E7F984FB74AFD350777439DD3294 32X Babe Picture by Fonzie (32X) (PD) GEN 32X=true pico
E1E65872EABC294A2ACFB7C3BD85C837 32X Qinter Demo by Fonzie (32X) (PD) GEN 32X=true pico
DBC990DB554E98958CBFB90B270A3F13 32X Sample Program - Celtic - PWM Test (32X) (U) [b1] GEN 32X=true pico
62D3B8F18C3D90AFE343D07EAD9C1D4C 32X Sample Program - Celtic - PWM Test (32X) (U) GEN 32X=true pico
F772E22B574406E3E20C172117050973 36 Great Holes Starring Fred Couples (32X) (E) [!] GEN 32X=true pico
902F28EBDAFBDDE3E1BA58EB3D4E2CB0 36 Great Holes Starring Fred Couples (32X) (E) [b1] GEN 32X=true pico
B90A2A1EEC015911AA445F9C41D7BC32 36 Great Holes Starring Fred Couples (32X) (JU) [!] GEN 32X=true pico
A8E05BD3CDF97E1811EBD6D52C4371A7 After Burner Complete (32X) (E) [!] GEN 32X=true pico
EC9529858CC7961B39F5382B2F657B8F After Burner Complete (32X) (JU) [!] GEN 32X=true pico
E6A3E8049631C65EA7193C15159012D9 Back and Forth Rotating XOR Palette by DevSter (32X) (PD) GEN 32X=true pico
ADEA726D3A7186292274014024620FB8 Backward Rotating XOR Palette Demo by DevSter (32X) (PD) GEN 32X=true pico
35A11E021CA0B7FF909E4774EB8B3236 BC Racers (32X) (W) [c][!] GEN 32X=true pico
C238B112113B0297B2B9F4F618D56598 Blackthorne (32X) (U) [!] GEN 32X=true pico
1738A479B0253BCB0BCFB7BF09C03ADD Brutal Unleashed - Above the Claw (32X) (U) [!] GEN 32X=true pico
8AADC467D31BC64F95A7FBE8F95AFEB3 Cosmic Carnage (32X) (E) [!] GEN 32X=true pico
32F3002A46A462735AA12CA856CB7652 Cosmic Carnage (32X) (JU) [!] GEN 32X=true pico
30EE320F76DB70A836EDEFF2C8CE9CD2 Darxide (32X) (E) (M4) [!] GEN 32X=true pico
833653B5FD3D49C73E562A42EB7F4F8B DevSter Owns! Text Demo (32X) (PD) GEN 32X=true pico
1ABE8B9B1855B1B101CB7F1D86395C22 Doom (32X) (E) [!] GEN 32X=true pico
79339867D9D4F58B169753D9A29EA1A5 Doom (32X) (JU) [!] GEN 32X=true pico
C2B642FDCFFF8BFF511E45203A1E8679 ECCO the Dolphin CinePak Demo (32X) (JU) GEN 32X=true pico
24AAA6EF307D20147CE10E7610E59AA2 FIFA International Soccer 96 (32X) (UE) (M6) [c][!] GEN 32X=true pico
11990609886231D241BD284FD2C05ADB Green Rotating No Stretching XOR Palette Demo by DevSter (32X) (PD) GEN 32X=true pico
D6F06432D0E6A01940EB64C4A3F8A554 Green Rotating XOR Palette Demo by DevSter (32X) (PD) GEN 32X=true pico
A62154ED4F0CFACD79012CDB2A164191 Hot Chick by DevSter (32X) (PD) GEN 32X=true pico
4C6906C7D0E7A0A01268806A8A7FA788 Hot Chick Drawn Without the SH2s for Emulators by DevSter (32X) (PD) GEN 32X=true pico
FF00FE687C0712952176510A0CEB1046 Hot Chick Drawn Without the SH2s for Hardware by DevSter (32X) (PD) GEN 32X=true pico
546823F02D20458C20113CF23E41C764 Hot Chick in High Quality 15BPP by DevSter (32X) (PD) GEN 32X=true pico
174FCBC5026408D00E727B907970F660 Hot Chick in VDP Mode 2 by DevSter (32X) (PD) GEN 32X=true pico
E68D3DBA08FED9B6301502E89E226595 Hot Chick in VDP Mode 3 by DevSter (32X) (PD) GEN 32X=true pico
DDE7F49364694285EDC48B7362C45C91 Hot Chick Spinning Demo by DevSter (32X) (PD) GEN 32X=true pico
CA13D2EC9F208B0EBF90DD7B60124F6E Hot Chick Spinning Slower Demo by DevSter (32X) (PD) GEN 32X=true pico
D6DBD0DC6748D90D69095F9C473A40C2 Hot Chick with Genesis VDP Overlay by DevSter (32X) (PD) GEN 32X=true pico
B3AFA1355EDD3D8EA546A3562DE877B3 Hot Chick Zoom Shot by DevSter (32X) (PD) GEN 32X=true pico
4CE9E6B6E8883D8A678D90AABCE022D0 Knuckles' Chaotix (32X) (E) [!] GEN 32X=true pico
72D3EB77A39F28ADF0C679B6EDDBF95E Knuckles' Chaotix (32X) (E) [f1] GEN 32X=true pico
47B1095E68B053125CD2CD5B1AC4EB50 Knuckles' Chaotix (32X) (JU) [!] GEN 32X=true pico
D0981100ADF924A085C4C43FFD3F8B4C Knuckles' Chaotix (32X) (JU) [f1] GEN 32X=true pico
6AF6207B1E67072A9104178130C61712 Kolibri (32X) (W) [!] GEN 32X=true pico
489DED0CC43448881CD863418BACF8E6 Mars Check Program V1.0 (32X) (JU) GEN 32X=true pico
CF2A08955A2C92CF6B3A562807F0896E Mars Sample Program - Egypt (32X) (JU) [b1] GEN 32X=true pico
7B84A8F2BA03B9A610DB594D47693B45 Mars Sample Program - Egypt (32X) (JU) [b2] GEN 32X=true pico
4213C4846622DBEFB514A0441A553ACE Mars Sample Program - Egypt (32X) (JU) GEN 32X=true pico
97DBCC7366802B37A7F1FBBDCB5BD943 Mars Sample Program - Gnu Sierra (32X) (JU) [b1] GEN 32X=true pico
FC5DC432CEF5D977A7B9A0575ACD884E Mars Sample Program - Gnu Sierra (32X) (JU) GEN 32X=true pico
D79B2E1D3EFAA1FA85B83AFED474EFC6 Mars Sample Program - Runlength Mode Test (32X) (JU) [b1] GEN 32X=true pico
915472C8D25C79F819492F660E5A8D06 Mars Sample Program - Runlength Mode Test (32X) (JU) GEN 32X=true pico
2CD456B784DFB3B214B51086D5954839 Mars Sample Program - SOJ (32X) (JU) [b1] GEN 32X=true pico
68E63E08AA1B95D4B5B249EF6DE7B1B3 Mars Sample Program - SOJ (32X) (JU) GEN 32X=true pico
0EDED8598A9D1D83C1ABAEF65FE7EA54 Mars Sample Program - Texture Test (32X) (JU) [b1] GEN 32X=true pico
BD0B324D1EDD51103A350E1973179FB7 Mars Sample Program - Texture Test (32X) (JU) GEN 32X=true pico
5AB011DAE907F77E68EB764BEC3870D8 Metal Head (32X) (E) (M2) [!] GEN 32X=true pico
9ADD3DFA94ADEC73FB9A8EBD972DA04E Metal Head (32X) (E) (M2) [b1] GEN 32X=true pico
03CC5D7549D71BA4E9DDC1BEAE3805FB Metal Head (32X) (JU) (M2) [!] GEN 32X=true pico
A95C0E7C1D35FD42CD2E3EB7B06CB6D0 Mortal Kombat II (32X) (W) (Dec 1994) [!] GEN 32X=true pico
9D258D11FE1E4CAC2C1AAB370C35E57A Mortal Kombat II (32X) (W) (Jan 1995) [!] GEN 32X=true pico
6BC365808A00B8A640DD86CCB5A0EA24 Motocross Championship (32X) (E) [!] GEN 32X=true pico
2C4A934985021624D48725B8D7B039E8 Motocross Championship (32X) (JU) [!] GEN 32X=true pico
966A5E00DD7BCDC70B05C5A0C0E8F7AA NBA Jam Tournament Edition (32X) (W) [!] GEN 32X=true pico
E273C10114351CDAFEBA1ABCCCA8909D NFL Quarterback Club (32X) (W) [!] GEN 32X=true pico
F5954481E3CCC894E2BB1CFC258EEE2D Optimized Rotating XOR Palette Demo by DevSter (32X) (PD) GEN 32X=true pico
E091E542F7EA29EF3DAF6022B36E219B Pitfall (32X) (U) [!] GEN 32X=true pico
E1EFC5804D3360E7B19F7542219BF964 Primal Rage (32X) (W) [!] GEN 32X=true pico
5F955B5FEAB07C072FC345F1FEE52A60 RBI Baseball 95 (32X) (U) [!] GEN 32X=true pico
40D1AC4AEC5D036BC635724503A6AA39 Rotating No Background Fill XOR Palette Demo by DevSter (32X) (PD) GEN 32X=true pico
FBFD4E7544095684573E7968C22FC526 Rotating Pixel Skipping XOR Palette Demo by DevSter (32X) (PD) GEN 32X=true pico
9D5BAC98307ECCC776BAC4831F60C524 Rotating XOR Palette Demo by DevSter (32X) (PD) GEN 32X=true pico
F4BB8844D77442DBB5BEE78D0246B456 Sangokushi IV (32X) (J) [!] GEN 32X=true pico
1415A8675ADF3E8647B3DF673B50056D Shadow Squadron (32X) (UE) [!] GEN 32X=true pico
4619E328E1719BEE165941D891C08D81 Space Harrier (32X) (E) [!] GEN 32X=true pico
6180E973F678BFC96705E8BE4E0783F1 Space Harrier (32X) (JU) [!] GEN 32X=true pico
A60B0838A776966E17A8F10B94BADDEF Spider-Man - Web of Fire (32X) (W) [!] GEN 32X=true pico
78086FBA202066FF4F968D35E7C21C11 Star Trek - Starfleet Academy Bridge Simulator (32X) (U) [!] GEN 32X=true pico
BFAA6FD031490C26E25F3D59D9C37497 Star Wars Arcade (32X) (E) [!] GEN 32X=true pico
F6E8648A6CED9017C9F0BF0CA544F17F Star Wars Arcade (32X) (J) [!] GEN 32X=true pico
AE3A42C6297EF25C6018A209FDA0194E Star Wars Arcade (32X) (U) [!] GEN 32X=true pico
1E233836CACF3EBEF42CF0FC78397FB1 Star Wars Arcade (32X) (U) [b1] GEN 32X=true pico
E93C5656EB04C97A9CD37B6F56C19323 Super-X Raycasting Engine Test 1 by Fonzie (32X) (PD) GEN 32X=true pico
024773EAB6B3AACD7D4528F18C110D60 Super-X Raycasting Engine Test 2 by Fonzie (32X) (PD) GEN 32X=true pico
9349B07AF5CF6C7DD39EA0E43AE6A29D Switching CRAM Palettes by DevSter (32X) (PD) GEN 32X=true pico
1B06C84CAF09206A8D9F0BB3EAABA512 T-MEK (32X) (W) [!] GEN 32X=true pico
30989C83D4E4EA3C35A1F3E2620B8465 Tempo (32X) (JU) [!] GEN 32X=true pico
386D99D132CE5699ADE81B4473CEF5B4 Toughman Contest (32X) (W) [!] GEN 32X=true pico
ADCF6C6150D1BC3D073D3754B22EBC69 Virtua Fighter (32X) (E) [!] GEN 32X=true pico
17DE0712018B95CD307A4C7C835EE426 Virtua Fighter (32X) (E) [b1] GEN 32X=true pico
901E97C9F731FBDF1F1EAD0FBF58249A Virtua Fighter (32X) (JU) [!] GEN 32X=true pico
C30A6430B1A7E819BD2DDE63A41D4D57 Virtua Racing Deluxe (32X) (E) [!] GEN 32X=true pico
FB8B10729078DE36A736BC4DECAE97D6 B Virtua Racing Deluxe (32X) (E) [b1] GEN 32X=true pico
31D1280D97A866C35180ACDDBBE0BA34 Virtua Racing Deluxe (32X) (E) [h1C] GEN 32X=true pico
08CAE0A96D9EE07001C6E1C247D407C6 Virtua Racing Deluxe (32X) (J) [!] GEN 32X=true pico
72B1AD0F949F68DA7D0A6339ECD51A3F Virtua Racing Deluxe (32X) (U) [!] GEN 32X=true pico
4D14EAB0585E79E2FC4789E090755F2D World Series Baseball '95 (32X) (U) [!] GEN 32X=true pico
B3788F861803D21CFA0E559695835F44 WWF RAW (32X) (W) [!] GEN 32X=true pico
8456CAE9975BA6CB041C4EF2BE54B1A1 WWF Wrestlemania Arcade (32X) (W) [!] GEN 32X=true pico
FEF67ECDF8C5369BA4ACAFAC99C768B5 XOR Palette Demo by DevSter (32X) (PD) GEN 32X=true pico
BD32A5E46D0159DC88CB31EA4BD9D899 Zaxxon's Motherbase 2000 (32X) (JU) [!] GEN 32X=true pico

View File

@ -165,7 +165,7 @@ AC90D79743CAC1AFCD7049F7B4E73BC4 Cyborg Hunter (UE) SMS FM USA;Europe
6B0FC60AA886C060BF1A16EA97B4F441 Danan - The Jungle Fighter (E) SMS Europe
8D5E93715BAD32BA8BBCAC9D21E87D89 Dead Angle (UE) SMS USA;Europe
05E3071AAD9C36B6E18F1656592EEB3D Deep Duck Trouble Starring Donald Duck (E) SMS Disney Europe
8FE55ADE7B34AA4E42C5F63F4368497F Desert Speedtrap Starring Road Runner and Wile E. Coyote (E) (En,Fr,De,Es,It) SMS Europe
8FE55ADE7B34AA4E42C5F63F4368497F Desert Speedtrap Starring Road Runner and Wile E. Coyote (E) (En,Fr,De,Es,It) SMS SRAM=8192 Europe
DF89AA1EBC5F42DB21FB8D12D9E78511 Desert Strike (E) (En,Fr,De,Es) SMS Europe
1DCAF7D1EA7CAAAA716F0EC43C3F828A Dick Tracy (UE) SMS USA;Europe
BB448CA5CE1EC7D86636C6571D6E94CB Dinobasher Starring Bignose the Caveman (E) (Proto) SMS CMMapper Europe
@ -559,7 +559,7 @@ A7F1049812A4CD1F180DCD644B10145F Wimbledon (E) SMS Sports;Tennis Europe
6046D9EE439F3C76EB6713EEA8BA984B Winter Olympics - Lillehammer '94 (E) (En,Fr,De,Es,It,Pt,Sv,No) SMS Sports Europe
D3BCF99A883E14A2F9DF8DD92662710F Winter Olympics - Lillehammer '94 (B) (En,Fr,De,Es,It,Pt,Sv,No) SMS Sports Brazil
08EB9BF02F5EB4E238F791F27D65449A Wolfchild (E) SMS Europe
E7F86C049E4BD8B26844FF62BD067D57 Wonder Boy III - The Dragon's Trap (UE) SMS Wonder Boy Series FM;PatchBytes=25B:00,25C:00 USA;Europe
E7F86C049E4BD8B26844FF62BD067D57 Wonder Boy III - The Dragon's Trap (UE) SMS Wonder Boy Series FM USA;Europe
8F8AAAC492DE96F2CFDDB9D1A57DD979 Wonder Boy in Monster Land (UE) SMS Wonder Boy Series;Arcade FM USA;Europe
16BE61F4DE705CDD636D1FB1662E24DE Wonder Boy in Monster Land (UE) (Beta) SMS Wonder Boy Series;Arcade FM USA;Europe
5837764C172C8C43C8C7B21F2144CF27 Wonder Boy in Monster World (E) SMS Wonder Boy Series Europe

View File

@ -770,7 +770,7 @@ CC3A20CD8BFF2AAAF1B3BDE3E61A40D20F3421C6 G F1 Pole Position (USA) (Beta) SNES
4A157C556B27F92C9850EE8547A2D5A61C8156F3 G F1 Pole Position 2 (Europe) SNES
30709476A6B5412A5D3975C3BAA6A3822D598820 G F1 ROC - Race of Champions (USA) SNES
C3264A4C87968133C77F33FCD112AE89939E4422 G F1 World Championship Edition (Europe) SNES
FB81DD15B8A9DDF8F5564D3D2FB934C6F8BFB392 G F1-ROC II - Race of Champions (USA) SNES
FB81DD15B8A9DDF8F5564D3D2FB934C6F8BFB392 G F1-ROC II - Race of Champions (USA) SNES bsnes
4B5E0657306CC9E8EBCC72214FFC6F75EFBDFB28 G Faceball 2000 (USA) SNES
3FCD5C9405BC5C261AE726E0CD91E98C87A359C9 G Falcon (USA) (Proto) SNES
3727710F65048757A56098F4C97CCD62EE0F6A2F G Famicom Bunko - Hajimari no Mori (Japan) (NP) SNES
@ -1053,8 +1053,8 @@ A095F3A20CB8C8AD30897A6C4DA78D6921C4C127 G Hashire Hebereke (Japan) SNES
0B6C5C4F7484AE643DCE60F760B600E3FA310448 G Hat Trick Hero (Japan) SNES
826806420C11D0B5ADCCAC50ADFF89057157786C G Hat Trick Hero 2 (Japan) SNES
27B381B003445EF9BD1DB0ECF9F018093A3E586B G Hatayama Hatch no Pro Yakyuu News! - Jitsumei Ban (Japan) SNES
82B4BCA58918A18707F932EC6AFC0A12A3C4B872 G Hayazashi Nidan Morita Shougi (Japan) SNES
B291ADA870B9EC09326CD2F9470EA1519CBAA2E9 G Hayazashi Nidan Morita Shougi 2 (Japan) SNES
82B4BCA58918A18707F932EC6AFC0A12A3C4B872 G Hayazashi Nidan Morita Shougi (Japan) SNES bsnes
B291ADA870B9EC09326CD2F9470EA1519CBAA2E9 G Hayazashi Nidan Morita Shougi 2 (Japan) SNES bsnes
7F8F4AF47B9B15966A6A4083A41BF3C68391A555 G Head-On Soccer (USA) SNES
6B9DBE40EF560D71F28B932DEF655073F5D78DDC G Hebereke no Oishii Puzzle wa Irimasenka (Japan) SNES
CC3350CE455FEED0304372BD9DF11D5949C9EF4D G Hebereke no Popoon (Japan) SNES
@ -1648,13 +1648,13 @@ D11E3793F46F2B1BD00150438D394E4B13489A14 G Mega Man 7 (Europe) SNES
8A32570FAD3BFC92C0508C88022FB20412DD7BED G Mega Man X (Europe) SNES
C65216760BA99178100A10D98457CF11496C2097 G Mega Man X (USA) (Rev 1) SNES
449A00631208FBCC8D58209E66D0D488674B7FB1 G Mega Man X (USA) SNES
5C767285DA713DE2BC883A6291D32ADC9B2D13FA G Mega Man X2 (Europe) SNES profile=Compatibility
637079014421563283CDED6AEAA0604597B2E33C G Mega Man X2 (USA) SNES profile=Compatibility
69A11324AEB57D005800771D6147603D5479B282 G Mega Man X3 (Europe) SNES profile=Compatibility
B226F7EC59283B05C1E276E2F433893F45027CAC G Mega Man X3 (USA) SNES profile=Compatibility
5C767285DA713DE2BC883A6291D32ADC9B2D13FA G Mega Man X2 (Europe) SNES bsnes
637079014421563283CDED6AEAA0604597B2E33C G Mega Man X2 (USA) SNES bsnes
69A11324AEB57D005800771D6147603D5479B282 G Mega Man X3 (Europe) SNES bsnes
B226F7EC59283B05C1E276E2F433893F45027CAC G Mega Man X3 (USA) SNES bsnes
F321FECC3EAD4F2E5EC981ED591D87EEDC068E5B G Melfand Stories (Japan) SNES
1D92EC65457C4E1BB984162412F2530CBAF13156 G Metal Combat - Falcon's Revenge (Europe) SNES
DA88FC5830DDB0CDF8FFC2E8340A607D0AD8EAA1 G Metal Combat - Falcon's Revenge (USA) SNES
1D92EC65457C4E1BB984162412F2530CBAF13156 G Metal Combat - Falcon's Revenge (Europe) SNES bsnes
DA88FC5830DDB0CDF8FFC2E8340A607D0AD8EAA1 G Metal Combat - Falcon's Revenge (USA) SNES bsnes
47738DCC7C8D1F350CC7C04FB76F5458D629D75B G Metal Marines (Europe) SNES
FE788E475FA5D44319E2C1C3D0A40F52A920E435 G Metal Marines (USA) SNES
BD1CA8F771169CFFF111046A79BCB297987E3BDC G Metal Max 2 (Japan) SNES
@ -2222,8 +2222,8 @@ BCD2FC38B4E4BF6B811B00301F349E85CA48FE1A G Rockman & Forte (Japan) SNES
A907F7ECE8A8D89126C466079712282D675486EF G Rockman 7 - Shukumei no Taiketsu! (Japan) SNES
03F8F99D27874465F8D3E5EC9628927AC5BE6FAE G Rockman X (Japan) (Rev 1) SNES
86C18BA1FC762B6D0BCDEE7314A29B5C97CAC082 G Rockman X (Japan) SNES
34DC37C8A1905EC5631FA666EBA84BB78F9C5BDF G Rockman X2 (Japan) SNES profile=Compatibility
8E0156FC7D6AF6F36B08A5E399C0284C6C5D81B8 G Rockman X3 (Japan) SNES profile=Compatibility
34DC37C8A1905EC5631FA666EBA84BB78F9C5BDF G Rockman X2 (Japan) SNES bsnes
8E0156FC7D6AF6F36B08A5E399C0284C6C5D81B8 G Rockman X3 (Japan) SNES bsnes
8D9BA291A86A3588823D8CED0F28742B5754C789 G Rockman's Soccer (Japan) SNES
C5051C6DFC40F5894D17E2B757261CD6D75C7DFE G Rocko's Modern Life - Spunky's Dangerous Day (USA) SNES
A021A30FEE0D2E750B5EF4FF3A304C20BB70583D G Rocky Rodent (Europe) (Proto) SNES
@ -3525,4 +3525,64 @@ BD0C52940A96BF470AB383100A1EA0390B145453 B Addams Family, The - Pugsley's Scaven
378D60AEA423F97DAF8314ADCD932F2E1B75A0DC B Addams Family, The - Pugsley's Scavenger Hunt (E) [t1] SNES
75CF0949C6D35FFA5856A11B3449F674038CD7DF B Aerobiz (U) [b1] SNES
CAAAC55BB9450BE2A1827DA1DA81807EC0941906 B Aladdin (Beta) [h1+C] SNES
4AA6D9BA00F80BC2D22ECE4EF9753864380A2B9D B Aladdin (Beta) [h3] SNES
4AA6D9BA00F80BC2D22ECE4EF9753864380A2B9D B Aladdin (Beta) [h3] SNES
;bsnes overrides
E3F736D0EAF53DD1EB3F2420422CCE9221B7C9B6 B Aero Fighers (U) [B1] SNES bsnes
AA416E00EDD314FDC41A2F43F906E3862BF1DB18 G Megaman X 2 (E) (VC) SNES bsnes
E5893F23A7C04036EF3D54E09B98FD1C983362BA B Megaman X 2 (E) [b1] SNES bsnes
CA65D13D20023EF7332C7F1C7156196981173225 B Megaman X 2 (E) [b2] SNES bsnes
AAB5C9CCB30C3C0FB26D126A0DE9B4FD32AD88A2 T Megaman X 2 (E) [t1] SNES bsnes
D41FB044D015D15DB7EACAE468C10F1E23E0D147 G Megaman X 2 (U) (VC) SNES bsnes
FD3BFBEF32DBB01DA2BA11CD59AD773D29A04960 B Megaman X 2 (U) [b1] SNES bsnes
E3160744BE80529152247379FB1BDBAA83569C38 O Megaman X 2 (U) [o1] SNES bsnes
BDB22B8DCB1D05BD0AE0637E90C0761F213D3631 O Megaman X 2 (U) [o1][T+Ger100% alemanic] SNES bsnes
FB09794E161425A6D614CE1ECA84247AC895CFBD O Megaman X 2 (U) [o1][T+Ger100% TranX] SNES bsnes
CD1D095591304F917369B2182395150654EBF6F5 T Megaman X 2 (U) [T+Bra Disco Voador] SNES bsnes
D32E766331888518F8CD7EC7FCFCD356F497021E T Megaman X 2 (U) [T+Bra E2P] SNES bsnes
CD3E544C46CBDE55FD93684F7ABD5CCE9BDD9667 T Megaman X 2 (U) [T+Bra Gorah] SNES bsnes
FB783CD64F0117C1A77B8B45B4EFB56DB0D3A540 T Megaman X 2 (U) [T+Bra Renz] SNES bsnes
156C89F1BC7FAB609E569DF094D8039F2F65DA25 T Megaman X 2 (U) [T+Bra100% R Lopes] SNES bsnes
3CD8F106A4D17D3B92A8B73D7F3C93079DBC1286 T Megaman X 2 (U) [T+Bra100% Sonic Spin] SNES bsnes
C6B2D7F50067A18BF961A9C72FFBBDCD7F3F47A3 T Megaman X 2 (U) [T+Bra100% Zero-X] SNES bsnes
DC0E0852A189C708C3B08E2FF07192D868B604EC T Megaman X 2 (U) [T+Fre Terminus] SNES bsnes
EA488D87A9DCB6A582734E893B9A83EBAFBEEBF2 T Megaman X 2 (U) [T+Fre2.0 shock] SNES bsnes
28A8AEA2B05BD62ECBB96D7EE03340FA44D5CB15 T Megaman X 2 (U) [T+Ger1.00 G-Trans Sephiroth] SNES bsnes
E90039A27731D9BC036B188700318F7AB9B26411 T Megaman X 2 (U) [T+Ger1.00Beta G-Trans Gamer] SNES bsnes
36A332D0FB8759B4E1D98EFDB9757E22036ABB67 T Megaman X 2 (U) [T+Ger100% alemanic] SNES bsnes
A4319278B0F1BD5EA5BBDE00CE2A8D2A911A0BB5 T Megaman X 2 (U) [T+Ita091 Clomax Dominion] SNES bsnes
6E21A0A090C40C5E952F083D703A80F69BD97BF8 T Megaman X 2 (U) [T+Spa050 Pkt] SNES bsnes
7C1D4C800BBD084DA680BA48A0B526B37DEE0453 T Megaman X 2 (U) [T+Spa100 Spctrmxd] SNES bsnes
A974F8940088B1D49E85EC42129C32B420AD688E T Megaman X 2 (U) [T+Spa101 Ereza] SNES bsnes
ADEB8A47AC4DE43CEB3891CA1F083B72FD348B12 T Megaman X 2 (U) [t1] SNES bsnes
64D895A9BA213D862434D746CF5B506B0BF90D1D T Megaman X 2 (U) [T-Bra R Lopes] SNES bsnes
9759EE18F70965CA2E1ED36E8857EC644CB11765 T Megaman X 2 (U) [T-Bra70% R Lopes] SNES bsnes
A0ED9AA3ED91202C055861FCA3AF1BA027E21A52 T Megaman X 2 (U) [T-Spa] SNES bsnes
402E9357989E724C03709E2C8B44316C1B73FFAD H Megaman X 3 - Fully Playable Zero (Hack) SNES bsnes
C67E1F73200E315D4479996224C43F6A7B73E92F H Megaman X 3 - Projeto Zero by Disco Voador Romhacking (Hack) SNES bsnes
F320F4C9FC9E5CC866D899FED8B300111E41D2D7 B Megaman X 3 (E) [b1] SNES bsnes
14FFE155BDF28D421FF391E3F1F195CE49ECFDB0 B Megaman X 3 (U) [b1] SNES bsnes
B2AED01B0739A09B80E2706254DA7DD66040449F H Megaman X 3 (U) [h1C] SNES bsnes
03D2B08C081884BA58B2CE705AAEF91E310A211E H Megaman X 3 (U) [h2C] SNES bsnes
A35EE942D8F7B5893E0BCF2426E439836A4AD27D T Megaman X 3 (U) [T+Bra] SNES bsnes
6AA216BDCE51FCF68CE658FFD3D981EF21E44419 T Megaman X 3 (U) [T+Bra93% Darth Kyle] SNES bsnes
E73BED2D65297F3685F1B74287FCA4D42602BF3B T Megaman X 3 (U) [T+Fre] SNES bsnes
CF0AB362D9DECE40135301556CA3F6FA51B6F354 T Megaman X 3 (U) [T+Fre Terminus] SNES bsnes
0A4438B210EE705F8803CF466A382827A43CD84E T Megaman X 3 (U) [T+Ger100% TranX] SNES bsnes
C058FF30989B8BB8B475BEEDB797DD7841F72ECC T Megaman X 3 (U) [T+Ita] SNES bsnes
9F5F5CAE5D0A8B4761DF48FCC8C15DE529001155 T Megaman X 3 (U) [T+Spa peaso.com] SNES bsnes
46FCE27F03A45A7D701D66FB806AA1E27351127C T Megaman X 3 (U) [T+Spa0.4 Ereza] SNES bsnes
A93D9C41F7D573D4F16C887339566AD3774674EA T Megaman X 3 (U) [T+Spa100 eduardo] SNES bsnes
7DCD0FD1EF2CBED1EBF56C3999B37B8C5DF0C69F T Megaman X 3 (U) [T+Spa100 Tanero] SNES bsnes
BF8CE9F1EF4756AE4091D938AC6657DD3EFFB769 T Megaman X 3 (U) [T+Swe1.0 GCT] SNES bsnes
2BE861B48E8923916A26F41608615B9FA3B27303 T Megaman X 3 (U) [T+Swe100% Just4Fun] SNES bsnes
6F9339CC532BC2686326C0C705D3C9D5CA4FB575 G Rockman X 2 (J) (VC) SNES bsnes
1ED5D6D1E2634D09061941402AAE7AC30E33D4D7 B Rockman X 2 (J) [b1] SNES bsnes
1A0529685D1AF13F5AF209A8A297832AE433DBCD O Rockman X 2 (J) [o1] SNES bsnes
D50B69122CB3B86CC70DB993260BFE454001620F O Rockman X 2 (J) [o1+C] SNES bsnes
9E4485B6409CE8AD537A0B3178B9E0FC205A5CD7 T Rockman X 2 (J) [T+Kor] SNES bsnes
92FFE19190D118B8393A3ECF94368F9794782DA4 T Rockman X 2 (J) [t1] SNES bsnes
D954680B64234896AB5EBB3AB468C9FAFDAC9878 T Rockman X 3 (J) [T+Kor] SNES bsnes
F79522994631AF8D851F2D5C4AE267CADD81BD94 B Metal Combat - Falcon's Revenge (U) [b1] SNES bsnes
DD54A1BEB4D49BB430EC9FC236A8C04EC95BFA52 H Metal Combat - Falcon's Revenge (U) [h1C] SNES bsnes
261B9FD7AA25E5AA4430A7A836A0800DEAE2E420 H F1 World Championship Edition (E) [h1C] BSNES bsnes

View File

@ -1,34 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\output\dll\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisLogFile>..\output\dll\BizHawk.Client.ApiHawk.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>..\output\dll\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>..\output\dll\BizHawk.Client.ApiHawk.XML</DocumentationFile>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<DocumentationFile>..\output\dll\BizHawk.Client.ApiHawk.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>

View File

@ -1,226 +1,228 @@
using System;
using System.Globalization;
namespace BizHawk.Client.ApiHawk
{
/// <summary>
/// This class holds a converter for BizHawk SystemId (which is a simple <see cref="string"/>
/// It allows you to convert it to a <see cref="CoreSystem"/> value and vice versa
/// </summary>
/// <remarks>I made it this way just in case one day we need it for WPF (DependencyProperty binding). Just uncomment :IValueConverter implementation
/// I didn't implemented it because of mono compatibility
/// </remarks>
public sealed class BizHawkSystemIdToEnumConverter //:IValueConverter
{
/// <summary>
/// Convert BizHawk SystemId <see cref="string"/> to <see cref="CoreSystem"/> value
/// </summary>
/// <param name="value"><see cref="string"/> you want to convert</param>
/// <param name="targetType">The type of the binding target property</param>
/// <param name="parameter">The converter parameter to use; null in our case</param>
/// <param name="cultureInfo">The culture to use in the converter</param>
/// <returns>A <see cref="CoreSystem"/> that is equivalent to BizHawk SystemId <see cref="string"/></returns>
/// <exception cref="IndexOutOfRangeException">Thrown when SystemId hasn't been found</exception>
public object Convert(object value, Type targetType, object parameter, CultureInfo cultureInfo)
{
switch ((string)value)
{
case "AppleII":
return CoreSystem.AppleII;
case "A26":
return CoreSystem.Atari2600;
case "A78":
return CoreSystem.Atari2600;
case "A7800":
return CoreSystem.Atari7800;
case "Coleco":
return CoreSystem.ColecoVision;
case "C64":
return CoreSystem.Commodore64;
case "DGB":
return CoreSystem.DualGameBoy;
case "GB":
return CoreSystem.GameBoy;
case "GBA":
return CoreSystem.GameBoyAdvance;
case "GEN":
return CoreSystem.Genesis;
case "INTV":
return CoreSystem.Intellivision;
case "Libretro":
return CoreSystem.Libretro;
case "Lynx":
return CoreSystem.Lynx;
case "SMS":
return CoreSystem.MasterSystem;
case "NES":
return CoreSystem.NES;
case "N64":
return CoreSystem.Nintendo64;
case "NULL":
return CoreSystem.Null;
case "PCE":
case "PCECD":
case "SGX":
return CoreSystem.PCEngine;
case "PSX":
return CoreSystem.Playstation;
case "PSP":
return CoreSystem.PSP;
case "SAT":
return CoreSystem.Saturn;
case "SNES":
return CoreSystem.SNES;
case "TI83":
return CoreSystem.TI83;
case "WSWAN":
return CoreSystem.WonderSwan;
case "VB":
case "NGP":
using System;
using System.Globalization;
namespace BizHawk.Client.ApiHawk
{
/// <summary>
/// This class holds a converter for BizHawk SystemId (which is a simple <see cref="string"/>
/// It allows you to convert it to a <see cref="CoreSystem"/> value and vice versa
/// </summary>
/// <remarks>I made it this way just in case one day we need it for WPF (DependencyProperty binding). Just uncomment :IValueConverter implementation
/// I didn't implemented it because of mono compatibility
/// </remarks>
public sealed class BizHawkSystemIdToEnumConverter //:IValueConverter
{
/// <summary>
/// Convert BizHawk SystemId <see cref="string"/> to <see cref="CoreSystem"/> value
/// </summary>
/// <param name="value"><see cref="string"/> you want to convert</param>
/// <param name="targetType">The type of the binding target property</param>
/// <param name="parameter">The converter parameter to use; null in our case</param>
/// <param name="cultureInfo">The culture to use in the converter</param>
/// <returns>A <see cref="CoreSystem"/> that is equivalent to BizHawk SystemId <see cref="string"/></returns>
/// <exception cref="IndexOutOfRangeException">Thrown when SystemId hasn't been found</exception>
public object Convert(object value, Type targetType, object parameter, CultureInfo cultureInfo)
{
switch ((string)value)
{
case "AppleII":
return CoreSystem.AppleII;
case "A26":
return CoreSystem.Atari2600;
case "A78":
return CoreSystem.Atari2600;
case "A7800":
return CoreSystem.Atari7800;
case "Coleco":
return CoreSystem.ColecoVision;
case "C64":
return CoreSystem.Commodore64;
case "DGB":
return CoreSystem.DualGameBoy;
case "GB":
return CoreSystem.GameBoy;
case "GBA":
return CoreSystem.GameBoyAdvance;
case "GEN":
return CoreSystem.Genesis;
case "INTV":
return CoreSystem.Intellivision;
case "Libretro":
return CoreSystem.Libretro;
case "Lynx":
return CoreSystem.Lynx;
case "SMS":
return CoreSystem.MasterSystem;
case "NES":
return CoreSystem.NES;
case "N64":
return CoreSystem.Nintendo64;
case "NULL":
return CoreSystem.Null;
case "PCE":
case "PCECD":
case "SGX":
return CoreSystem.PCEngine;
case "PSX":
return CoreSystem.Playstation;
case "PSP":
return CoreSystem.PSP;
case "SAT":
return CoreSystem.Saturn;
case "SNES":
return CoreSystem.SNES;
case "TI83":
return CoreSystem.TI83;
case "WSWAN":
return CoreSystem.WonderSwan;
case "VB":
case "NGP":
case "DNGP":
case "O2":
case "SGB":
return 0; // like I give a shit
default:
throw new IndexOutOfRangeException(string.Format("{0} is missing in convert list", value));
}
}
/// <summary>
/// Convert BizHawk SystemId <see cref="string"/> to <see cref="CoreSystem"/> value
/// </summary>
/// <param name="value"><see cref="string"/> you want to convert</param>
/// <returns>A <see cref="CoreSystem"/> that is equivalent to BizHawk SystemId <see cref="string"/></returns>
/// <exception cref="IndexOutOfRangeException">Thrown when SystemId hasn't been found</exception>
public CoreSystem Convert(string value)
{
return (CoreSystem)Convert(value, null, null, CultureInfo.CurrentCulture);
}
/// <summary>
/// Convert a <see cref="CoreSystem"/> value to BizHawk SystemId <see cref="string"/>
/// </summary>
/// <param name="value"><see cref="CoreSystem"/> you want to convert</param>
/// <param name="targetType">The type of the binding target property</param>
/// <param name="parameter">The converter parameter to use; null in our case</param>
/// <param name="cultureInfo">The culture to use in the converter</param>
/// <returns>A <see cref="string"/> that is used by BizHawk SystemId</returns>
/// <exception cref="IndexOutOfRangeException">Thrown when <see cref="CoreSystem"/> hasn't been found</exception>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo cultureInfo)
{
switch ((CoreSystem)value)
{
case CoreSystem.AppleII:
return "AppleII";
case CoreSystem.Atari2600:
return "A26";
case CoreSystem.Atari7800:
return "A78";
case CoreSystem.ColecoVision:
return "Coleco";
case CoreSystem.Commodore64:
return "C64";
case CoreSystem.DualGameBoy:
return "DGB";
case CoreSystem.GameBoy:
return "GB";
case CoreSystem.GameBoyAdvance:
return "GBA";
case CoreSystem.Genesis:
return "GEN";
case CoreSystem.Intellivision:
return "INTV";
case CoreSystem.Libretro:
return "Libretro";
case CoreSystem.Lynx:
return "Lynx";
case CoreSystem.MasterSystem:
return "SMS";
case CoreSystem.NES:
return "NES";
case CoreSystem.Nintendo64:
return "N64";
case CoreSystem.Null:
return "NULL";
case CoreSystem.PCEngine:
return "PCE";
case CoreSystem.Playstation:
return "PSX";
case CoreSystem.PSP:
return "PSP";
case CoreSystem.Saturn:
return "SAT";
case CoreSystem.SNES:
return "SNES";
case CoreSystem.TI83:
return "TI83";
case CoreSystem.WonderSwan:
return "WSWAN";
default:
throw new IndexOutOfRangeException(string.Format("{0} is missing in convert list", value.ToString()));
}
}
/// <summary>
/// Convert a <see cref="CoreSystem"/> value to BizHawk SystemId <see cref="string"/>
/// </summary>
/// <param name="value"><see cref="CoreSystem"/> you want to convert</param>
/// <returns>A <see cref="string"/> that is used by BizHawk SystemId</returns>
/// <exception cref="IndexOutOfRangeException">Thrown when <see cref="CoreSystem"/> hasn't been found</exception>
public string ConvertBack(CoreSystem value)
{
return (string)ConvertBack(value, null, null, CultureInfo.CurrentCulture);
}
}
}
case "SGB":
case "UZE":
case "PCFX":
return 0; // like I give a shit
default:
throw new IndexOutOfRangeException(string.Format("{0} is missing in convert list", value));
}
}
/// <summary>
/// Convert BizHawk SystemId <see cref="string"/> to <see cref="CoreSystem"/> value
/// </summary>
/// <param name="value"><see cref="string"/> you want to convert</param>
/// <returns>A <see cref="CoreSystem"/> that is equivalent to BizHawk SystemId <see cref="string"/></returns>
/// <exception cref="IndexOutOfRangeException">Thrown when SystemId hasn't been found</exception>
public CoreSystem Convert(string value)
{
return (CoreSystem)Convert(value, null, null, CultureInfo.CurrentCulture);
}
/// <summary>
/// Convert a <see cref="CoreSystem"/> value to BizHawk SystemId <see cref="string"/>
/// </summary>
/// <param name="value"><see cref="CoreSystem"/> you want to convert</param>
/// <param name="targetType">The type of the binding target property</param>
/// <param name="parameter">The converter parameter to use; null in our case</param>
/// <param name="cultureInfo">The culture to use in the converter</param>
/// <returns>A <see cref="string"/> that is used by BizHawk SystemId</returns>
/// <exception cref="IndexOutOfRangeException">Thrown when <see cref="CoreSystem"/> hasn't been found</exception>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo cultureInfo)
{
switch ((CoreSystem)value)
{
case CoreSystem.AppleII:
return "AppleII";
case CoreSystem.Atari2600:
return "A26";
case CoreSystem.Atari7800:
return "A78";
case CoreSystem.ColecoVision:
return "Coleco";
case CoreSystem.Commodore64:
return "C64";
case CoreSystem.DualGameBoy:
return "DGB";
case CoreSystem.GameBoy:
return "GB";
case CoreSystem.GameBoyAdvance:
return "GBA";
case CoreSystem.Genesis:
return "GEN";
case CoreSystem.Intellivision:
return "INTV";
case CoreSystem.Libretro:
return "Libretro";
case CoreSystem.Lynx:
return "Lynx";
case CoreSystem.MasterSystem:
return "SMS";
case CoreSystem.NES:
return "NES";
case CoreSystem.Nintendo64:
return "N64";
case CoreSystem.Null:
return "NULL";
case CoreSystem.PCEngine:
return "PCE";
case CoreSystem.Playstation:
return "PSX";
case CoreSystem.PSP:
return "PSP";
case CoreSystem.Saturn:
return "SAT";
case CoreSystem.SNES:
return "SNES";
case CoreSystem.TI83:
return "TI83";
case CoreSystem.WonderSwan:
return "WSWAN";
default:
throw new IndexOutOfRangeException(string.Format("{0} is missing in convert list", value.ToString()));
}
}
/// <summary>
/// Convert a <see cref="CoreSystem"/> value to BizHawk SystemId <see cref="string"/>
/// </summary>
/// <param name="value"><see cref="CoreSystem"/> you want to convert</param>
/// <returns>A <see cref="string"/> that is used by BizHawk SystemId</returns>
/// <exception cref="IndexOutOfRangeException">Thrown when <see cref="CoreSystem"/> hasn't been found</exception>
public string ConvertBack(CoreSystem value)
{
return (string)ConvertBack(value, null, null, CultureInfo.CurrentCulture);
}
}
}

View File

@ -35,14 +35,8 @@ namespace BizHawk.Client.Common
public int BackgroundColor => 0;
public int VsyncNumerator
{
get { throw new InvalidOperationException(); }
}
public int VsyncNumerator => 0;
public int VsyncDenominator
{
get { throw new InvalidOperationException(); }
}
public int VsyncDenominator => 0;
}
}

View File

@ -13,42 +13,31 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\output\dll\</OutputPath>
<DefineConstants>TRACE;DEBUG;DOTNET20;UNMANAGED;COMPRESS;WINDOWS</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>..\output\dll\</OutputPath>
<DefineConstants>TRACE;DOTNET20;UNMANAGED;COMPRESS;WINDOWS</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib">
@ -57,15 +46,19 @@
<Reference Include="Ionic.Zip">
<HintPath>..\References\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="LuaInterface">
<HintPath>..\References\$(Platform)\LuaInterface.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLua">
<HintPath>..\References\NLua.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.105.2, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\x64\SQLite\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Xml.Linq" />
@ -161,6 +154,7 @@
<Compile Include="lua\EmuLuaLibrary.Movie.cs" />
<Compile Include="lua\EmuLuaLibrary.NES.cs" />
<Compile Include="lua\EmuLuaLibrary.SNES.cs" />
<Compile Include="lua\EmuLuaLibrary.SQL.cs" />
<Compile Include="lua\EmuLuaLibrary.String.cs" />
<Compile Include="lua\EmuLuaLibrary.UserData.cs" />
<Compile Include="lua\EnvironmentSandbox.cs" />

View File

@ -45,44 +45,23 @@ namespace BizHawk.Client.Common
/// <summary>
/// Gets absolute base as derived from EXE
/// </summary>
public static string GetBasePathAbsolute()
public static string GetGlobalBasePathAbsolute()
{
if (Global.Config.PathEntries.GlobalBaseFragment.Length < 1) // If empty, then EXE path
{
return GetExeDirectoryAbsolute();
}
var gbase = Global.Config.PathEntries.GlobalBaseFragment;
if (Global.Config.PathEntries.GlobalBaseFragment.Length >= 5
&& Global.Config.PathEntries.GlobalBaseFragment.Substring(0, 5) == "%exe%")
{
return GetExeDirectoryAbsolute();
}
// if %exe% prefixed then substitute exe path and repeat
if(gbase.StartsWith("%exe%",StringComparison.InvariantCultureIgnoreCase))
gbase = GetExeDirectoryAbsolute() + gbase.Substring(5);
if (Global.Config.PathEntries.GlobalBaseFragment[0] == '.')
{
if (Global.Config.PathEntries.GlobalBaseFragment.Length == 1)
{
return GetExeDirectoryAbsolute();
}
//rooted paths get returned without change
//(this is done after keyword substitution to avoid problems though)
if (Path.IsPathRooted(gbase))
return gbase;
if (Global.Config.PathEntries.GlobalBaseFragment.Length == 2 &&
Global.Config.PathEntries.GlobalBaseFragment == ".\\")
{
return GetExeDirectoryAbsolute();
}
//not-rooted things are relative to exe path
gbase = Path.Combine(GetExeDirectoryAbsolute(), gbase);
var tmp = Global.Config.PathEntries.GlobalBaseFragment.Remove(0, 1);
tmp = tmp.Insert(0, GetExeDirectoryAbsolute());
return tmp;
}
if (Global.Config.PathEntries.GlobalBaseFragment.Substring(0, 2) == "..")
{
return RemoveParents(Global.Config.PathEntries.GlobalBaseFragment, GetExeDirectoryAbsolute());
}
// In case of error, return EXE path
return GetExeDirectoryAbsolute();
return gbase;
}
public static string GetPlatformBase(string system)
@ -96,6 +75,13 @@ namespace BizHawk.Client.Common
}
public static string MakeAbsolutePath(string path, string system)
{
//warning: supposedly Path.GetFullPath accesses directories (and needs permissions)
//if this poses a problem, we need to paste code from .net or mono sources and fix them to not pose problems, rather than homebrew stuff
return Path.GetFullPath(MakeAbsolutePathInner(path, system));
}
static string MakeAbsolutePathInner(string path, string system)
{
// Hack
if (system == "Global")
@ -106,7 +92,7 @@ namespace BizHawk.Client.Common
// This function translates relative path and special identifiers in absolute paths
if (path.Length < 1)
{
return GetBasePathAbsolute();
return GetGlobalBasePathAbsolute();
}
if (path == "%recent%")
@ -136,35 +122,20 @@ namespace BizHawk.Client.Common
if (path.Length == 1)
{
return GetBasePathAbsolute();
return GetGlobalBasePathAbsolute();
}
if (path[0] == '.')
{
path = path.Remove(0, 1);
path = path.Insert(0, GetBasePathAbsolute());
path = path.Insert(0, GetGlobalBasePathAbsolute());
}
return path;
}
// If begins wtih .. do alorithm to determine how many ..\.. combos and deal with accordingly, return drive letter only if too many ..
if ((path[0] > 'A' && path[0] < 'Z') || (path[0] > 'a' && path[0] < 'z'))
{
// C:\
if (path.Length > 2 && path[1] == ':' && path[2] == '\\')
{
return path;
}
// file:\ is an acceptable path as well, and what FileBrowserDialog returns
if (path.Length >= 6 && path.Substring(0, 6) == "file:\\")
{
return path;
}
return GetExeDirectoryAbsolute(); // bad path
}
//handling of initial .. was removed (Path.GetFullPath can handle it)
//handling of file:// or file:\\ was removed (can Path.GetFullPath handle it? not sure)
// all pad paths default to EXE
return GetExeDirectoryAbsolute();
@ -414,7 +385,7 @@ namespace BizHawk.Client.Common
public static string TryMakeRelative(string absolutePath, string system = null)
{
var parentPath = string.IsNullOrWhiteSpace(system) ?
GetBasePathAbsolute() :
GetGlobalBasePathAbsolute() :
MakeAbsolutePath(GetPlatformBase(system), system);
if (IsSubfolder(parentPath, absolutePath))

View File

@ -16,24 +16,23 @@ namespace BizHawk.Client.Common
#region Structs
[StructLayout(LayoutKind.Sequential, Pack = 1)]
private class Bitmapfileheader
private class BITMAPFILEHEADER
{
public readonly uint bfSize;
public ushort bfType;
public uint bfSize;
public ushort bfReserved1;
public ushort bfReserved2;
public uint bfOffBits;
public Bitmapfileheader()
public BITMAPFILEHEADER()
{
bfSize = (uint)Marshal.SizeOf(this);
}
public static Bitmapfileheader FromStream(Stream s)
public static BITMAPFILEHEADER FromStream(Stream s)
{
var ret = GetObject<Bitmapfileheader>(s);
if (ret.bfSize != Marshal.SizeOf(typeof(Bitmapfileheader)))
var ret = GetObject<BITMAPFILEHEADER>(s);
if (ret.bfSize != Marshal.SizeOf(typeof(BITMAPFILEHEADER)))
{
throw new InvalidOperationException();
}
@ -42,10 +41,11 @@ namespace BizHawk.Client.Common
}
}
[StructLayout(LayoutKind.Sequential)]
private class Bitmapinfoheader
[StructLayout(LayoutKind.Sequential, Pack = 1)]
private class BITMAPINFOHEADER
{
public readonly uint biSize;
public uint biSize;
public int biWidth;
public int biHeight;
public ushort biPlanes;
@ -57,15 +57,15 @@ namespace BizHawk.Client.Common
public uint biClrUsed;
public uint biClrImportant;
public Bitmapinfoheader()
public BITMAPINFOHEADER()
{
biSize = (uint)Marshal.SizeOf(this);
}
public static Bitmapinfoheader FromStream(Stream s)
public static BITMAPINFOHEADER FromStream(Stream s)
{
var ret = GetObject<Bitmapinfoheader>(s);
if (ret.biSize != Marshal.SizeOf(typeof(Bitmapinfoheader)))
var ret = GetObject<BITMAPINFOHEADER>(s);
if (ret.biSize != Marshal.SizeOf(typeof(BITMAPINFOHEADER)))
{
throw new InvalidOperationException();
}
@ -244,8 +244,8 @@ namespace BizHawk.Client.Common
public static unsafe bool Load(IVideoProvider v, Stream s)
{
var bf = Bitmapfileheader.FromStream(s);
var bi = Bitmapinfoheader.FromStream(s);
var bf = BITMAPFILEHEADER.FromStream(s);
var bi = BITMAPINFOHEADER.FromStream(s);
if (bf.bfType != 0x4d42
|| bf.bfOffBits != bf.bfSize + bi.biSize
|| bi.biPlanes != 1
@ -295,8 +295,8 @@ namespace BizHawk.Client.Common
public static unsafe void Save(IVideoProvider v, Stream s, int w, int h)
{
var bf = new Bitmapfileheader();
var bi = new Bitmapinfoheader();
var bf = new BITMAPFILEHEADER();
var bi = new BITMAPINFOHEADER();
bf.bfType = 0x4d42;
bf.bfOffBits = bf.bfSize + bi.biSize;

View File

@ -21,8 +21,9 @@ using BizHawk.Emulation.Cores.Sony.PSP;
using BizHawk.Emulation.Cores.Sony.PSX;
using BizHawk.Emulation.DiscSystem;
using GPGX64 = BizHawk.Emulation.Cores.Consoles.Sega.gpgx64;
using GPGX64 = BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
using BizHawk.Emulation.Cores.Consoles.Sega.Saturn;
using BizHawk.Emulation.Cores.Consoles.NEC.PCFX;
namespace BizHawk.Client.Common
{
@ -86,7 +87,7 @@ namespace BizHawk.Client.Common
Type = type;
}
public RomErrorArgs(string message, string systemId, string path, bool? det, LoadErrorType type)
public RomErrorArgs(string message, string systemId, string path, bool? det, LoadErrorType type)
: this(message, systemId, type)
{
Deterministic = det;
@ -326,7 +327,7 @@ namespace BizHawk.Client.Common
Console.WriteLine("No ROM to Load");
return false;
}
// if not libretro:
// do extension checknig
ext = file.Extension.ToLowerInvariant();
@ -477,13 +478,17 @@ namespace BizHawk.Client.Common
case DiscType.SonyPSP:
game.System = "PSP";
break;
default:
default:
case DiscType.SonyPSX:
game.System = "PSX";
break;
case DiscType.MegaCD:
game.System = "GEN";
break;
case DiscType.PCFX:
game.System = "PCFX";
break;
case DiscType.AudioDisc:
case DiscType.TurboCD:
case DiscType.UnknownCDFS:
@ -504,20 +509,10 @@ namespace BizHawk.Client.Common
switch (game.System)
{
case "GEN":
if (Environment.Is64BitProcess)
{
var genesis = new GPGX64.GPGX(nextComm, null, disc, GetCoreSettings<GPGX64.GPGX>(), GetCoreSyncSettings<GPGX64.GPGX>());
nextEmulator = genesis;
}
else
{
var genesis = new GPGX(nextComm, null, disc, GetCoreSettings<GPGX>(), GetCoreSyncSettings<GPGX>());
nextEmulator = genesis;
}
var genesis = new GPGX(nextComm, null, disc, GetCoreSettings<GPGX>(), GetCoreSyncSettings<GPGX>());
nextEmulator = genesis;
break;
case "SAT":
//nextEmulator = new Yabause(nextComm, disc, GetCoreSyncSettings<Yabause>());
nextEmulator = new Saturnus(nextComm, new[] { disc }, Deterministic,
(Saturnus.Settings)GetCoreSettings<Saturnus>(), (Saturnus.SyncSettings)GetCoreSyncSettings<Saturnus>());
break;
@ -542,6 +537,10 @@ namespace BizHawk.Client.Common
}
break;
case "PCFX":
nextEmulator = new Tst(nextComm, new[] { disc },
(Tst.Settings)GetCoreSettings<Tst>(), (Tst.SyncSettings)GetCoreSyncSettings<Tst>());
break;
case "PCE":
case "PCECD":
nextEmulator = new PCEngine(nextComm, game, disc, GetCoreSettings<PCEngine>(), GetCoreSyncSettings<PCEngine>());
@ -681,11 +680,11 @@ namespace BizHawk.Client.Common
game = rom.GameInfo;
game.System = "SNES";
var snes = new LibsnesCore(game, romData, Deterministic, xmlData, nextComm, GetCoreSettings<LibsnesCore>(), GetCoreSyncSettings<LibsnesCore>());
var snes = new LibsnesCore(game, romData, xmlData, nextComm, GetCoreSettings<LibsnesCore>(), GetCoreSyncSettings<LibsnesCore>());
nextEmulator = snes;
}
catch
catch
{
DoLoadErrorCallback(ex.ToString(), "DGB", LoadErrorType.XML);
return false;
@ -782,7 +781,20 @@ namespace BizHawk.Client.Common
break;
case "SNES":
if (Global.Config.SNES_InSnes9x)
bool useSnes9x = Global.Config.SNES_InSnes9x;
if (Global.Config.CoreForcingViaGameDB && !string.IsNullOrEmpty(game.ForcedCore))
{
if (game.ForcedCore.ToLower() == "snes9x")
{
useSnes9x = true;
}
else if (game.ForcedCore.ToLower() == "bsnes")
{
useSnes9x = false;
}
}
if (useSnes9x)
{
core = CoreInventory.Instance["SNES", "Snes9x"];
}
@ -792,7 +804,7 @@ namespace BizHawk.Client.Common
((CoreFileProvider)nextComm.CoreFileProvider).SubfileDirectory = Path.GetDirectoryName(path.Replace("|", "")); // Dirty hack to get around archive filenames (since we are just getting the directory path, it is safe to mangle the filename
var romData = isXml ? null : rom.FileData;
var xmlData = isXml ? rom.FileData : null;
var snes = new LibsnesCore(game, romData, Deterministic, xmlData, nextComm, GetCoreSettings<LibsnesCore>(), GetCoreSyncSettings<LibsnesCore>());
var snes = new LibsnesCore(game, romData, xmlData, nextComm, GetCoreSettings<LibsnesCore>(), GetCoreSyncSettings<LibsnesCore>());
nextEmulator = snes;
}
@ -839,22 +851,18 @@ namespace BizHawk.Client.Common
}
else
{
try
if (Global.Config.SGB_UseBsnes)
{
game.System = "SNES";
game.AddOption("SGB");
var snes = new LibsnesCore(game, rom.FileData, Deterministic, null, nextComm, GetCoreSettings<LibsnesCore>(), GetCoreSyncSettings<LibsnesCore>());
var snes = new LibsnesCore(game, rom.FileData, null, nextComm, GetCoreSettings<LibsnesCore>(), GetCoreSyncSettings<LibsnesCore>());
nextEmulator = snes;
}
catch
else
{
// failed to load SGB bios or game does not support SGB mode.
// To avoid catch-22, disable SGB mode
Global.Config.GB_AsSGB = false;
throw;
core = CoreInventory.Instance["SGB", "Pizza Boy"];
}
}
break;
case "A78":
var gamedbpath = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "EMU7800.csv");
@ -891,17 +899,18 @@ namespace BizHawk.Client.Common
nextEmulator.CoreComm.RomStatusDetails = "PSX etc.";
break;
case "GEN":
// discard "Genplus-gx64", auto-added due to implementing IEmulator // HUH?
// core = CoreInventory.Instance["GEN", "Genplus-gx"];
if (Environment.Is64BitProcess)
if (Global.Config.CoreForcingViaGameDB && game.ForcedCore?.ToLower() == "pico")
{
core = CoreInventory.Instance["GEN", "Genplus-gx64"];
core = CoreInventory.Instance["GEN", "PicoDrive"];
}
else
{
core = CoreInventory.Instance["GEN", "Genplus-gx"];
}
break;
case "32X":
core = CoreInventory.Instance["GEN", "PicoDrive"];
break;
}
@ -944,7 +953,7 @@ namespace BizHawk.Client.Common
{
DoMessageCallback("Unable to use quicknes, using NESHawk instead");
}
return LoadRom(path, nextComm, true, recursiveCount + 1);
}
else if (ex is MissingFirmwareException)
@ -953,7 +962,9 @@ namespace BizHawk.Client.Common
}
else if (ex is CGBNotSupportedException)
{
// Note: GB as SGB was set to false by this point, otherwise we would want to do it here
// failed to load SGB bios or game does not support SGB mode.
// To avoid catch-22, disable SGB mode
Global.Config.GB_AsSGB = false;
DoMessageCallback("Failed to load a GB rom in SGB mode. Disabling SGB Mode.");
return LoadRom(path, nextComm, false, recursiveCount + 1);
}

View File

@ -540,6 +540,7 @@ namespace BizHawk.Client.Common
public bool SNES_InSnes9x = true;
public bool GBA_UsemGBA = true;
public bool A78_UseEmu7800 = true;
public bool SGB_UseBsnes = true;
public bool CoreForcingViaGameDB = true;
public string LibretroCore;
}

View File

@ -358,6 +358,13 @@ namespace BizHawk.Client.Common
new PathEntry { System = "NGP", SystemDisplayName = "NGP", Type = "Save RAM", Path = Path.Combine(".", "SaveRAM"), Ordinal = 3 },
new PathEntry { System = "NGP", SystemDisplayName = "NGP", Type = "Screenshots", Path = Path.Combine(".", "Screenshots"), Ordinal = 4 },
new PathEntry { System = "NGP", SystemDisplayName = "NGP", Type = "Cheats", Path = Path.Combine(".", "Cheats"), Ordinal = 5 },
new PathEntry { System = "PCFX", SystemDisplayName = "PCFX", Type = "Base", Path = Path.Combine(".", "PCFX"), Ordinal = 0 },
new PathEntry { System = "PCFX", SystemDisplayName = "PCFX", Type = "ROM", Path = ".", Ordinal = 1 },
new PathEntry { System = "PCFX", SystemDisplayName = "PCFX", Type = "Savestates", Path = Path.Combine(".", "State"), Ordinal = 2 },
new PathEntry { System = "PCFX", SystemDisplayName = "PCFX", Type = "Save RAM", Path = Path.Combine(".", "SaveRAM"), Ordinal = 3 },
new PathEntry { System = "PCFX", SystemDisplayName = "PCFX", Type = "Screenshots", Path = Path.Combine(".", "Screenshots"), Ordinal = 4 },
new PathEntry { System = "PCFX", SystemDisplayName = "PCFX", Type = "Cheats", Path = Path.Combine(".", "Cheats"), Ordinal = 5 },
};
}
}

View File

@ -1,7 +1,7 @@
using System;
using System.ComponentModel;
using LuaInterface;
using NLua;
namespace BizHawk.Client.Common
{
@ -16,92 +16,92 @@ namespace BizHawk.Client.Common
public override string Name => "bit";
[LuaMethodAttributes("band", "Bitwise AND of 'val' against 'amt'")]
[LuaMethod("band", "Bitwise AND of 'val' against 'amt'")]
public static uint Band(uint val, uint amt)
{
return val & amt;
}
[LuaMethodAttributes("bnot", "Bitwise NOT of 'val' against 'amt'")]
[LuaMethod("bnot", "Bitwise NOT of 'val' against 'amt'")]
public static uint Bnot(uint val)
{
return ~val;
}
[LuaMethodAttributes("bor", "Bitwise OR of 'val' against 'amt'")]
[LuaMethod("bor", "Bitwise OR of 'val' against 'amt'")]
public static uint Bor(uint val, uint amt)
{
return val | amt;
}
[LuaMethodAttributes("bxor", "Bitwise XOR of 'val' against 'amt'")]
[LuaMethod("bxor", "Bitwise XOR of 'val' against 'amt'")]
public static uint Bxor(uint val, uint amt)
{
return val ^ amt;
}
[LuaMethodAttributes("lshift", "Logical shift left of 'val' by 'amt' bits")]
[LuaMethod("lshift", "Logical shift left of 'val' by 'amt' bits")]
public static uint Lshift(uint val, int amt)
{
return val << amt;
}
[LuaMethodAttributes("rol", "Left rotate 'val' by 'amt' bits")]
[LuaMethod("rol", "Left rotate 'val' by 'amt' bits")]
public static uint Rol(uint val, int amt)
{
return (val << amt) | (val >> (32 - amt));
}
[LuaMethodAttributes("ror", "Right rotate 'val' by 'amt' bits")]
[LuaMethod("ror", "Right rotate 'val' by 'amt' bits")]
public static uint Ror(uint val, int amt)
{
return (val >> amt) | (val << (32 - amt));
}
[LuaMethodAttributes("rshift", "Logical shift right of 'val' by 'amt' bits")]
[LuaMethod("rshift", "Logical shift right of 'val' by 'amt' bits")]
public static uint Rshift(uint val, int amt)
{
return (uint)(val >> amt);
}
[LuaMethodAttributes("arshift", "Arithmetic shift right of 'val' by 'amt' bits")]
[LuaMethod("arshift", "Arithmetic shift right of 'val' by 'amt' bits")]
public static int Arshift(int val, int amt)
{
return val >> amt;
}
[LuaMethodAttributes("check", "Returns result of bit 'pos' being set in 'num'")]
[LuaMethod("check", "Returns result of bit 'pos' being set in 'num'")]
public static bool Check(long num, int pos)
{
return (num & (1 << pos)) != 0;
}
[LuaMethodAttributes("set", "Sets the bit 'pos' in 'num'")]
[LuaMethod("set", "Sets the bit 'pos' in 'num'")]
public static uint Set(uint num, int pos)
{
return (uint)(num | (uint)1 << pos);
}
[LuaMethodAttributes("clear", "Clears the bit 'pos' in 'num'")]
[LuaMethod("clear", "Clears the bit 'pos' in 'num'")]
public static long Clear(uint num, int pos)
{
return num & ~(1 << pos);
}
[LuaMethodAttributes("byteswap_16", "Byte swaps 'short', i.e. bit.byteswap_16(0xFF00) would return 0x00FF")]
[LuaMethod("byteswap_16", "Byte swaps 'short', i.e. bit.byteswap_16(0xFF00) would return 0x00FF")]
public static ushort Byteswap16(ushort val)
{
return (ushort)((val & 0xFFU) << 8 | (val & 0xFF00U) >> 8);
}
[LuaMethodAttributes("byteswap_32", "Byte swaps 'dword'")]
[LuaMethod("byteswap_32", "Byte swaps 'dword'")]
public static uint Byteswap32(uint val)
{
return (val & 0x000000FFU) << 24 | (val & 0x0000FF00U) << 8 |
(val & 0x00FF0000U) >> 8 | (val & 0xFF000000U) >> 24;
}
[LuaMethodAttributes("byteswap_64", "Byte swaps 'long'")]
[LuaMethod("byteswap_64", "Byte swaps 'long'")]
public static ulong Byteswap64(ulong val)
{
return (val & 0x00000000000000FFUL) << 56 | (val & 0x000000000000FF00UL) << 40 |

View File

@ -9,7 +9,7 @@ using BizHawk.Emulation.Cores.Sega.MasterSystem;
using BizHawk.Emulation.Cores.WonderSwan;
using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
using LuaInterface;
using NLua;
namespace BizHawk.Client.Common
{
@ -48,25 +48,25 @@ namespace BizHawk.Client.Common
public override string Name => "emu";
[LuaMethodAttributes("displayvsync", "Sets the display vsync property of the emulator")]
[LuaMethod("displayvsync", "Sets the display vsync property of the emulator")]
public static void DisplayVsync(bool enabled)
{
Global.Config.VSync = enabled;
}
[LuaMethodAttributes("frameadvance", "Signals to the emulator to resume emulation. Necessary for any lua script while loop or else the emulator will freeze!")]
[LuaMethod("frameadvance", "Signals to the emulator to resume emulation. Necessary for any lua script while loop or else the emulator will freeze!")]
public void FrameAdvance()
{
FrameAdvanceCallback();
}
[LuaMethodAttributes("framecount", "Returns the current frame count")]
[LuaMethod("framecount", "Returns the current frame count")]
public int FrameCount()
{
return Emulator.Frame;
}
[LuaMethodAttributes("disassemble", "Returns the disassembly object (disasm string and length int) for the given PC address. Uses System Bus domain if no domain name provided")]
[LuaMethod("disassemble", "Returns the disassembly object (disasm string and length int) for the given PC address. Uses System Bus domain if no domain name provided")]
public object Disassemble(uint pc, string name = "")
{
try
@ -95,8 +95,7 @@ namespace BizHawk.Client.Common
}
// TODO: what about 64 bit registers?
[LuaMethodAttributes(
"getregister", "returns the value of a cpu register or flag specified by name. For a complete list of possible registers or flags for a given core, use getregisters")]
[LuaMethod("getregister", "returns the value of a cpu register or flag specified by name. For a complete list of possible registers or flags for a given core, use getregisters")]
public int GetRegister(string name)
{
try
@ -118,8 +117,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes(
"getregisters", "returns the complete set of available flags and registers for a given core")]
[LuaMethod("getregisters", "returns the complete set of available flags and registers for a given core")]
public LuaTable GetRegisters()
{
var table = Lua.NewTable();
@ -144,7 +142,7 @@ namespace BizHawk.Client.Common
return table;
}
[LuaMethodAttributes("setregister", "sets the given register name to the given value")]
[LuaMethod("setregister", "sets the given register name to the given value")]
public void SetRegister(string register, int value)
{
try
@ -162,7 +160,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes("totalexecutedcycles", "gets the total number of executed cpu cycles")]
[LuaMethod("totalexecutedcycles", "gets the total number of executed cpu cycles")]
public int TotalExecutedycles()
{
try
@ -182,13 +180,13 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes("getsystemid", "Returns the ID string of the current core loaded. Note: No ROM loaded will return the string NULL")]
[LuaMethod("getsystemid", "Returns the ID string of the current core loaded. Note: No ROM loaded will return the string NULL")]
public static string GetSystemId()
{
return Global.Game.System;
}
[LuaMethodAttributes("islagged", "Returns whether or not the current frame is a lag frame")]
[LuaMethod("islagged", "Returns whether or not the current frame is a lag frame")]
public bool IsLagged()
{
if (InputPollableCore != null)
@ -200,7 +198,7 @@ namespace BizHawk.Client.Common
return false;
}
[LuaMethodAttributes("setislagged", "Sets the lag flag for the current frame. If no value is provided, it will default to true")]
[LuaMethod("setislagged", "Sets the lag flag for the current frame. If no value is provided, it will default to true")]
public void SetIsLagged(bool value = true)
{
if (InputPollableCore != null)
@ -213,7 +211,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes("lagcount", "Returns the current lag count")]
[LuaMethod("lagcount", "Returns the current lag count")]
public int LagCount()
{
if (InputPollableCore != null)
@ -225,7 +223,7 @@ namespace BizHawk.Client.Common
return 0;
}
[LuaMethodAttributes("setlagcount", "Sets the current lag count")]
[LuaMethod("setlagcount", "Sets the current lag count")]
public void SetLagCount(int count)
{
if (InputPollableCore != null)
@ -238,19 +236,19 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes("limitframerate", "sets the limit framerate property of the emulator")]
[LuaMethod("limitframerate", "sets the limit framerate property of the emulator")]
public static void LimitFramerate(bool enabled)
{
Global.Config.ClockThrottle = enabled;
}
[LuaMethodAttributes("minimizeframeskip", "Sets the autominimizeframeskip value of the emulator")]
[LuaMethod("minimizeframeskip", "Sets the autominimizeframeskip value of the emulator")]
public static void MinimizeFrameskip(bool enabled)
{
Global.Config.AutoMinimizeSkipping = enabled;
}
[LuaMethodAttributes("setrenderplanes", "Toggles the drawing of sprites and background planes. Set to false or nil to disable a pane, anything else will draw them")]
[LuaMethod("setrenderplanes", "Toggles the drawing of sprites and background planes. Set to false or nil to disable a pane, anything else will draw them")]
public void SetRenderPlanes(params bool[] luaParam)
{
if (Emulator is NES)
@ -324,13 +322,13 @@ namespace BizHawk.Client.Common
return true;
}
[LuaMethodAttributes("yield", "allows a script to run while emulation is paused and interact with the gui/main window in realtime ")]
[LuaMethod("yield", "allows a script to run while emulation is paused and interact with the gui/main window in realtime ")]
public void Yield()
{
YieldCallback();
}
[LuaMethodAttributes("getdisplaytype", "returns the display type (PAL vs NTSC) that the emulator is currently running in")]
[LuaMethod("getdisplaytype", "returns the display type (PAL vs NTSC) that the emulator is currently running in")]
public string GetDisplayType()
{
if (RegionableCore != null)
@ -341,7 +339,7 @@ namespace BizHawk.Client.Common
return "";
}
[LuaMethodAttributes("getboardname", "returns (if available) the board name of the loaded ROM")]
[LuaMethod("getboardname", "returns (if available) the board name of the loaded ROM")]
public string GetBoardName()
{
if (BoardInfo != null)

View File

@ -2,7 +2,7 @@
using System.Linq;
using System.ComponentModel;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
@ -156,8 +156,7 @@ namespace BizHawk.Client.Common
#endregion
[LuaMethodAttributes(
"onframeend", "Calls the given lua function at the end of each frame, after all emulation and drawing has completed. Note: this is the default behavior of lua scripts")]
[LuaMethod("onframeend", "Calls the given lua function at the end of each frame, after all emulation and drawing has completed. Note: this is the default behavior of lua scripts")]
public string OnFrameEnd(LuaFunction luaf, string name = null)
{
var nlf = new NamedLuaFunction(luaf, "OnFrameEnd", LogOutputCallback, CurrentThread, name);
@ -165,8 +164,7 @@ namespace BizHawk.Client.Common
return nlf.Guid.ToString();
}
[LuaMethodAttributes(
"onframestart", "Calls the given lua function at the beginning of each frame before any emulation and drawing occurs")]
[LuaMethod("onframestart", "Calls the given lua function at the beginning of each frame before any emulation and drawing occurs")]
public string OnFrameStart(LuaFunction luaf, string name = null)
{
var nlf = new NamedLuaFunction(luaf, "OnFrameStart", LogOutputCallback, CurrentThread, name);
@ -174,8 +172,7 @@ namespace BizHawk.Client.Common
return nlf.Guid.ToString();
}
[LuaMethodAttributes(
"oninputpoll", "Calls the given lua function after each time the emulator core polls for input")]
[LuaMethod("oninputpoll", "Calls the given lua function after each time the emulator core polls for input")]
public string OnInputPoll(LuaFunction luaf, string name = null)
{
var nlf = new NamedLuaFunction(luaf, "OnInputPoll", LogOutputCallback, CurrentThread, name);
@ -204,8 +201,7 @@ namespace BizHawk.Client.Common
Log($"Error: {Emulator.Attributes().CoreName} does not yet implement input polling callbacks");
}
[LuaMethodAttributes(
"onloadstate", "Fires after a state is loaded. Receives a lua function name, and registers it to the event immediately following a successful savestate event")]
[LuaMethod("onloadstate", "Fires after a state is loaded. Receives a lua function name, and registers it to the event immediately following a successful savestate event")]
public string OnLoadState(LuaFunction luaf, string name = null)
{
var nlf = new NamedLuaFunction(luaf, "OnSavestateLoad", LogOutputCallback, CurrentThread, name);
@ -213,7 +209,7 @@ namespace BizHawk.Client.Common
return nlf.Guid.ToString();
}
[LuaMethodAttributes("onmemoryexecute", "Fires after the given address is executed by the core")]
[LuaMethod("onmemoryexecute", "Fires after the given address is executed by the core")]
public string OnMemoryExecute(LuaFunction luaf, uint address, string name = null)
{
try
@ -244,8 +240,7 @@ namespace BizHawk.Client.Common
return Guid.Empty.ToString();
}
[LuaMethodAttributes(
"onmemoryread", "Fires after the given address is read by the core. If no address is given, it will attach to every memory read")]
[LuaMethod("onmemoryread", "Fires after the given address is read by the core. If no address is given, it will attach to every memory read")]
public string OnMemoryRead(LuaFunction luaf, uint? address = null, string name = null)
{
try
@ -275,8 +270,7 @@ namespace BizHawk.Client.Common
return Guid.Empty.ToString();
}
[LuaMethodAttributes(
"onmemorywrite", "Fires after the given address is written by the core. If no address is given, it will attach to every memory write")]
[LuaMethod("onmemorywrite", "Fires after the given address is written by the core. If no address is given, it will attach to every memory write")]
public string OnMemoryWrite(LuaFunction luaf, uint? address = null, string name = null)
{
try
@ -306,7 +300,7 @@ namespace BizHawk.Client.Common
return Guid.Empty.ToString();
}
[LuaMethodAttributes("onsavestate", "Fires after a state is saved")]
[LuaMethod("onsavestate", "Fires after a state is saved")]
public string OnSaveState(LuaFunction luaf, string name = null)
{
var nlf = new NamedLuaFunction(luaf, "OnSavestateSave", LogOutputCallback, CurrentThread, name);
@ -314,7 +308,7 @@ namespace BizHawk.Client.Common
return nlf.Guid.ToString();
}
[LuaMethodAttributes("onexit", "Fires after the calling script has stopped")]
[LuaMethod("onexit", "Fires after the calling script has stopped")]
public string OnExit(LuaFunction luaf, string name = null)
{
var nlf = new NamedLuaFunction(luaf, "OnExit", LogOutputCallback, CurrentThread, name);
@ -322,8 +316,7 @@ namespace BizHawk.Client.Common
return nlf.Guid.ToString();
}
[LuaMethodAttributes(
"unregisterbyid", "Removes the registered function that matches the guid. If a function is found and remove the function will return true. If unable to find a match, the function will return false.")]
[LuaMethod("unregisterbyid", "Removes the registered function that matches the guid. If a function is found and remove the function will return true. If unable to find a match, the function will return false.")]
public bool UnregisterById(string guid)
{
foreach (var nlf in _luaFunctions.Where(nlf => nlf.Guid.ToString() == guid.ToString()))
@ -335,8 +328,7 @@ namespace BizHawk.Client.Common
return false;
}
[LuaMethodAttributes(
"unregisterbyname", "Removes the first registered function that matches Name. If a function is found and remove the function will return true. If unable to find a match, the function will return false.")]
[LuaMethod("unregisterbyname", "Removes the first registered function that matches Name. If a function is found and remove the function will return true. If unable to find a match, the function will return false.")]
public bool UnregisterByName(string name)
{
foreach (var nlf in _luaFunctions.Where(nlf => nlf.Name == name))

View File

@ -1,5 +1,5 @@
using System;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Common;
@ -18,8 +18,7 @@ namespace BizHawk.Client.Common
public override string Name => "gameinfo";
[LuaMethodAttributes(
"getromname", "returns the path of the currently loaded rom, if a rom is loaded")]
[LuaMethod("getromname", "returns the path of the currently loaded rom, if a rom is loaded")]
public string GetRomName()
{
if (Global.Game != null)
@ -30,8 +29,7 @@ namespace BizHawk.Client.Common
return "";
}
[LuaMethodAttributes(
"getromhash", "returns the hash of the currently loaded rom, if a rom is loaded")]
[LuaMethod("getromhash", "returns the hash of the currently loaded rom, if a rom is loaded")]
public string GetRomHash()
{
if (Global.Game != null)
@ -42,8 +40,7 @@ namespace BizHawk.Client.Common
return "";
}
[LuaMethodAttributes(
"indatabase", "returns whether or not the currently loaded rom is in the game database")]
[LuaMethod("indatabase", "returns whether or not the currently loaded rom is in the game database")]
public bool InDatabase()
{
if (Global.Game != null)
@ -54,8 +51,7 @@ namespace BizHawk.Client.Common
return false;
}
[LuaMethodAttributes(
"getstatus", "returns the game database status of the currently loaded rom. Statuses are for example: GoodDump, BadDump, Hack, Unknown, NotInDatabase")]
[LuaMethod("getstatus", "returns the game database status of the currently loaded rom. Statuses are for example: GoodDump, BadDump, Hack, Unknown, NotInDatabase")]
public string GetStatus()
{
if (Global.Game != null)
@ -66,8 +62,7 @@ namespace BizHawk.Client.Common
return "";
}
[LuaMethodAttributes(
"isstatusbad", "returns the currently loaded rom's game database status is considered 'bad'")]
[LuaMethod("isstatusbad", "returns the currently loaded rom's game database status is considered 'bad'")]
public bool IsStatusBad()
{
if (Global.Game != null)
@ -78,15 +73,13 @@ namespace BizHawk.Client.Common
return true;
}
[LuaMethodAttributes(
"getboardtype", "returns identifying information about the 'mapper' or similar capability used for this game. empty if no such useful distinction can be drawn")]
[LuaMethod("getboardtype", "returns identifying information about the 'mapper' or similar capability used for this game. empty if no such useful distinction can be drawn")]
public string GetBoardType()
{
return BoardInfo?.BoardName ?? "";
}
[LuaMethodAttributes(
"getoptions", "returns the game options for the currently loaded rom. Options vary per platform")]
[LuaMethod("getoptions", "returns the game options for the currently loaded rom. Options vary per platform")]
public LuaTable GetOptions()
{
var options = Lua.NewTable();

View File

@ -1,7 +1,7 @@
using System;
using System.ComponentModel;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
@ -37,33 +37,25 @@ namespace BizHawk.Client.Common
Genesis?.PutSettings(settings);
}
[LuaMethodAttributes(
"getlayer_bga",
"Returns whether the bg layer A is displayed")]
[LuaMethod("getlayer_bga", "Returns whether the bg layer A is displayed")]
public bool GetLayerBgA()
{
return GetSettings().DrawBGA;
}
[LuaMethodAttributes(
"getlayer_bgb",
"Returns whether the bg layer B is displayed")]
[LuaMethod("getlayer_bgb", "Returns whether the bg layer B is displayed")]
public bool GetLayerBgB()
{
return GetSettings().DrawBGB;
}
[LuaMethodAttributes(
"getlayer_bgw",
"Returns whether the bg layer W is displayed")]
[LuaMethod("getlayer_bgw", "Returns whether the bg layer W is displayed")]
public bool GetLayerBgW()
{
return GetSettings().DrawBGW;
}
[LuaMethodAttributes(
"setlayer_bga",
"Sets whether the bg layer A is displayed")]
[LuaMethod("setlayer_bga", "Sets whether the bg layer A is displayed")]
public void SetLayerBgA(bool value)
{
var s = GetSettings();
@ -71,9 +63,7 @@ namespace BizHawk.Client.Common
PutSettings(s);
}
[LuaMethodAttributes(
"setlayer_bgb",
"Sets whether the bg layer B is displayed")]
[LuaMethod("setlayer_bgb", "Sets whether the bg layer B is displayed")]
public void SetLayerBgB(bool value)
{
var s = GetSettings();
@ -81,9 +71,7 @@ namespace BizHawk.Client.Common
PutSettings(s);
}
[LuaMethodAttributes(
"setlayer_bgw",
"Sets whether the bg layer W is displayed")]
[LuaMethod("setlayer_bgw", "Sets whether the bg layer W is displayed")]
public void SetLayerBgW(bool value)
{
var s = GetSettings();

View File

@ -1,5 +1,5 @@
using System;
using LuaInterface;
using NLua;
namespace BizHawk.Client.Common
{
@ -13,8 +13,7 @@ namespace BizHawk.Client.Common
public override string Name => "joypad";
[LuaMethodAttributes(
"get", "returns a lua table of the controller buttons pressed. If supplied, it will only return a table of buttons for the given controller")]
[LuaMethod("get", "returns a lua table of the controller buttons pressed. If supplied, it will only return a table of buttons for the given controller")]
public LuaTable Get(int? controller = null)
{
var buttons = Lua.NewTable();
@ -51,8 +50,7 @@ namespace BizHawk.Client.Common
}
// TODO: what about float controls?
[LuaMethodAttributes(
"getimmediate", "returns a lua table of any controller buttons currently pressed by the user")]
[LuaMethod("getimmediate", "returns a lua table of any controller buttons currently pressed by the user")]
public LuaTable GetImmediate()
{
var buttons = Lua.NewTable();
@ -64,8 +62,7 @@ namespace BizHawk.Client.Common
return buttons;
}
[LuaMethodAttributes(
"setfrommnemonicstr", "sets the given buttons to their provided values for the current frame, string will be interpretted the same way an entry from a movie input log would be")]
[LuaMethod("setfrommnemonicstr", "sets the given buttons to their provided values for the current frame, string will be interpretted the same way an entry from a movie input log would be")]
public void SetFromMnemonicStr(string inputLogEntry)
{
try
@ -89,8 +86,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes(
"set", "sets the given buttons to their provided values for the current frame")]
[LuaMethod("set", "sets the given buttons to their provided values for the current frame")]
public void Set(LuaTable buttons, int? controller = null)
{
try
@ -154,8 +150,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes(
"setanalog", "sets the given analog controls to their provided values for the current frame. Note that unlike set() there is only the logic of overriding with the given value.")]
[LuaMethod("setanalog", "sets the given analog controls to their provided values for the current frame. Note that unlike set() there is only the logic of overriding with the given value.")]
public void SetAnalog(LuaTable controls, object controller = null)
{
try

View File

@ -1,7 +1,7 @@
using System;
using System.ComponentModel;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
@ -37,13 +37,13 @@ namespace BizHawk.Client.Common
#region Unique Library Methods
[LuaMethodAttributes("getname", "returns the name of the domain defined as main memory for the given core")]
[LuaMethod("getname", "returns the name of the domain defined as main memory for the given core")]
public string GetName()
{
return Domain.Name;
}
[LuaMethodAttributes("getcurrentmemorydomainsize", "Returns the number of bytes of the domain defined as main memory")]
[LuaMethod("getcurrentmemorydomainsize", "Returns the number of bytes of the domain defined as main memory")]
public uint GetSize()
{
return (uint)Domain.Size;
@ -53,40 +53,37 @@ namespace BizHawk.Client.Common
#region Common Special and Legacy Methods
[LuaMethodAttributes("readbyte", "gets the value from the given address as an unsigned byte")]
[LuaMethod("readbyte", "gets the value from the given address as an unsigned byte")]
public uint ReadByte(int addr)
{
return ReadUnsignedByte(addr);
}
[LuaMethodAttributes("writebyte", "Writes the given value to the given address as an unsigned byte")]
[LuaMethod("writebyte", "Writes the given value to the given address as an unsigned byte")]
public void WriteByte(int addr, uint value)
{
WriteUnsignedByte(addr, value);
}
[LuaMethodAttributes(
"readbyterange", "Reads the address range that starts from address, and is length long. Returns the result into a table of key value pairs (where the address is the key).")]
[LuaMethod("readbyterange", "Reads the address range that starts from address, and is length long. Returns the result into a table of key value pairs (where the address is the key).")]
public LuaTable ReadByteRange(int addr, int length)
{
return base.ReadByteRange(addr, length);
}
[LuaMethodAttributes("writebyterange", "Writes the given values to the given addresses as unsigned bytes")]
[LuaMethod("writebyterange", "Writes the given values to the given addresses as unsigned bytes")]
public void WriteByteRange(LuaTable memoryblock)
{
base.WriteByteRange(memoryblock);
}
[LuaMethodAttributes(
"readfloat", "Reads the given address as a 32-bit float value from the main memory domain with th e given endian")]
[LuaMethod("readfloat", "Reads the given address as a 32-bit float value from the main memory domain with th e given endian")]
public float ReadFloat(int addr, bool bigendian)
{
return base.ReadFloat(addr, bigendian);
}
[LuaMethodAttributes(
"writefloat", "Writes the given 32-bit float value to the given address and endian")]
[LuaMethod("writefloat", "Writes the given 32-bit float value to the given address and endian")]
public void WriteFloat(int addr, double value, bool bigendian)
{
base.WriteFloat(addr, value, bigendian);
@ -96,25 +93,25 @@ namespace BizHawk.Client.Common
#region 1 Byte
[LuaMethodAttributes("read_s8", "read signed byte")]
[LuaMethod("read_s8", "read signed byte")]
public int ReadS8(int addr)
{
return (sbyte)ReadUnsignedByte(addr);
}
[LuaMethodAttributes("write_s8", "write signed byte")]
[LuaMethod("write_s8", "write signed byte")]
public void WriteS8(int addr, uint value)
{
WriteUnsignedByte(addr, value);
}
[LuaMethodAttributes("read_u8", "read unsigned byte")]
[LuaMethod("read_u8", "read unsigned byte")]
public uint ReadU8(int addr)
{
return ReadUnsignedByte(addr);
}
[LuaMethodAttributes("write_u8", "write unsigned byte")]
[LuaMethod("write_u8", "write unsigned byte")]
public void WriteU8(int addr, uint value)
{
WriteUnsignedByte(addr, value);
@ -124,49 +121,49 @@ namespace BizHawk.Client.Common
#region 2 Byte
[LuaMethodAttributes("read_s16_le", "read signed 2 byte value, little endian")]
[LuaMethod("read_s16_le", "read signed 2 byte value, little endian")]
public int ReadS16Little(int addr)
{
return ReadSignedLittleCore(addr, 2);
}
[LuaMethodAttributes("write_s16_le", "write signed 2 byte value, little endian")]
[LuaMethod("write_s16_le", "write signed 2 byte value, little endian")]
public void WriteS16Little(int addr, int value)
{
WriteSignedLittle(addr, value, 2);
}
[LuaMethodAttributes("read_s16_be", "read signed 2 byte value, big endian")]
[LuaMethod("read_s16_be", "read signed 2 byte value, big endian")]
public int ReadS16Big(int addr)
{
return ReadSignedBig(addr, 2);
}
[LuaMethodAttributes("write_s16_be", "write signed 2 byte value, big endian")]
[LuaMethod("write_s16_be", "write signed 2 byte value, big endian")]
public void WriteS16Big(int addr, int value)
{
WriteSignedBig(addr, value, 2);
}
[LuaMethodAttributes("read_u16_le", "read unsigned 2 byte value, little endian")]
[LuaMethod("read_u16_le", "read unsigned 2 byte value, little endian")]
public uint ReadU16Little(int addr)
{
return ReadSignedLittle(addr, 2);
}
[LuaMethodAttributes("write_u16_le", "write unsigned 2 byte value, little endian")]
[LuaMethod("write_u16_le", "write unsigned 2 byte value, little endian")]
public void WriteU16Little(int addr, uint value)
{
WriteUnsignedLittle(addr, value, 2);
}
[LuaMethodAttributes("read_u16_be", "read unsigned 2 byte value, big endian")]
[LuaMethod("read_u16_be", "read unsigned 2 byte value, big endian")]
public uint ReadU16Big(int addr)
{
return ReadUnsignedBig(addr, 2);
}
[LuaMethodAttributes("write_u16_be", "write unsigned 2 byte value, big endian")]
[LuaMethod("write_u16_be", "write unsigned 2 byte value, big endian")]
public void WriteU16Big(int addr, uint value)
{
WriteUnsignedBig(addr, value, 2);
@ -176,49 +173,49 @@ namespace BizHawk.Client.Common
#region 3 Byte
[LuaMethodAttributes("read_s24_le", "read signed 24 bit value, little endian")]
[LuaMethod("read_s24_le", "read signed 24 bit value, little endian")]
public int ReadS24Little(int addr)
{
return ReadSignedLittleCore(addr, 3);
}
[LuaMethodAttributes("write_s24_le", "write signed 24 bit value, little endian")]
[LuaMethod("write_s24_le", "write signed 24 bit value, little endian")]
public void WriteS24Little(int addr, int value)
{
WriteSignedLittle(addr, value, 3);
}
[LuaMethodAttributes("read_s24_be", "read signed 24 bit value, big endian")]
[LuaMethod("read_s24_be", "read signed 24 bit value, big endian")]
public int ReadS24Big(int addr)
{
return ReadSignedBig(addr, 3);
}
[LuaMethodAttributes("write_s24_be", "write signed 24 bit value, big endian")]
[LuaMethod("write_s24_be", "write signed 24 bit value, big endian")]
public void WriteS24Big(int addr, int value)
{
WriteSignedBig(addr, value, 3);
}
[LuaMethodAttributes("read_u24_le", "read unsigned 24 bit value, little endian")]
[LuaMethod("read_u24_le", "read unsigned 24 bit value, little endian")]
public uint ReadU24Little(int addr)
{
return ReadSignedLittle(addr, 3);
}
[LuaMethodAttributes("write_u24_le", "write unsigned 24 bit value, little endian")]
[LuaMethod("write_u24_le", "write unsigned 24 bit value, little endian")]
public void WriteU24Little(int addr, uint value)
{
WriteUnsignedLittle(addr, value, 3);
}
[LuaMethodAttributes("read_u24_be", "read unsigned 24 bit value, big endian")]
[LuaMethod("read_u24_be", "read unsigned 24 bit value, big endian")]
public uint ReadU24Big(int addr)
{
return ReadUnsignedBig(addr, 3);
}
[LuaMethodAttributes("write_u24_be", "write unsigned 24 bit value, big endian")]
[LuaMethod("write_u24_be", "write unsigned 24 bit value, big endian")]
public void WriteU24Big(int addr, uint value)
{
WriteUnsignedBig(addr, value, 3);
@ -228,49 +225,49 @@ namespace BizHawk.Client.Common
#region 4 Byte
[LuaMethodAttributes("read_s32_le", "read signed 4 byte value, little endian")]
[LuaMethod("read_s32_le", "read signed 4 byte value, little endian")]
public int ReadS32Little(int addr)
{
return ReadSignedLittleCore(addr, 4);
}
[LuaMethodAttributes("write_s32_le", "write signed 4 byte value, little endian")]
[LuaMethod("write_s32_le", "write signed 4 byte value, little endian")]
public void WriteS32Little(int addr, int value)
{
WriteSignedLittle(addr, value, 4);
}
[LuaMethodAttributes("read_s32_be", "read signed 4 byte value, big endian")]
[LuaMethod("read_s32_be", "read signed 4 byte value, big endian")]
public int ReadS32Big(int addr)
{
return ReadSignedBig(addr, 4);
}
[LuaMethodAttributes("write_s32_be", "write signed 4 byte value, big endian")]
[LuaMethod("write_s32_be", "write signed 4 byte value, big endian")]
public void WriteS32Big(int addr, int value)
{
WriteSignedBig(addr, value, 4);
}
[LuaMethodAttributes("read_u32_le", "read unsigned 4 byte value, little endian")]
[LuaMethod("read_u32_le", "read unsigned 4 byte value, little endian")]
public uint ReadU32Little(int addr)
{
return ReadSignedLittle(addr, 4);
}
[LuaMethodAttributes("write_u32_le", "write unsigned 4 byte value, little endian")]
[LuaMethod("write_u32_le", "write unsigned 4 byte value, little endian")]
public void WriteU32Little(int addr, uint value)
{
WriteUnsignedLittle(addr, value, 4);
}
[LuaMethodAttributes("read_u32_be", "read unsigned 4 byte value, big endian")]
[LuaMethod("read_u32_be", "read unsigned 4 byte value, big endian")]
public uint ReadU32Big(int addr)
{
return ReadUnsignedBig(addr, 4);
}
[LuaMethodAttributes("write_u32_be", "write unsigned 4 byte value, big endian")]
[LuaMethod("write_u32_be", "write unsigned 4 byte value, big endian")]
public void WriteU32Big(int addr, uint value)
{
WriteUnsignedBig(addr, value, 4);

View File

@ -1,7 +1,7 @@
using System;
using System.ComponentModel;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
@ -48,8 +48,7 @@ namespace BizHawk.Client.Common
#region Unique Library Methods
[LuaMethodAttributes(
"getmemorydomainlist", "Returns a string of the memory domains for the loaded platform core. List will be a single string delimited by line feeds")]
[LuaMethod("getmemorydomainlist", "Returns a string of the memory domains for the loaded platform core. List will be a single string delimited by line feeds")]
public LuaTable GetMemoryDomainList()
{
var table = Lua.NewTable();
@ -64,8 +63,7 @@ namespace BizHawk.Client.Common
return table;
}
[LuaMethodAttributes(
"getmemorydomainsize", "Returns the number of bytes of the specified memory domain. If no domain is specified, or the specified domain doesn't exist, returns the current domain size")]
[LuaMethod("getmemorydomainsize", "Returns the number of bytes of the specified memory domain. If no domain is specified, or the specified domain doesn't exist, returns the current domain size")]
public uint GetMemoryDomainSize(string name = "")
{
if (string.IsNullOrEmpty(name))
@ -76,22 +74,19 @@ namespace BizHawk.Client.Common
return (uint)DomainList[VerifyMemoryDomain(name)].Size;
}
[LuaMethodAttributes(
"getcurrentmemorydomain", "Returns a string name of the current memory domain selected by Lua. The default is Main memory")]
[LuaMethod("getcurrentmemorydomain", "Returns a string name of the current memory domain selected by Lua. The default is Main memory")]
public string GetCurrentMemoryDomain()
{
return Domain.Name;
}
[LuaMethodAttributes(
"getcurrentmemorydomainsize", "Returns the number of bytes of the current memory domain selected by Lua. The default is Main memory")]
[LuaMethod("getcurrentmemorydomainsize", "Returns the number of bytes of the current memory domain selected by Lua. The default is Main memory")]
public uint GetCurrentMemoryDomainSize()
{
return (uint)Domain.Size;
}
[LuaMethodAttributes(
"usememorydomain", "Attempts to set the current memory domain to the given domain. If the name does not match a valid memory domain, the function returns false, else it returns true")]
[LuaMethod("usememorydomain", "Attempts to set the current memory domain to the given domain. If the name does not match a valid memory domain, the function returns false, else it returns true")]
public bool UseMemoryDomain(string domain)
{
try
@ -117,37 +112,37 @@ namespace BizHawk.Client.Common
#region Common Special and Legacy Methods
[LuaMethodAttributes("readbyte", "gets the value from the given address as an unsigned byte")]
[LuaMethod("readbyte", "gets the value from the given address as an unsigned byte")]
public uint ReadByte(int addr, string domain = null)
{
return ReadUnsignedByte(addr, domain);
}
[LuaMethodAttributes("writebyte", "Writes the given value to the given address as an unsigned byte")]
[LuaMethod("writebyte", "Writes the given value to the given address as an unsigned byte")]
public void WriteByte(int addr, uint value, string domain = null)
{
WriteUnsignedByte(addr, value, domain);
}
[LuaMethodAttributes("readbyterange", "Reads the address range that starts from address, and is length long. Returns the result into a table of key value pairs (where the address is the key).")]
[LuaMethod("readbyterange", "Reads the address range that starts from address, and is length long. Returns the result into a table of key value pairs (where the address is the key).")]
public new LuaTable ReadByteRange(int addr, int length, string domain = null)
{
return base.ReadByteRange(addr, length, domain);
}
[LuaMethodAttributes("writebyterange", "Writes the given values to the given addresses as unsigned bytes")]
[LuaMethod("writebyterange", "Writes the given values to the given addresses as unsigned bytes")]
public new void WriteByteRange(LuaTable memoryblock, string domain = null)
{
base.WriteByteRange(memoryblock, domain);
}
[LuaMethodAttributes("readfloat", "Reads the given address as a 32-bit float value from the main memory domain with th e given endian")]
[LuaMethod("readfloat", "Reads the given address as a 32-bit float value from the main memory domain with th e given endian")]
public new float ReadFloat(int addr, bool bigendian, string domain = null)
{
return base.ReadFloat(addr, bigendian, domain);
}
[LuaMethodAttributes("writefloat", "Writes the given 32-bit float value to the given address and endian")]
[LuaMethod("writefloat", "Writes the given 32-bit float value to the given address and endian")]
public new void WriteFloat(int addr, double value, bool bigendian, string domain = null)
{
base.WriteFloat(addr, value, bigendian, domain);
@ -157,25 +152,25 @@ namespace BizHawk.Client.Common
#region 1 Byte
[LuaMethodAttributes("read_s8", "read signed byte")]
[LuaMethod("read_s8", "read signed byte")]
public int ReadS8(int addr, string domain = null)
{
return (sbyte)ReadUnsignedByte(addr, domain);
}
[LuaMethodAttributes("write_s8", "write signed byte")]
[LuaMethod("write_s8", "write signed byte")]
public void WriteS8(int addr, uint value, string domain = null)
{
WriteUnsignedByte(addr, value, domain);
}
[LuaMethodAttributes("read_u8", "read unsigned byte")]
[LuaMethod("read_u8", "read unsigned byte")]
public uint ReadU8(int addr, string domain = null)
{
return ReadUnsignedByte(addr, domain);
}
[LuaMethodAttributes("write_u8", "write unsigned byte")]
[LuaMethod("write_u8", "write unsigned byte")]
public void WriteU8(int addr, uint value, string domain = null)
{
WriteUnsignedByte(addr, value, domain);
@ -185,49 +180,49 @@ namespace BizHawk.Client.Common
#region 2 Byte
[LuaMethodAttributes("read_s16_le", "read signed 2 byte value, little endian")]
[LuaMethod("read_s16_le", "read signed 2 byte value, little endian")]
public int ReadS16Little(int addr, string domain = null)
{
return ReadSignedLittleCore(addr, 2, domain);
}
[LuaMethodAttributes("write_s16_le", "write signed 2 byte value, little endian")]
[LuaMethod("write_s16_le", "write signed 2 byte value, little endian")]
public void WriteS16Little(int addr, int value, string domain = null)
{
WriteSignedLittle(addr, value, 2, domain);
}
[LuaMethodAttributes("read_s16_be", "read signed 2 byte value, big endian")]
[LuaMethod("read_s16_be", "read signed 2 byte value, big endian")]
public int ReadS16Big(int addr, string domain = null)
{
return ReadSignedBig(addr, 2, domain);
}
[LuaMethodAttributes("write_s16_be", "write signed 2 byte value, big endian")]
[LuaMethod("write_s16_be", "write signed 2 byte value, big endian")]
public void WriteS16Big(int addr, int value, string domain = null)
{
WriteSignedBig(addr, value, 2, domain);
}
[LuaMethodAttributes("read_u16_le", "read unsigned 2 byte value, little endian")]
[LuaMethod("read_u16_le", "read unsigned 2 byte value, little endian")]
public uint ReadU16Little(int addr, string domain = null)
{
return ReadUnsignedLittle(addr, 2, domain);
}
[LuaMethodAttributes("write_u16_le", "write unsigned 2 byte value, little endian")]
[LuaMethod("write_u16_le", "write unsigned 2 byte value, little endian")]
public void WriteU16Little(int addr, uint value, string domain = null)
{
WriteUnsignedLittle(addr, value, 2, domain);
}
[LuaMethodAttributes("read_u16_be", "read unsigned 2 byte value, big endian")]
[LuaMethod("read_u16_be", "read unsigned 2 byte value, big endian")]
public uint ReadU16Big(int addr, string domain = null)
{
return ReadUnsignedBig(addr, 2, domain);
}
[LuaMethodAttributes("write_u16_be", "write unsigned 2 byte value, big endian")]
[LuaMethod("write_u16_be", "write unsigned 2 byte value, big endian")]
public void WriteU16Big(int addr, uint value, string domain = null)
{
WriteUnsignedBig(addr, value, 2, domain);
@ -237,49 +232,49 @@ namespace BizHawk.Client.Common
#region 3 Byte
[LuaMethodAttributes("read_s24_le", "read signed 24 bit value, little endian")]
[LuaMethod("read_s24_le", "read signed 24 bit value, little endian")]
public int ReadS24Little(int addr, string domain = null)
{
return ReadSignedLittleCore(addr, 3, domain);
}
[LuaMethodAttributes("write_s24_le", "write signed 24 bit value, little endian")]
[LuaMethod("write_s24_le", "write signed 24 bit value, little endian")]
public void WriteS24Little(int addr, int value, string domain = null)
{
WriteSignedLittle(addr, value, 3, domain);
}
[LuaMethodAttributes("read_s24_be", "read signed 24 bit value, big endian")]
[LuaMethod("read_s24_be", "read signed 24 bit value, big endian")]
public int ReadS24Big(int addr, string domain = null)
{
return ReadSignedBig(addr, 3, domain);
}
[LuaMethodAttributes("write_s24_be", "write signed 24 bit value, big endian")]
[LuaMethod("write_s24_be", "write signed 24 bit value, big endian")]
public void WriteS24Big(int addr, int value, string domain = null)
{
WriteSignedBig(addr, value, 3, domain);
}
[LuaMethodAttributes("read_u24_le", "read unsigned 24 bit value, little endian")]
[LuaMethod("read_u24_le", "read unsigned 24 bit value, little endian")]
public uint ReadU24Little(int addr, string domain = null)
{
return ReadUnsignedLittle(addr, 3, domain);
}
[LuaMethodAttributes("write_u24_le", "write unsigned 24 bit value, little endian")]
[LuaMethod("write_u24_le", "write unsigned 24 bit value, little endian")]
public void WriteU24Little(int addr, uint value, string domain = null)
{
WriteUnsignedLittle(addr, value, 3, domain);
}
[LuaMethodAttributes("read_u24_be", "read unsigned 24 bit value, big endian")]
[LuaMethod("read_u24_be", "read unsigned 24 bit value, big endian")]
public uint ReadU24Big(int addr, string domain = null)
{
return ReadUnsignedBig(addr, 3, domain);
}
[LuaMethodAttributes("write_u24_be", "write unsigned 24 bit value, big endian")]
[LuaMethod("write_u24_be", "write unsigned 24 bit value, big endian")]
public void WriteU24Big(int addr, uint value, string domain = null)
{
WriteUnsignedBig(addr, value, 3, domain);
@ -289,49 +284,49 @@ namespace BizHawk.Client.Common
#region 4 Byte
[LuaMethodAttributes("read_s32_le", "read signed 4 byte value, little endian")]
[LuaMethod("read_s32_le", "read signed 4 byte value, little endian")]
public int ReadS32Little(int addr, string domain = null)
{
return ReadSignedLittleCore(addr, 4, domain);
}
[LuaMethodAttributes("write_s32_le", "write signed 4 byte value, little endian")]
[LuaMethod("write_s32_le", "write signed 4 byte value, little endian")]
public void WriteS32Little(int addr, int value, string domain = null)
{
WriteSignedLittle(addr, value, 4, domain);
}
[LuaMethodAttributes("read_s32_be", "read signed 4 byte value, big endian")]
[LuaMethod("read_s32_be", "read signed 4 byte value, big endian")]
public int ReadS32Big(int addr, string domain = null)
{
return ReadSignedBig(addr, 4, domain);
}
[LuaMethodAttributes("write_s32_be", "write signed 4 byte value, big endian")]
[LuaMethod("write_s32_be", "write signed 4 byte value, big endian")]
public void WriteS32Big(int addr, int value, string domain = null)
{
WriteSignedBig(addr, value, 4, domain);
}
[LuaMethodAttributes("read_u32_le", "read unsigned 4 byte value, little endian")]
[LuaMethod("read_u32_le", "read unsigned 4 byte value, little endian")]
public uint ReadU32Little(int addr, string domain = null)
{
return ReadUnsignedLittle(addr, 4, domain);
}
[LuaMethodAttributes("write_u32_le", "write unsigned 4 byte value, little endian")]
[LuaMethod("write_u32_le", "write unsigned 4 byte value, little endian")]
public void WriteU32Little(int addr, uint value, string domain = null)
{
WriteUnsignedLittle(addr, value, 4, domain);
}
[LuaMethodAttributes("read_u32_be", "read unsigned 4 byte value, big endian")]
[LuaMethod("read_u32_be", "read unsigned 4 byte value, big endian")]
public uint ReadU32Big(int addr, string domain = null)
{
return ReadUnsignedBig(addr, 4, domain);
}
[LuaMethodAttributes("write_u32_be", "write unsigned 4 byte value, big endian")]
[LuaMethod("write_u32_be", "write unsigned 4 byte value, big endian")]
public void WriteU32Big(int addr, uint value, string domain = null)
{
WriteUnsignedBig(addr, value, 4, domain);

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.IO;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Common;
@ -23,8 +23,7 @@ namespace BizHawk.Client.Common
private readonly Dictionary<Guid, byte[]> _memorySavestates = new Dictionary<Guid, byte[]>();
[LuaMethodAttributes(
"savecorestate", "creates a core savestate and stores it in memory. Note: a core savestate is only the raw data from the core, and not extras such as movie input logs, or framebuffers. Returns a unique identifer for the savestate")]
[LuaMethod("savecorestate", "creates a core savestate and stores it in memory. Note: a core savestate is only the raw data from the core, and not extras such as movie input logs, or framebuffers. Returns a unique identifer for the savestate")]
public string SaveCoreStateToMemory()
{
var guid = Guid.NewGuid();
@ -35,7 +34,7 @@ namespace BizHawk.Client.Common
return guid.ToString();
}
[LuaMethodAttributes("loadcorestate", "loads an in memory state with the given identifier")]
[LuaMethod("loadcorestate", "loads an in memory state with the given identifier")]
public void LoadCoreStateFromMemory(string identifier)
{
var guid = new Guid(identifier);
@ -56,14 +55,14 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes("removestate", "removes the savestate with the given identifier from memory")]
[LuaMethod("removestate", "removes the savestate with the given identifier from memory")]
public void DeleteState(string identifier)
{
var guid = new Guid(identifier);
_memorySavestates.Remove(guid);
}
[LuaMethodAttributes("clearstatesfrommemory", "clears all savestates stored in memory")]
[LuaMethod("clearstatesfrommemory", "clears all savestates stored in memory")]
public void ClearInMemoryStates()
{
_memorySavestates.Clear();

View File

@ -1,6 +1,6 @@
using System;
using System.IO;
using LuaInterface;
using NLua;
namespace BizHawk.Client.Common
{
@ -14,33 +14,25 @@ namespace BizHawk.Client.Common
public override string Name => "movie";
[LuaMethodAttributes(
"startsfromsavestate",
"Returns whether or not the movie is a savestate-anchored movie")]
[LuaMethod("startsfromsavestate", "Returns whether or not the movie is a savestate-anchored movie")]
public bool StartsFromSavestate()
{
return Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie.StartsFromSavestate;
}
[LuaMethodAttributes(
"startsfromsaveram",
"Returns whether or not the movie is a saveram-anchored movie")]
[LuaMethod("startsfromsaveram", "Returns whether or not the movie is a saveram-anchored movie")]
public bool StartsFromSaveram()
{
return Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie.StartsFromSaveRam;
}
[LuaMethodAttributes(
"filename",
"Returns the file name including path of the currently loaded movie")]
[LuaMethod("filename", "Returns the file name including path of the currently loaded movie")]
public static string Filename()
{
return Global.MovieSession.Movie.Filename;
}
[LuaMethodAttributes(
"getinput",
"Returns a table of buttons pressed on a given frame of the loaded movie")]
[LuaMethod("getinput", "Returns a table of buttons pressed on a given frame of the loaded movie")]
public LuaTable GetInput(int frame)
{
if (!Global.MovieSession.Movie.IsActive)
@ -71,9 +63,7 @@ namespace BizHawk.Client.Common
return input;
}
[LuaMethodAttributes(
"getinputasmnemonic",
"Returns the input of a given frame of the loaded movie in a raw inputlog string")]
[LuaMethod("getinputasmnemonic", "Returns the input of a given frame of the loaded movie in a raw inputlog string")]
public string GetInputAsMnemonic(int frame)
{
if (Global.MovieSession.Movie.IsActive && frame < Global.MovieSession.Movie.InputLogLength)
@ -86,49 +76,37 @@ namespace BizHawk.Client.Common
return "";
}
[LuaMethodAttributes(
"getreadonly",
"Returns true if the movie is in read-only mode, false if in read+write")]
[LuaMethod("getreadonly", "Returns true if the movie is in read-only mode, false if in read+write")]
public static bool GetReadOnly()
{
return Global.MovieSession.ReadOnly;
}
[LuaMethodAttributes(
"getrerecordcount",
"Gets the rerecord count of the current movie.")]
[LuaMethod("getrerecordcount", "Gets the rerecord count of the current movie.")]
public static ulong GetRerecordCount()
{
return Global.MovieSession.Movie.Rerecords;
}
[LuaMethodAttributes(
"getrerecordcounting",
"Returns whether or not the current movie is incrementing rerecords on loadstate")]
[LuaMethod("getrerecordcounting", "Returns whether or not the current movie is incrementing rerecords on loadstate")]
public static bool GetRerecordCounting()
{
return Global.MovieSession.Movie.IsCountingRerecords;
}
[LuaMethodAttributes(
"isloaded",
"Returns true if a movie is loaded in memory (play, record, or finished modes), false if not (inactive mode)")]
[LuaMethod("isloaded", "Returns true if a movie is loaded in memory (play, record, or finished modes), false if not (inactive mode)")]
public static bool IsLoaded()
{
return Global.MovieSession.Movie.IsActive;
}
[LuaMethodAttributes(
"length",
"Returns the total number of frames of the loaded movie")]
[LuaMethod("length", "Returns the total number of frames of the loaded movie")]
public static double Length()
{
return Global.MovieSession.Movie.FrameCount;
}
[LuaMethodAttributes(
"mode",
"Returns the mode of the current movie. Possible modes: \"PLAY\", \"RECORD\", \"FINISHED\", \"INACTIVE\"")]
[LuaMethod("mode", "Returns the mode of the current movie. Possible modes: \"PLAY\", \"RECORD\", \"FINISHED\", \"INACTIVE\"")]
public static string Mode()
{
if (Global.MovieSession.Movie.IsFinished)
@ -149,17 +127,7 @@ namespace BizHawk.Client.Common
return "INACTIVE";
}
[LuaMethodAttributes(
"rerecordcount",
"[Deprecated] Alias of getrerecordcount")]
public static string RerecordCount()
{
return GetRerecordCount().ToString();
}
[LuaMethodAttributes(
"save",
"Saves the current movie to the disc. If the filename is provided (no extension or path needed), the movie is saved under the specified name to the current movie directory. The filename may contain a subdirectory, it will be created if it doesn't exist. Existing files won't get overwritten.")]
[LuaMethod("save", "Saves the current movie to the disc. If the filename is provided (no extension or path needed), the movie is saved under the specified name to the current movie directory. The filename may contain a subdirectory, it will be created if it doesn't exist. Existing files won't get overwritten.")]
public void Save(string filename = "")
{
if (!Global.MovieSession.Movie.IsActive)
@ -183,17 +151,13 @@ namespace BizHawk.Client.Common
Global.MovieSession.Movie.Save();
}
[LuaMethodAttributes(
"setreadonly",
"Sets the read-only state to the given value. true for read only, false for read+write")]
[LuaMethod("setreadonly", "Sets the read-only state to the given value. true for read only, false for read+write")]
public static void SetReadOnly(bool readOnly)
{
Global.MovieSession.ReadOnly = readOnly;
}
[LuaMethodAttributes(
"setrerecordcount",
"Sets the rerecord count of the current movie.")]
[LuaMethod("setrerecordcount", "Sets the rerecord count of the current movie.")]
public static void SetRerecordCount(double count)
{
// Lua numbers are always double, integer precision holds up
@ -208,25 +172,19 @@ namespace BizHawk.Client.Common
Global.MovieSession.Movie.Rerecords = (ulong)count;
}
[LuaMethodAttributes(
"setrerecordcounting",
"Sets whether or not the current movie will increment the rerecord counter on loadstate")]
[LuaMethod("setrerecordcounting", "Sets whether or not the current movie will increment the rerecord counter on loadstate")]
public static void SetRerecordCounting(bool counting)
{
Global.MovieSession.Movie.IsCountingRerecords = counting;
}
[LuaMethodAttributes(
"stop",
"Stops the current movie")]
[LuaMethod("stop", "Stops the current movie")]
public static void Stop()
{
Global.MovieSession.Movie.Stop();
}
[LuaMethodAttributes(
"getfps",
"If a movie is loaded, gets the frames per second used by the movie to determine the movie length time")]
[LuaMethod("getfps", "If a movie is loaded, gets the frames per second used by the movie to determine the movie length time")]
public static double GetFps()
{
if (Global.MovieSession.Movie.IsActive)
@ -242,9 +200,7 @@ namespace BizHawk.Client.Common
return 0.0;
}
[LuaMethodAttributes(
"getheader",
"If a movie is active, will return the movie header as a lua table")]
[LuaMethod("getheader", "If a movie is active, will return the movie header as a lua table")]
public LuaTable GetHeader()
{
var luaTable = Lua.NewTable();
@ -259,9 +215,7 @@ namespace BizHawk.Client.Common
return luaTable;
}
[LuaMethodAttributes(
"getcomments",
"If a movie is active, will return the movie comments as a lua table")]
[LuaMethod("getcomments", "If a movie is active, will return the movie comments as a lua table")]
public LuaTable GetComments()
{
var luaTable = Lua.NewTable();
@ -276,9 +230,7 @@ namespace BizHawk.Client.Common
return luaTable;
}
[LuaMethodAttributes(
"getsubtitles",
"If a movie is active, will return the movie subtitles as a lua table")]
[LuaMethod("getsubtitles", "If a movie is active, will return the movie subtitles as a lua table")]
public LuaTable GetSubtitles()
{
var luaTable = Lua.NewTable();

View File

@ -2,7 +2,7 @@
using System.ComponentModel;
using System.Linq;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Nintendo.NES;
@ -38,8 +38,7 @@ namespace BizHawk.Client.Common
public override string Name => "nes";
[LuaMethodAttributes(
"addgamegenie", "Adds the specified game genie code. If an NES game is not currently loaded or the code is not a valid game genie code, this will have no effect")]
[LuaMethod("addgamegenie", "Adds the specified game genie code. If an NES game is not currently loaded or the code is not a valid game genie code, this will have no effect")]
public void AddGameGenie(string code)
{
if (NESAvailable && HasMemoryDOmains)
@ -60,8 +59,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes(
"getallowmorethaneightsprites", "Gets the NES setting 'Allow more than 8 sprites per scanline' value")]
[LuaMethod("getallowmorethaneightsprites", "Gets the NES setting 'Allow more than 8 sprites per scanline' value")]
public bool GetAllowMoreThanEightSprites()
{
if (Quicknes != null)
@ -77,8 +75,7 @@ namespace BizHawk.Client.Common
throw new InvalidOperationException();
}
[LuaMethodAttributes(
"getbottomscanline", "Gets the current value for the bottom scanline value")]
[LuaMethod("getbottomscanline", "Gets the current value for the bottom scanline value")]
public int GetBottomScanline(bool pal = false)
{
if (Quicknes != null)
@ -96,8 +93,7 @@ namespace BizHawk.Client.Common
throw new InvalidOperationException();
}
[LuaMethodAttributes(
"getclipleftandright", "Gets the current value for the Clip Left and Right sides option")]
[LuaMethod("getclipleftandright", "Gets the current value for the Clip Left and Right sides option")]
public bool GetClipLeftAndRight()
{
if (Quicknes != null)
@ -113,8 +109,7 @@ namespace BizHawk.Client.Common
throw new InvalidOperationException();
}
[LuaMethodAttributes(
"getdispbackground", "Indicates whether or not the bg layer is being displayed")]
[LuaMethod("getdispbackground", "Indicates whether or not the bg layer is being displayed")]
public bool GetDisplayBackground()
{
if (Quicknes != null)
@ -130,8 +125,7 @@ namespace BizHawk.Client.Common
throw new InvalidOperationException();
}
[LuaMethodAttributes(
"getdispsprites", "Indicates whether or not sprites are being displayed")]
[LuaMethod("getdispsprites", "Indicates whether or not sprites are being displayed")]
public bool GetDisplaySprites()
{
if (Quicknes != null)
@ -147,8 +141,7 @@ namespace BizHawk.Client.Common
throw new InvalidOperationException();
}
[LuaMethodAttributes(
"gettopscanline", "Gets the current value for the top scanline value")]
[LuaMethod("gettopscanline", "Gets the current value for the top scanline value")]
public int GetTopScanline(bool pal = false)
{
if (Quicknes != null)
@ -166,8 +159,7 @@ namespace BizHawk.Client.Common
throw new InvalidOperationException();
}
[LuaMethodAttributes(
"removegamegenie", "Removes the specified game genie code. If an NES game is not currently loaded or the code is not a valid game genie code, this will have no effect")]
[LuaMethod("removegamegenie", "Removes the specified game genie code. If an NES game is not currently loaded or the code is not a valid game genie code, this will have no effect")]
public void RemoveGameGenie(string code)
{
if (NESAvailable)
@ -178,8 +170,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes(
"setallowmorethaneightsprites", "Sets the NES setting 'Allow more than 8 sprites per scanline'")]
[LuaMethod("setallowmorethaneightsprites", "Sets the NES setting 'Allow more than 8 sprites per scanline'")]
public void SetAllowMoreThanEightSprites(bool allow)
{
if (Neshawk != null)
@ -196,8 +187,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes(
"setclipleftandright", "Sets the Clip Left and Right sides option")]
[LuaMethod("setclipleftandright", "Sets the Clip Left and Right sides option")]
public void SetClipLeftAndRight(bool leftandright)
{
if (Neshawk != null)
@ -214,8 +204,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes(
"setdispbackground", "Sets whether or not the background layer will be displayed")]
[LuaMethod("setdispbackground", "Sets whether or not the background layer will be displayed")]
public void SetDisplayBackground(bool show)
{
if (Neshawk != null)
@ -226,8 +215,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes(
"setdispsprites", "Sets whether or not sprites will be displayed")]
[LuaMethod("setdispsprites", "Sets whether or not sprites will be displayed")]
public void SetDisplaySprites(bool show)
{
if (Neshawk != null)
@ -244,8 +232,7 @@ namespace BizHawk.Client.Common
}
}
[LuaMethodAttributes(
"setscanlines", "sets the top and bottom scanlines to be drawn (same values as in the graphics options dialog). Top must be in the range of 0 to 127, bottom must be between 128 and 239. Not supported in the Quick Nes core")]
[LuaMethod("setscanlines", "sets the top and bottom scanlines to be drawn (same values as in the graphics options dialog). Top must be in the range of 0 to 127, bottom must be between 128 and 239. Not supported in the Quick Nes core")]
public void SetScanlines(int top, int bottom, bool pal = false)
{
if (Neshawk != null)

View File

@ -1,7 +1,7 @@
using System;
using System.ComponentModel;
using BizHawk.Emulation.Common;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Cores.Nintendo.SNES;
namespace BizHawk.Client.Common
@ -35,55 +35,55 @@ namespace BizHawk.Client.Common
Snes?.PutSettings(settings);
}
[LuaMethodAttributes("getlayer_bg_1", "Returns whether the bg 1 layer is displayed")]
[LuaMethod("getlayer_bg_1", "Returns whether the bg 1 layer is displayed")]
public bool GetLayerBg1()
{
return GetSettings().ShowBG1_1;
}
[LuaMethodAttributes("getlayer_bg_2", "Returns whether the bg 2 layer is displayed")]
[LuaMethod("getlayer_bg_2", "Returns whether the bg 2 layer is displayed")]
public bool GetLayerBg2()
{
return GetSettings().ShowBG2_1;
}
[LuaMethodAttributes("getlayer_bg_3", "Returns whether the bg 3 layer is displayed")]
[LuaMethod("getlayer_bg_3", "Returns whether the bg 3 layer is displayed")]
public bool GetLayerBg3()
{
return GetSettings().ShowBG3_1;
}
[LuaMethodAttributes("getlayer_bg_4", "Returns whether the bg 4 layer is displayed")]
[LuaMethod("getlayer_bg_4", "Returns whether the bg 4 layer is displayed")]
public bool GetLayerBg4()
{
return GetSettings().ShowBG4_1;
}
[LuaMethodAttributes("getlayer_obj_1", "Returns whether the obj 1 layer is displayed")]
[LuaMethod("getlayer_obj_1", "Returns whether the obj 1 layer is displayed")]
public bool GetLayerObj1()
{
return GetSettings().ShowOBJ_0;
}
[LuaMethodAttributes("getlayer_obj_2", "Returns whether the obj 2 layer is displayed")]
[LuaMethod("getlayer_obj_2", "Returns whether the obj 2 layer is displayed")]
public bool GetLayerObj2()
{
return GetSettings().ShowOBJ_1;
}
[LuaMethodAttributes("getlayer_obj_3", "Returns whether the obj 3 layer is displayed")]
[LuaMethod("getlayer_obj_3", "Returns whether the obj 3 layer is displayed")]
public bool GetLayerObj3()
{
return GetSettings().ShowOBJ_2;
}
[LuaMethodAttributes("getlayer_obj_4", "Returns whether the obj 4 layer is displayed")]
[LuaMethod("getlayer_obj_4", "Returns whether the obj 4 layer is displayed")]
public bool GetLayerObj4()
{
return GetSettings().ShowOBJ_3;
}
[LuaMethodAttributes("setlayer_bg_1", "Sets whether the bg 1 layer is displayed")]
[LuaMethod("setlayer_bg_1", "Sets whether the bg 1 layer is displayed")]
public void SetLayerBg1(bool value)
{
var s = GetSettings();
@ -91,7 +91,7 @@ namespace BizHawk.Client.Common
PutSettings(s);
}
[LuaMethodAttributes("setlayer_bg_2", "Sets whether the bg 2 layer is displayed")]
[LuaMethod("setlayer_bg_2", "Sets whether the bg 2 layer is displayed")]
public void SetLayerBg2(bool value)
{
var s = GetSettings();
@ -99,7 +99,7 @@ namespace BizHawk.Client.Common
PutSettings(s);
}
[LuaMethodAttributes("setlayer_bg_3", "Sets whether the bg 3 layer is displayed")]
[LuaMethod("setlayer_bg_3", "Sets whether the bg 3 layer is displayed")]
public void SetLayerBg3(bool value)
{
var s = GetSettings();
@ -107,7 +107,7 @@ namespace BizHawk.Client.Common
PutSettings(s);
}
[LuaMethodAttributes("setlayer_bg_4", "Sets whether the bg 4 layer is displayed")]
[LuaMethod("setlayer_bg_4", "Sets whether the bg 4 layer is displayed")]
public void SetLayerBg4(bool value)
{
var s = GetSettings();
@ -115,7 +115,7 @@ namespace BizHawk.Client.Common
PutSettings(s);
}
[LuaMethodAttributes("setlayer_obj_1", "Sets whether the obj 1 layer is displayed")]
[LuaMethod("setlayer_obj_1", "Sets whether the obj 1 layer is displayed")]
public void SetLayerObj1(bool value)
{
var s = GetSettings();
@ -123,7 +123,7 @@ namespace BizHawk.Client.Common
PutSettings(s);
}
[LuaMethodAttributes("setlayer_obj_2", "Sets whether the obj 2 layer is displayed")]
[LuaMethod("setlayer_obj_2", "Sets whether the obj 2 layer is displayed")]
public void SetLayerObj2(bool value)
{
var s = GetSettings();
@ -131,7 +131,7 @@ namespace BizHawk.Client.Common
PutSettings(s);
}
[LuaMethodAttributes("setlayer_obj_3", "Sets whether the obj 3 layer is displayed")]
[LuaMethod("setlayer_obj_3", "Sets whether the obj 3 layer is displayed")]
public void SetLayerObj3(bool value)
{
var s = GetSettings();
@ -139,7 +139,7 @@ namespace BizHawk.Client.Common
PutSettings(s);
}
[LuaMethodAttributes("setlayer_obj_4", "Sets whether the obj 4 layer is displayed")]
[LuaMethod("setlayer_obj_4", "Sets whether the obj 4 layer is displayed")]
public void SetLayerObj4(bool value)
{
var s = GetSettings();

View File

@ -0,0 +1,145 @@
using System;
using System.Collections;
using System.ComponentModel;
using System.Data.SQLite;
using NLua;
using System.Collections.Generic;
namespace BizHawk.Client.Common
{
[Description("A library for performing SQLite operations.")]
public sealed class SQLLuaLibrary : LuaLibraryBase
{
public SQLLuaLibrary(Lua lua)
: base(lua) { }
public SQLLuaLibrary(Lua lua, Action<string> logOutputCallback)
: base(lua, logOutputCallback) { }
public override string Name => "SQL";
SQLiteConnection m_dbConnection;
string connectionString;
[LuaMethod("createdatabase","Creates a SQLite Database. Name should end with .db")]
public string CreateDatabase(string name)
{
try
{
SQLiteConnection.CreateFile(name);
return "Database Created Successfully";
}
catch (SQLiteException sqlEX)
{
return sqlEX.Message;
}
}
[LuaMethod("opendatabase", "Opens a SQLite database. Name should end with .db")]
public string OpenDatabase(string name)
{
try
{
SQLiteConnectionStringBuilder connBuilder = new SQLiteConnectionStringBuilder();
connBuilder.DataSource = name;
connBuilder.Version = 3; //SQLite version
connBuilder.JournalMode = SQLiteJournalModeEnum.Wal; //Allows for reads and writes to happen at the same time
connBuilder.DefaultIsolationLevel = System.Data.IsolationLevel.ReadCommitted; //This only helps make the database lock left. May be pointless now
connBuilder.SyncMode = SynchronizationModes.Off; //This shortens the delay for do synchronous calls.
m_dbConnection = new SQLiteConnection(connBuilder.ToString());
connectionString = connBuilder.ToString();
m_dbConnection.Open();
m_dbConnection.Close();
return "Database Opened Successfully";
}
catch(SQLiteException sqlEX)
{
return sqlEX.Message;
}
}
[LuaMethod("writecommand", "Runs a SQLite write command which includes CREATE,INSERT, UPDATE. " +
"Ex: create TABLE rewards (ID integer PRIMARY KEY, action VARCHAR(20)) ")]
public string WriteCommand(string query="")
{
if (query == "")
{
return "query is empty";
}
try
{
m_dbConnection.Open();
string sql = query;
SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
command.ExecuteNonQuery();
m_dbConnection.Close();
return "Command ran successfully";
}
catch (NullReferenceException nullEX)
{
return "Database not open.";
}
catch(SQLiteException sqlEX)
{
m_dbConnection.Close();
return sqlEX.Message;
}
}
[LuaMethod("readcommand", "Run a SQLite read command which includes Select. Returns all rows into a LuaTable." +
"Ex: select * from rewards")]
public dynamic ReadCommand(string query="")
{
if (query=="")
{
return "query is empty";
}
try
{
var table = Lua.NewTable();
m_dbConnection.Open();
string sql = "PRAGMA read_uncommitted =1;"+query;
SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
SQLiteDataReader reader = command.ExecuteReader();
bool rows=reader.HasRows;
long rowCount = 0;
var columns = new List<string>();
for (int i = 0; i < reader.FieldCount; ++i) //Add all column names into list
{
columns.Add(reader.GetName(i));
}
while (reader.Read())
{
for (int i = 0; i < reader.FieldCount; ++i)
{
table[columns[i]+" "+rowCount.ToString()] = reader.GetValue(i);
}
rowCount += 1;
}
reader.Close();
m_dbConnection.Close();
if (rows==false)
{
return "No rows found";
}
return table;
}
catch (NullReferenceException)
{
return "Database not opened.";
}
catch (SQLiteException sqlEX)
{
m_dbConnection.Close();
return sqlEX.Message;
}
}
}
}

View File

@ -2,7 +2,7 @@
using System.ComponentModel;
using System.Linq;
using LuaInterface;
using NLua;
namespace BizHawk.Client.Common
{
@ -17,8 +17,7 @@ namespace BizHawk.Client.Common
public StringLuaLibrary(Lua lua, Action<string> logOutputCallback)
: base(lua, logOutputCallback) { }
[LuaMethodAttributes(
"hex", "Converts the number to a string representation of the hexadecimal value of the given number")]
[LuaMethod("hex", "Converts the number to a string representation of the hexadecimal value of the given number")]
public static string Hex(long num)
{
var hex = $"{num:X}";
@ -30,8 +29,7 @@ namespace BizHawk.Client.Common
return hex;
}
[LuaMethodAttributes(
"binary", "Converts the number to a string representation of the binary value of the given number")]
[LuaMethod("binary", "Converts the number to a string representation of the binary value of the given number")]
public static string Binary(long num)
{
var binary = Convert.ToString(num, 2);
@ -39,8 +37,7 @@ namespace BizHawk.Client.Common
return binary;
}
[LuaMethodAttributes(
"octal", "Converts the number to a string representation of the octal value of the given number")]
[LuaMethod("octal", "Converts the number to a string representation of the octal value of the given number")]
public static string Octal(long num)
{
var octal = Convert.ToString(num, 8);
@ -52,8 +49,7 @@ namespace BizHawk.Client.Common
return octal;
}
[LuaMethodAttributes(
"trim", "returns a string that trims whitespace on the left and right ends of the string")]
[LuaMethod("trim", "returns a string that trims whitespace on the left and right ends of the string")]
public static string Trim(string str)
{
if (string.IsNullOrEmpty(str))
@ -64,8 +60,7 @@ namespace BizHawk.Client.Common
return str.Trim();
}
[LuaMethodAttributes(
"replace", "Returns a string that replaces all occurances of str2 in str1 with the value of replace")]
[LuaMethod("replace", "Returns a string that replaces all occurances of str2 in str1 with the value of replace")]
public static string Replace(string str, string str2, string replace)
{
if (string.IsNullOrEmpty(str))
@ -76,7 +71,7 @@ namespace BizHawk.Client.Common
return str.Replace(str2, replace);
}
[LuaMethodAttributes("toupper", "Returns an uppercase version of the given string")]
[LuaMethod("toupper", "Returns an uppercase version of the given string")]
public static string ToUpper(string str)
{
if (string.IsNullOrEmpty(str))
@ -87,7 +82,7 @@ namespace BizHawk.Client.Common
return str.ToUpper();
}
[LuaMethodAttributes("tolower", "Returns an lowercase version of the given string")]
[LuaMethod("tolower", "Returns an lowercase version of the given string")]
public static string ToLower(string str)
{
if (string.IsNullOrEmpty(str))
@ -98,8 +93,7 @@ namespace BizHawk.Client.Common
return str.ToLower();
}
[LuaMethodAttributes(
"substring", "Returns a string that represents a substring of str starting at position for the specified length")]
[LuaMethod("substring", "Returns a string that represents a substring of str starting at position for the specified length")]
public static string SubString(string str, int position, int length)
{
if (string.IsNullOrEmpty(str))
@ -110,8 +104,7 @@ namespace BizHawk.Client.Common
return str.Substring(position, length);
}
[LuaMethodAttributes(
"remove", "Returns a string that represents str with the given position and count removed")]
[LuaMethod("remove", "Returns a string that represents str with the given position and count removed")]
public static string Remove(string str, int position, int count)
{
if (string.IsNullOrEmpty(str))
@ -122,7 +115,7 @@ namespace BizHawk.Client.Common
return str.Remove(position, count);
}
[LuaMethodAttributes("contains", "Returns whether or not str contains str2")]
[LuaMethod("contains", "Returns whether or not str contains str2")]
public static bool Contains(string str, string str2)
{
if (string.IsNullOrEmpty(str))
@ -133,7 +126,7 @@ namespace BizHawk.Client.Common
return str.Contains(str2);
}
[LuaMethodAttributes("startswith", "Returns whether str starts with str2")]
[LuaMethod("startswith", "Returns whether str starts with str2")]
public static bool StartsWith(string str, string str2)
{
if (string.IsNullOrEmpty(str))
@ -144,7 +137,7 @@ namespace BizHawk.Client.Common
return str.StartsWith(str2);
}
[LuaMethodAttributes("endswith", "Returns whether str ends wth str2")]
[LuaMethod("endswith", "Returns whether str ends wth str2")]
public static bool EndsWith(string str, string str2)
{
if (string.IsNullOrEmpty(str))
@ -155,8 +148,7 @@ namespace BizHawk.Client.Common
return str.EndsWith(str2);
}
[LuaMethodAttributes(
"split", "Splits str based on separator into a LuaTable. Separator must be one character!. Same functionality as .NET string.Split() using the RemoveEmptyEntries option")]
[LuaMethod("split", "Splits str based on separator into a LuaTable. Separator must be one character!. Same functionality as .NET string.Split() using the RemoveEmptyEntries option")]
public LuaTable Split(string str, string separator)
{
var table = Lua.NewTable();

View File

@ -1,7 +1,7 @@
using System;
using System.ComponentModel;
using LuaInterface;
using NLua;
using BizHawk.Client.Common;
@ -18,17 +18,13 @@ namespace BizHawk.Client.EmuHawk
public override string Name => "userdata";
[LuaMethodAttributes(
"set",
"adds or updates the data with the given key with the given value")]
[LuaMethod("set", "adds or updates the data with the given key with the given value")]
public void Set(string name, object value)
{
Global.UserBag[name] = value;
}
[LuaMethodAttributes(
"get",
"gets the data with the given key, if the key does not exist it will return nil")]
[LuaMethod("get", "gets the data with the given key, if the key does not exist it will return nil")]
public object Get(string key)
{
if (Global.UserBag.ContainsKey(key))
@ -39,25 +35,19 @@ namespace BizHawk.Client.EmuHawk
return null;
}
[LuaMethodAttributes(
"clear",
"clears all user data")]
[LuaMethod("clear", "clears all user data")]
public void Clear()
{
Global.UserBag.Clear();
}
[LuaMethodAttributes(
"remove",
"remove the data with the given key. Returns true if the element is successfully found and removed; otherwise, false.")]
[LuaMethod("remove", "remove the data with the given key. Returns true if the element is successfully found and removed; otherwise, false.")]
public bool Remove(string key)
{
return Global.UserBag.Remove(key);
}
[LuaMethodAttributes(
"containskey",
"returns whether or not there is an entry for the given key")]
[LuaMethod("containskey", "returns whether or not there is an entry for the given key")]
public bool ContainsKey(string key)
{
return Global.UserBag.ContainsKey(key);

View File

@ -3,9 +3,9 @@
namespace BizHawk.Client.Common
{
[AttributeUsage(AttributeTargets.Method)]
public class LuaMethodAttributes : Attribute
public class LuaMethodAttribute : Attribute
{
public LuaMethodAttributes(string name, string description)
public LuaMethodAttribute(string name, string description)
{
Name = name;
Description = description;
@ -16,9 +16,9 @@ namespace BizHawk.Client.Common
}
[AttributeUsage(AttributeTargets.Class)]
public class LuaLibraryAttributes : Attribute
public class LuaLibraryAttribute : Attribute
{
public LuaLibraryAttributes(bool released)
public LuaLibraryAttribute(bool released)
{
Released = released;
}

View File

@ -161,13 +161,13 @@ __Types and notation__
public class LibraryFunction
{
private readonly LuaMethodAttributes _luaAttributes;
private readonly LuaMethodAttribute _luaAttributes;
private readonly MethodInfo _method;
public LibraryFunction(string library, string libraryDescription, MethodInfo method)
{
_luaAttributes = method.GetCustomAttributes(typeof(LuaMethodAttributes), false)
.First() as LuaMethodAttributes;
_luaAttributes = method.GetCustomAttributes(typeof(LuaMethodAttribute), false)
.First() as LuaMethodAttribute;
_method = method;
Library = library;

View File

@ -35,7 +35,7 @@
public bool Enabled => State != RunState.Disabled;
public bool Paused => State == RunState.Paused;
public bool IsSeparator { get; }
public LuaInterface.Lua Thread { get; set; }
public NLua.Lua Thread { get; set; }
public bool FrameWaiting { get; set; }
public string CurrentDirectory { get; set; }

View File

@ -1,4 +1,7 @@
using LuaInterface;
using System.Linq;
using System.Reflection;
using NLua;
namespace BizHawk.Client.Common
{
@ -15,7 +18,15 @@ namespace BizHawk.Client.Common
{
if (method.IsPublic)
{
table[method.Name] = lua.RegisterFunction("", obj, method);
string luaName = ""; // Empty will default to the actual method name;
var luaMethodAttr = (LuaMethodAttribute)method.GetCustomAttributes(typeof(LuaMethodAttribute)).FirstOrDefault();
if (luaMethodAttr != null)
{
luaName = luaMethodAttr.Name;
}
table[method.Name] = lua.RegisterFunction(luaName, obj, method);
}
}

View File

@ -3,7 +3,7 @@ using System.Drawing;
using System.Linq;
using System.Threading;
using LuaInterface;
using NLua;
using BizHawk.Common.ReflectionExtensions;
namespace BizHawk.Client.Common
@ -96,7 +96,7 @@ namespace BizHawk.Client.Common
{
Lua.NewTable(Name);
var luaAttr = typeof(LuaMethodAttributes);
var luaAttr = typeof(LuaMethodAttribute);
var methods = GetType()
.GetMethods()
@ -104,7 +104,7 @@ namespace BizHawk.Client.Common
foreach (var method in methods)
{
var luaMethodAttr = (LuaMethodAttributes)method.GetCustomAttributes(luaAttr, false).First();
var luaMethodAttr = (LuaMethodAttribute)method.GetCustomAttributes(luaAttr, false).First();
var luaName = Name + "." + luaMethodAttr.Name;
Lua.RegisterFunction(luaName, this, method);

View File

@ -1,5 +1,5 @@
using System;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;

View File

@ -1,6 +1,6 @@
using System;
using System.Runtime.InteropServices;
using LuaInterface;
using NLua;
// TODO - evaluate for re-entrancy problems
namespace BizHawk.Client.Common
@ -92,7 +92,7 @@ namespace BizHawk.Client.Common
EnvironmentSandbox.Sandbox(callback);
}
catch (LuaException ex)
catch (NLua.Exceptions.LuaException ex)
{
Console.WriteLine(ex);
DefaultLogger(ex.ToString());

View File

@ -1,5 +1,5 @@
using System;
using LuaInterface;
using NLua;
namespace BizHawk.Client.Common
{

View File

@ -486,8 +486,8 @@ namespace BizHawk.Client.Common
if (!record && emulator.SystemId == "NES") // For NES we need special logic since the movie will drive which core to load
{
var quicknesName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(QuickNES), typeof(CoreAttributes))).CoreName;
var neshawkName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(NES), typeof(CoreAttributes))).CoreName;
var quicknesName = ((CoreAttribute)Attribute.GetCustomAttribute(typeof(QuickNES), typeof(CoreAttribute))).CoreName;
var neshawkName = ((CoreAttribute)Attribute.GetCustomAttribute(typeof(NES), typeof(CoreAttribute))).CoreName;
// If either is specified use that, else use whatever is currently set
if (movie.Core == quicknesName)
@ -503,8 +503,8 @@ namespace BizHawk.Client.Common
}
else if (!record && emulator.SystemId == "SNES") // ditto with snes9x vs bsnes
{
var snes9xName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(Snes9x), typeof(CoreAttributes))).CoreName;
var bsnesName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(LibsnesCore), typeof(CoreAttributes))).CoreName;
var snes9xName = ((CoreAttribute)Attribute.GetCustomAttribute(typeof(Snes9x), typeof(CoreAttribute))).CoreName;
var bsnesName = ((CoreAttribute)Attribute.GetCustomAttribute(typeof(LibsnesCore), typeof(CoreAttribute))).CoreName;
if (movie.Core == snes9xName)
{
@ -519,8 +519,8 @@ namespace BizHawk.Client.Common
}
else if (!record && emulator.SystemId == "GBA") // ditto with GBA, we should probably architect this at some point, this isn't sustainable
{
var mGBAName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(MGBAHawk), typeof(CoreAttributes))).CoreName;
var vbaNextName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(VBANext), typeof(CoreAttributes))).CoreName;
var mGBAName = ((CoreAttribute)Attribute.GetCustomAttribute(typeof(MGBAHawk), typeof(CoreAttribute))).CoreName;
var vbaNextName = ((CoreAttribute)Attribute.GetCustomAttribute(typeof(VBANext), typeof(CoreAttribute))).CoreName;
if (movie.Core == mGBAName)
{
@ -535,8 +535,8 @@ namespace BizHawk.Client.Common
}
else if (!record && emulator.SystemId == "A78") // meh, copy pasta one more time, last time, I promise
{
var atari7800HawkName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(A7800Hawk), typeof(CoreAttributes))).CoreName;
var emu7800HawkName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(Atari7800), typeof(CoreAttributes))).CoreName;
var atari7800HawkName = ((CoreAttribute)Attribute.GetCustomAttribute(typeof(A7800Hawk), typeof(CoreAttribute))).CoreName;
var emu7800HawkName = ((CoreAttribute)Attribute.GetCustomAttribute(typeof(Atari7800), typeof(CoreAttribute))).CoreName;
if (movie.Core == atari7800HawkName)
{

View File

@ -79,6 +79,8 @@ namespace BizHawk.Client.Common
["R3"] = '>',
["Button"] = 'B',
["Button 1"] = '1',
["Button 2"] = '2',
["B1"] = '1',
["B2"] = '2',
@ -93,6 +95,8 @@ namespace BizHawk.Client.Common
["Mode"] = 'M',
["MODE"] = 'M',
["Mode 1"] = 'M',
["Mode 2"] = 'm',
["Fire"] = 'F',
["Lightgun Trigger"] = 'T',
@ -355,6 +359,15 @@ namespace BizHawk.Client.Common
["R_Down"] = 'd',
["R_Left"] = 'l',
["R_Right"] = 'r',
},
["PCFX"] = new Dictionary<string, char>
{
["I"] = '1',
["II"] = '2',
["III"] = '3',
["IV"] = '4',
["V"] = '5',
["VI"] = '6',
}
};
}

View File

@ -7,6 +7,7 @@ using BizHawk.Emulation.Cores.Nintendo.Gameboy;
using BizHawk.Emulation.Cores.Sega.MasterSystem;
using BizHawk.Emulation.Common.IEmulatorExtensions;
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
using BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive;
namespace BizHawk.Client.Common.MovieConversionExtensions
{
@ -320,13 +321,23 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
movie.HeaderEntries.Add("IsSGMode", "1");
}
if (Global.Emulator is GPGX && (Global.Emulator as GPGX).IsSegaCD)
if (Global.Emulator is SMS && (Global.Emulator as SMS).IsGameGear)
{
movie.HeaderEntries.Add("IsGGMode", "1");
}
if (Global.Emulator is GPGX && (Global.Emulator as GPGX).IsMegaCD)
{
movie.HeaderEntries.Add("IsSegaCDMode", "1");
}
movie.Core = ((CoreAttributes)Attribute
.GetCustomAttribute(Global.Emulator.GetType(), typeof(CoreAttributes)))
if (Global.Emulator is PicoDrive && Global.Game["32X"])
{
movie.HeaderEntries.Add("Is32X", "1");
}
movie.Core = ((CoreAttribute)Attribute
.GetCustomAttribute(Global.Emulator.GetType(), typeof(CoreAttribute)))
.CoreName;
}
}

View File

@ -81,9 +81,9 @@ namespace BizHawk.Client.Common
}
[AttributeUsage(AttributeTargets.Class)]
public class ImportExtension : Attribute
public class ImportExtensionAttribute : Attribute
{
public ImportExtension(string extension)
public ImportExtensionAttribute(string extension)
{
Extension = extension;
}

View File

@ -129,7 +129,7 @@ namespace BizHawk.Client.Common
private static bool TypeImportsExtension(Type t, string ext)
{
var attrs = (ImportExtension[])t.GetCustomAttributes(typeof(ImportExtension), inherit: false);
var attrs = (ImportExtensionAttribute[])t.GetCustomAttributes(typeof(ImportExtensionAttribute), inherit: false);
if (attrs.Any(a => a.Extension.ToUpper() == ext.ToUpper()))
{

View File

@ -215,7 +215,7 @@ namespace BizHawk.Client.Common
diff = "-";
}
return $"{diff}{FormatValue((byte)Math.Abs(diffVal))}";
return $"{diff}{((byte)Math.Abs(diffVal))}";
}
}

View File

@ -231,7 +231,7 @@ namespace BizHawk.Client.Common
/// Get a string representation of difference
/// between current value and the previous one
/// </summary>
public override string Diff => FormatValue(_previous - _value);
public override string Diff => (_previous - _value).ToString();
/// <summary>
/// Get the maximum possible value

View File

@ -229,7 +229,7 @@ namespace BizHawk.Client.Common
diff = "-";
}
return $"{diff}{FormatValue((ushort)Math.Abs(diffVal))}";
return $"{diff}{((ushort)Math.Abs(diffVal))}";
}
}

View File

@ -2,37 +2,27 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<StartupObject />
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\output\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>..\output\</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>

View File

@ -42,42 +42,28 @@
<PropertyGroup>
<ApplicationIcon>discohawk.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\output\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>..\output\</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@ -45,7 +45,7 @@ namespace BizHawk.Client.EmuHawk
.Load("BizHawk.Emulation.Cores")
.GetTypes()
.Where(t => typeof(IEmulator).IsAssignableFrom(t))
.Select(t => t.GetCustomAttributes(false).OfType<CoreAttributes>().FirstOrDefault())
.Select(t => t.GetCustomAttributes(false).OfType<CoreAttribute>().FirstOrDefault())
.Where(a => a != null)
.Where(a => a.Released)
.OrderByDescending(a => a.CoreName.ToLower())

View File

@ -15,7 +15,7 @@ namespace BizHawk.Client.EmuHawk
{
private string url = "";
public BizBoxInfoControl(CoreAttributes attributes)
public BizBoxInfoControl(CoreAttribute attributes)
{
InitializeComponent();
CoreNameLabel.Text = attributes.CoreName;

View File

@ -24,6 +24,7 @@
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<Prefer32Bit>false</Prefer32Bit>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
@ -35,47 +36,32 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\output\</OutputPath>
<DefineConstants>WINDOWS;DEBUG</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>..\output\</OutputPath>
<DefineConstants>WINDOWS</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="GongShell">
@ -84,22 +70,20 @@
<Reference Include="ICSharpCode.SharpZipLib">
<HintPath>..\References\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="LuaInterface, Version=2.0.4.35439, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\$(Platform)\LuaInterface.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualBasic" Condition=" '$(OS)' == 'Windows_NT' " />
<Reference Include="Newtonsoft.Json">
<HintPath>..\References\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLua">
<HintPath>..\References\NLua.dll</HintPath>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\OpenTK.dll</HintPath>
</Reference>
<Reference Include="SlimDX, Version=4.0.10.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\$(Platform)\SlimDX.dll</HintPath>
<Reference Include="SlimDX">
<HintPath>..\References\x64\SlimDX.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
@ -712,7 +696,7 @@
<Compile Include="Sound\Utilities\SyncToAsyncProvider.cs" />
<Compile Include="Sound\Utilities\SoundOutputProvider.cs" />
<Compile Include="Throttle.cs" />
<Compile Include="ToolAttributes.cs" />
<Compile Include="ToolAttribute.cs" />
<Compile Include="tools\AutoHawk.cs">
<SubType>Form</SubType>
</Compile>
@ -1192,7 +1176,8 @@
<Compile Include="tools\VirtualPads\schema\NesSchema.cs" />
<Compile Include="tools\VirtualPads\schema\PadSchema.cs" />
<Compile Include="tools\VirtualPads\schema\PceSchema.cs" />
<Compile Include="tools\VirtualPads\schema\SchemaAttributes.cs" />
<Compile Include="tools\VirtualPads\schema\SchemaAttribute.cs" />
<Compile Include="tools\VirtualPads\schema\SGBSchema.cs" />
<Compile Include="tools\VirtualPads\schema\SmsSchema.cs" />
<Compile Include="tools\VirtualPads\schema\SnesSchema.cs" />
<Compile Include="tools\VirtualPads\schema\VirtualBoySchema.cs" />
@ -1797,7 +1782,6 @@
<None Include="images\tastudio\icon_marker.png" />
<EmbeddedResource Include="Resources\gens.ttf" />
<EmbeddedResource Include="Resources\fceux.ttf" />
<None Include="Resources\HawkInLove.png" />
<None Include="images\Circle.png" />
<None Include="images\Cross.png" />
<None Include="images\Square.png" />
@ -1980,8 +1964,6 @@
<None Include="images\thumbsdown.png" />
<None Include="images\monitor.png" />
<None Include="images\ppsspp.png" />
<None Include="images\meteor.png" />
<None Include="images\yabause.png" />
<None Include="images\QuickNes.png" />
<None Include="images\sms-icon.png" />
<None Include="images\pcb.png" />
@ -2106,7 +2088,6 @@
<None Include="images\JumpTo.png" />
<None Include="images\ENE.png" />
<None Include="images\ESE.png" />
<None Include="images\5757344.png" />
<None Include="images\ControllerImages\NGPController.png" />
<Content Include="images\logo.ico" />
<None Include="images\Paste.png" />
@ -2161,7 +2142,8 @@
</Target>
-->
<PropertyGroup>
<PostBuildEvent>..\Build\BizHawk.Build.Tool.exe LARGEADDRESS --value 1 --target "$(TargetPath)"</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">"$(SolutionDir)subwcrev.bat" "$(ProjectDir)"</PreBuildEvent>

View File

@ -37,8 +37,8 @@ namespace BizHawk.Client.EmuHawk
Services.Add(si.TypeName, si);
}
var notapplicableAttr = ((ServiceNotApplicable)Attribute
.GetCustomAttribute(emu.GetType(), typeof(ServiceNotApplicable)));
var notapplicableAttr = ((ServiceNotApplicableAttribute)Attribute
.GetCustomAttribute(emu.GetType(), typeof(ServiceNotApplicableAttribute)));
if (notapplicableAttr != null)
{
@ -223,7 +223,7 @@ namespace BizHawk.Client.EmuHawk
.Select(t => new
{
Type = t,
CoreAttributes = (CoreAttributes)t.GetCustomAttributes(typeof(CoreAttributes), false).First()
CoreAttributes = (CoreAttribute)t.GetCustomAttributes(typeof(CoreAttribute), false).First()
})
.OrderByDescending(t => t.CoreAttributes.Released)
.ThenBy(t => t.CoreAttributes.CoreName)

View File

@ -27,7 +27,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
linkLabel2.LinkVisited = true;
System.Diagnostics.Process.Start("http://sf.net/projects/bizhawk");
System.Diagnostics.Process.Start("https://github.com/TASVideos/BizHawk-Prereqs/releases");
}
private void button1_Click(object sender, EventArgs e)

View File

@ -395,6 +395,9 @@ namespace BizHawk.Client.EmuHawk.Filters
XIS = OutputSize.Width / state.SurfaceFormat.Size.Width;
YIS = OutputSize.Height / state.SurfaceFormat.Size.Height;
if (XIS == 0) XIS = 1;
if (YIS == 0) YIS = 1;
OutputSize = state.SurfaceFormat.Size;
if (XIS <= 1 && YIS <= 1)

View File

@ -188,7 +188,7 @@ namespace BizHawk.Client.EmuHawk
if (attachedConsole)
{
Console.WriteLine();
Console.WriteLine("use cmd /c {0} to get more sensible console behaviour", Path.GetFileName(PathManager.GetBasePathAbsolute()));
Console.WriteLine("use cmd /c {0} to get more sensible console behaviour", Path.GetFileName(PathManager.GetGlobalBasePathAbsolute()));
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1189,7 +1189,6 @@ namespace BizHawk.Client.EmuHawk
Atari7800CoreSubMenu.Visible = VersionInfo.DeveloperBuild;
GBInSGBMenuItem.Checked = Global.Config.GB_AsSGB;
allowGameDBCoreOverridesToolStripMenuItem.Checked = Global.Config.CoreForcingViaGameDB;
}
@ -1227,8 +1226,8 @@ namespace BizHawk.Client.EmuHawk
private void GbaCoreSubMenu_DropDownOpened(object sender, EventArgs e)
{
VbaNextCoreMenuItem.Checked = Global.Config.GBA_UsemGBA;
MgbaCoreMenuItem.Checked = !Global.Config.GBA_UsemGBA;
VbaNextCoreMenuItem.Checked = !Global.Config.GBA_UsemGBA;
MgbaCoreMenuItem.Checked = Global.Config.GBA_UsemGBA;
}
private void GbaCorePick_Click(object sender, EventArgs e)
@ -1255,6 +1254,23 @@ namespace BizHawk.Client.EmuHawk
}
}
private void SGBCoreSubmenu_DropDownOpened(object sender, EventArgs e)
{
SgbBsnesMenuItem.Checked = Global.Config.SGB_UseBsnes;
SgbPizzaBoyMenuItem.Checked = !Global.Config.SGB_UseBsnes;
}
private void SgbCorePick_Click(object sender, EventArgs e)
{
Global.Config.SGB_UseBsnes ^= true;
// TODO: only flag if one of these cores
if (!Emulator.IsNull())
{
FlagNeedsReboot();
}
}
private void GbInSgbMenuItem_Click(object sender, EventArgs e)
{
Global.Config.GB_AsSGB ^= true;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
@ -32,6 +32,7 @@ using BizHawk.Client.ApiHawk;
using BizHawk.Emulation.Common.Base_Implementations;
using BizHawk.Emulation.Cores.Nintendo.SNES9X;
using BizHawk.Emulation.Cores.Consoles.SNK;
using BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive;
namespace BizHawk.Client.EmuHawk
{
@ -160,6 +161,9 @@ namespace BizHawk.Client.EmuHawk
string cmdDumpType = null;
string cmdDumpName = null;
bool startFullscreen = false;
string luaScript = null;
bool luaConsole = false;
for (int i = 0; i < args.Length; i++)
{
// For some reason sometimes visual studio will pass this to us on the commandline. it makes no sense.
@ -222,6 +226,15 @@ namespace BizHawk.Client.EmuHawk
{
startFullscreen = true;
}
else if (arg.StartsWith("--lua="))
{
luaScript = arg.Substring(arg.IndexOf('=') + 1);
luaConsole = true;
}
else if (arg.StartsWith("--luaconsole"))
{
luaConsole = true;
}
else
{
cmdRom = arg;
@ -447,6 +460,17 @@ namespace BizHawk.Client.EmuHawk
}
}
//start Lua Console if requested in the command line arguments
if (luaConsole)
{
GlobalWin.Tools.Load<LuaConsole>();
}
//load Lua Script if requested in the command line arguments
if (luaScript != null)
{
GlobalWin.Tools.LuaConsole.LoadLuaFile(luaScript);
}
GlobalWin.Tools.AutoLoad();
if (Global.Config.RecentWatches.AutoLoad)
@ -1751,11 +1775,16 @@ namespace BizHawk.Client.EmuHawk
virtualBoyToolStripMenuItem.Visible = false;
sNESToolStripMenuItem.Visible = false;
neoGeoPocketToolStripMenuItem.Visible = false;
pCFXToolStripMenuItem.Visible = false;
switch (system)
{
case "GEN":
GenesisSubMenu.Visible = true;
if (!(Emulator is PicoDrive)) // Currently PicoDrive doesn't support anything in this menu
{
GenesisSubMenu.Visible = true;
}
break;
case "TI83":
TI83SubMenu.Visible = true;
@ -1838,6 +1867,9 @@ namespace BizHawk.Client.EmuHawk
case "NGP":
neoGeoPocketToolStripMenuItem.Visible = true;
break;
case "PCFX":
pCFXToolStripMenuItem.Visible = true;
break;
}
}
@ -2081,7 +2113,7 @@ namespace BizHawk.Client.EmuHawk
if (VersionInfo.DeveloperBuild)
{
return FormatFilter(
"Rom Files", "*.nes;*.fds;*.unf;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.a78;*.lnx;*.m3u;*.cue;*.ccd;*.exe;*.gb;*.gbc;*.gba;*.gen;*.md;*.col;*.int;*.smc;*.sfc;*.prg;*.d64;*.g64;*.crt;*.tap;*.sgb;*.xml;*.z64;*.v64;*.n64;*.ws;*.wsc;*.dsk;*.do;*.po;*.vb;*.ngp;*.ngc;*.psf;*.minipsf;*.nsf;%ARCH%",
"Rom Files", "*.nes;*.fds;*.unf;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.a78;*.lnx;*.m3u;*.cue;*.ccd;*.exe;*.gb;*.gbc;*.gba;*.gen;*.md;*.32x;*.col;*.int;*.smc;*.sfc;*.prg;*.d64;*.g64;*.crt;*.tap;*.sgb;*.xml;*.z64;*.v64;*.n64;*.ws;*.wsc;*.dsk;*.do;*.po;*.vb;*.ngp;*.ngc;*.psf;*.minipsf;*.nsf;%ARCH%",
"Music Files", "*.psf;*.minipsf;*.sid;*.nsf",
"Disc Images", "*.cue;*.ccd;*.m3u",
"NES", "*.nes;*.fds;*.unf;*.nsf;%ARCH%",
@ -2094,7 +2126,7 @@ namespace BizHawk.Client.EmuHawk
"Atari 2600", "*.a26;*.bin;%ARCH%",
"Atari 7800", "*.a78;*.bin;%ARCH%",
"Atari Lynx", "*.lnx;%ARCH%",
"Genesis", "*.gen;*.smd;*.bin;*.md;*.cue;*.ccd;%ARCH%",
"Genesis", "*.gen;*.smd;*.bin;*.md;*.32x;*.cue;*.ccd;%ARCH%",
"Gameboy", "*.gb;*.gbc;*.sgb;%ARCH%",
"Gameboy Advance", "*.gba;%ARCH%",
"Colecovision", "*.col;%ARCH%",
@ -2113,7 +2145,7 @@ namespace BizHawk.Client.EmuHawk
}
return FormatFilter(
"Rom Files", "*.nes;*.fds;*.unf;*.sms;*.gg;*.sg;*.gb;*.gbc;*.gba;*.pce;*.sgx;*.bin;*.smd;*.gen;*.md;*.smc;*.sfc;*.a26;*.a78;*.lnx;*.col;*.int;*.rom;*.m3u;*.cue;*.ccd;*.sgb;*.z64;*.v64;*.n64;*.ws;*.wsc;*.xml;*.dsk;*.do;*.po;*.psf;*.ngp;*.ngc;*.prg;*.d64;*.g64;*.minipsf;*.nsf;%ARCH%",
"Rom Files", "*.nes;*.fds;*.unf;*.sms;*.gg;*.sg;*.gb;*.gbc;*.gba;*.pce;*.sgx;*.bin;*.smd;*.gen;*.md;*.32x;*.smc;*.sfc;*.a26;*.a78;*.lnx;*.col;*.int;*.rom;*.m3u;*.cue;*.ccd;*.sgb;*.z64;*.v64;*.n64;*.ws;*.wsc;*.xml;*.dsk;*.do;*.po;*.psf;*.ngp;*.ngc;*.prg;*.d64;*.g64;*.minipsf;*.nsf;%ARCH%",
"Disc Images", "*.cue;*.ccd;*.m3u",
"NES", "*.nes;*.fds;*.unf;*.nsf;%ARCH%",
"Super NES", "*.smc;*.sfc;*.xml;%ARCH%",
@ -2132,7 +2164,7 @@ namespace BizHawk.Client.EmuHawk
"TI-83", "*.rom;%ARCH%",
"Archive Files", "%ARCH%",
"Savestate", "*.state",
"Genesis", "*.gen;*.md;*.smd;*.bin;*.cue;*.ccd;%ARCH%",
"Genesis", "*.gen;*.md;*.smd;*.32x;*.bin;*.cue;*.ccd;%ARCH%",
"WonderSwan", "*.ws;*.wsc;%ARCH%",
"Apple II", "*.dsk;*.do;*.po;%ARCH%",
"Virtual Boy", "*.vb;%ARCH%",
@ -4271,6 +4303,11 @@ namespace BizHawk.Client.EmuHawk
GenericCoreConfig.DoDialog(this, "NeoPop Settings");
}
private void preferencesToolStripMenuItem3_Click(object sender, EventArgs e)
{
GenericCoreConfig.DoDialog(this, "PC-FX Settings");
}
private bool Rewind(ref bool runFrame, long currentTimestamp, out bool returnToRecording)
{
var isRewinding = false;

View File

@ -69,33 +69,11 @@ namespace BizHawk.Client.EmuHawk.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap VBoyController {
get {
object obj = ResourceManager.GetObject("VBoyController", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap NGPController
{
get
{
object obj = ResourceManager.GetObject("NGPController", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap add {
internal static System.Drawing.Bitmap add {
get {
object obj = ResourceManager.GetObject("add", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@ -1022,6 +1000,16 @@ namespace BizHawk.Client.EmuHawk.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap NGPController {
get {
object obj = ResourceManager.GetObject("NGPController", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -3321,6 +3309,16 @@ namespace BizHawk.Client.EmuHawk.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap VBoyController {
get {
object obj = ResourceManager.GetObject("VBoyController", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -3411,16 +3409,6 @@ namespace BizHawk.Client.EmuHawk.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap yabause {
get {
object obj = ResourceManager.GetObject("yabause", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -807,9 +807,6 @@
<data name="ts_v_piano_10" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\tastudio\ts_v_piano_10.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="yabause" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\yabause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="watch" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\watch.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

View File

@ -4,9 +4,9 @@ using System.Collections.Generic;
namespace BizHawk.Client.EmuHawk
{
[AttributeUsage(AttributeTargets.Class)]
public class ToolAttributes : Attribute
public class ToolAttribute : Attribute
{
public ToolAttributes(bool released, string[] supportedSystems)
public ToolAttribute(bool released, string[] supportedSystems)
{
Released = released;
SupportedSystems = supportedSystems;

View File

@ -29,6 +29,7 @@ namespace BizHawk.Client.EmuHawk
public partial class FirmwaresConfig : Form
{
// friendlier names than the system Ids
// Redundant with SystemLookup? Not so fast. That datadrives things. This is one step abstracted. Don't be such a smart guy. Keep this redundant list up to date.
private static readonly Dictionary<string, string> SystemGroupNames = new Dictionary<string, string>
{
{ "NES", "NES" },
@ -43,9 +44,14 @@ namespace BizHawk.Client.EmuHawk
{ "C64", "C64" },
{ "GEN", "Genesis" },
{ "SMS", "Sega Master System" },
{ "PSX", "Sony PlayStation" },
{ "Lynx", "Atari Lynx" },
{ "AppleII", "Apple II" }
{ "PSX", "PlayStation" },
{ "Lynx", "Lynx" },
{ "AppleII", "Apple II" },
{ "O2", "Odyssey 2" },
{ "GB", "Game Boy" },
{ "GBC", "Game Boy Color" },
{ "PCFX", "PC-FX" },
{ "32X", "32X" },
};
public string TargetSystem = null;
@ -236,7 +242,7 @@ namespace BizHawk.Client.EmuHawk
if (ri == null)
{
lvi.ImageIndex = idMissing;
lvi.ToolTipText = "Missing!";
lvi.ToolTipText = "No file bound for this firmware!";
}
else
{
@ -252,13 +258,13 @@ namespace BizHawk.Client.EmuHawk
if (ri.KnownFirmwareFile == null)
{
lvi.ImageIndex = idUnsure;
lvi.ToolTipText = null;
lvi.ToolTipText = "You've bound a custom choice here. Hope you know what you're doing.";
lvi.SubItems[4].Text = "-custom-";
}
else
{
lvi.ImageIndex = idOk;
lvi.ToolTipText = "Good!";
lvi.ToolTipText = "Good! This file has been bound to some kind of a decent choice";
lvi.SubItems[4].Text = ri.KnownFirmwareFile.Description;
}
@ -278,12 +284,16 @@ namespace BizHawk.Client.EmuHawk
if (ri.Missing)
{
lvi.ImageIndex = idMissing;
lvi.ToolTipText = "Missing!";
lvi.ToolTipText = "The file that's specified is missing!";
}
// if the user specified a known firmware file but its for some other firmware, it was probably a mistake. mark it as suspicious
if (ri.KnownMismatching)
{
lvi.ImageIndex = idUnsure;
lvi.ToolTipText = "You've manually specified a firmware file, and we're sure it's wrong. Hope you know what you're doing.";
}
lvi.SubItems[5].Text = path;
@ -414,13 +424,25 @@ namespace BizHawk.Client.EmuHawk
olvi.SubItems.Add(new ListViewItem.ListViewSubItem());
var ff = FirmwareDatabase.FirmwareFilesByHash[o.Hash];
if (o.Status == FirmwareDatabase.FirmwareOptionStatus.Ideal)
{
olvi.ImageIndex = FirmwaresConfigInfo.idIdeal;
olvi.ToolTipText = FirmwaresConfigInfo.ttIdeal;
}
if (o.Status == FirmwareDatabase.FirmwareOptionStatus.Acceptable)
{
olvi.ImageIndex = FirmwaresConfigInfo.idAcceptable;
olvi.ToolTipText = FirmwaresConfigInfo.ttAcceptable;
}
if (o.Status == FirmwareDatabase.FirmwareOptionStatus.Unacceptable)
{
olvi.ImageIndex = FirmwaresConfigInfo.idUnacceptable;
olvi.ToolTipText = FirmwaresConfigInfo.ttUnacceptable;
}
if (o.Status == FirmwareDatabase.FirmwareOptionStatus.Bad)
{
olvi.ImageIndex = FirmwaresConfigInfo.idBad;
olvi.ToolTipText = FirmwaresConfigInfo.ttBad;
}
olvi.SubItems[0].Text = ff.Size.ToString();
olvi.SubItems[0].Font = this.Font; // why doesnt this work?
olvi.SubItems[1].Text = "sha1:" + o.Hash;

View File

@ -30,6 +30,7 @@
{
this.components = new System.ComponentModel.Container();
this.lvOptions = new System.Windows.Forms.ListView();
this.colSize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colHash = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colStandardFilename = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colDescription = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -43,7 +44,7 @@
this.lblFirmware = new System.Windows.Forms.Label();
this.lvmiOptionsContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.tsmiOptionsCopy = new System.Windows.Forms.ToolStripMenuItem();
this.colSize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.tableLayoutPanel1.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.lvmiOptionsContextMenuStrip.SuspendLayout();
@ -70,6 +71,11 @@
this.lvOptions.KeyDown += new System.Windows.Forms.KeyEventHandler(this.LvOptions_KeyDown);
this.lvOptions.MouseClick += new System.Windows.Forms.MouseEventHandler(this.LvOptions_MouseClick);
//
// colSize
//
this.colSize.Text = "Size";
this.colSize.Width = 74;
//
// colHash
//
this.colHash.Text = "Hash";
@ -181,11 +187,6 @@
this.tsmiOptionsCopy.Text = "&Copy";
this.tsmiOptionsCopy.Click += new System.EventHandler(this.TsmiOptionsCopy_Click);
//
// colSize
//
this.colSize.Text = "Size";
this.colSize.Width = 74;
//
// FirmwaresConfigInfo
//
this.AcceptButton = this.btnClose;
@ -224,5 +225,6 @@
private System.Windows.Forms.ColumnHeader colInfo;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ColumnHeader colSize;
private System.Windows.Forms.ToolTip toolTip1;
}
}

View File

@ -15,6 +15,11 @@ namespace BizHawk.Client.EmuHawk
public const int idUnacceptable = 2;
public const int idBad = 3;
public const string ttIdeal = "COOL: Ideal for TASing and anything. There can only be one.";
public const string ttAcceptable = "OK: This works on the core";
public const string ttUnacceptable = "NO: This doesn't work on the core";
public const string ttBad = "BAD! Why are you using this file";
public FirmwaresConfigInfo()
{
InitializeComponent();

View File

@ -123,4 +123,7 @@
<metadata name="lvmiOptionsContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>320, 17</value>
</metadata>
</root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -11,7 +11,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
{
[ToolAttributes(released: false, supportedSystems: null)]
[Tool(released: false, supportedSystems: null)]
public partial class AutoHawk : Form, IToolFormAutoConfig
{
public AutoHawk()

View File

@ -415,7 +415,7 @@
//
this.OpenGameGenieEncoderDecoderMenuItem.Name = "OpenGameGenieEncoderDecoderMenuItem";
this.OpenGameGenieEncoderDecoderMenuItem.Size = new System.Drawing.Size(233, 22);
this.OpenGameGenieEncoderDecoderMenuItem.Text = "Game Genie Encoder/Decoder";
this.OpenGameGenieEncoderDecoderMenuItem.Text = "Code Converter";
this.OpenGameGenieEncoderDecoderMenuItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click);
//
// OptionsSubMenu
@ -615,8 +615,8 @@
this.LoadGameGenieToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.LoadGameGenieToolbarItem.Name = "LoadGameGenieToolbarItem";
this.LoadGameGenieToolbarItem.Size = new System.Drawing.Size(75, 22);
this.LoadGameGenieToolbarItem.Text = "Game Genie";
this.LoadGameGenieToolbarItem.ToolTipText = "Open the Game Genie Encoder/Decoder";
this.LoadGameGenieToolbarItem.Text = "Code Converter";
this.LoadGameGenieToolbarItem.ToolTipText = "Open the Cheat Code Converter";
this.LoadGameGenieToolbarItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click);
//
// TotalLabel

View File

@ -9,7 +9,7 @@ using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
[ToolAttributes(false, null)]
[Tool(false, null)]
public partial class GBGameGenie : Form, IToolFormAutoConfig
{
// TODO: fix the use of Global.Game.System and Emulator.SystemId

View File

@ -20,7 +20,7 @@ namespace BizHawk.Client.EmuHawk
//Verify all wording in the error reports
[ToolAttributes(released: true, supportedSystems: new[] { "GB", "GBA", "GEN", "N64", "NES", "PSX", "SAT", "SMS", "SNES" })]
[Tool(released: true, supportedSystems: new[] { "GB", "GBA", "GEN", "N64", "NES", "PSX", "SAT", "SMS", "SNES" })]
public partial class GameShark : Form, IToolForm, IToolFormAutoConfig
{
#region " Game Genie Dictionary "
@ -3187,8 +3187,9 @@ namespace BizHawk.Client.EmuHawk
//Is this correct?
if (GameGenie == true)
{
var watch = Watch.GenerateWatch(MemoryDomains["CARTROM"], long.Parse(RAMAddress, NumberStyles.HexNumber), WatchSize.Byte, Common.DisplayType.Hex, false, txtDescription.Text);
Global.CheatList.Add(new Cheat(watch, int.Parse(RAMValue, NumberStyles.HexNumber)));
MessageBox.Show("Game genie codes are not currently supported for SNES", "SNES Game Genie not supported", MessageBoxButtons.OK, MessageBoxIcon.Error);
////var watch = Watch.GenerateWatch(MemoryDomains["CARTROM"], long.Parse(RAMAddress, NumberStyles.HexNumber), WatchSize.Byte, Common.DisplayType.Hex, false, txtDescription.Text);
////Global.CheatList.Add(new Cheat(watch, int.Parse(RAMValue, NumberStyles.HexNumber)));
}
else if (GameGenie == false)
{

View File

@ -12,7 +12,7 @@ using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
namespace BizHawk.Client.EmuHawk
{
[ToolAttributes(false, null)]
[Tool(false, null)]
public partial class GenGameGenie : Form, IToolFormAutoConfig
{
#pragma warning disable 675

View File

@ -9,7 +9,7 @@ using System.Windows.Forms;
using BizHawk.Client.Common;
using System.Drawing.Imaging;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx64;
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
using BizHawk.Common;
namespace BizHawk.Client.EmuHawk

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using LuaInterface;
using NLua;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
@ -36,67 +36,63 @@ namespace BizHawk.Client.EmuHawk
public override string Name => "client";
[LuaMethodAttributes("exit", "Closes the emulator")]
[LuaMethod("exit", "Closes the emulator")]
public void CloseEmulator()
{
GlobalWin.MainForm.CloseEmulator();
}
[LuaMethodAttributes("exitCode", "Closes the emulator and returns the provided code")]
[LuaMethod("exitCode", "Closes the emulator and returns the provided code")]
public void CloseEmulatorWithCode(int exitCode)
{
GlobalWin.MainForm.CloseEmulator(exitCode);
}
[LuaMethodAttributes(
"borderheight", "Gets the current height in pixels of the letter/pillarbox area (top side only) around the emu display surface, excluding the gameExtraPadding you've set. This function (the whole lot of them) should be renamed or refactored since the padding areas have got more complex.")]
[LuaMethod("borderheight", "Gets the current height in pixels of the letter/pillarbox area (top side only) around the emu display surface, excluding the gameExtraPadding you've set. This function (the whole lot of them) should be renamed or refactored since the padding areas have got more complex.")]
public static int BorderHeight()
{
var point = new System.Drawing.Point(0, 0);
return GlobalWin.DisplayManager.TransformPoint(point).Y;
}
[LuaMethodAttributes(
"borderwidth", "Gets the current width in pixels of the letter/pillarbox area (left side only) around the emu display surface, excluding the gameExtraPadding you've set. This function (the whole lot of them) should be renamed or refactored since the padding areas have got more complex.")]
[LuaMethod("borderwidth", "Gets the current width in pixels of the letter/pillarbox area (left side only) around the emu display surface, excluding the gameExtraPadding you've set. This function (the whole lot of them) should be renamed or refactored since the padding areas have got more complex.")]
public static int BorderWidth()
{
var point = new System.Drawing.Point(0, 0);
return GlobalWin.DisplayManager.TransformPoint(point).X;
}
[LuaMethodAttributes(
"bufferheight", "Gets the visible height of the emu display surface (the core video output). This excludes the gameExtraPadding you've set.")]
[LuaMethod("bufferheight", "Gets the visible height of the emu display surface (the core video output). This excludes the gameExtraPadding you've set.")]
public int BufferHeight()
{
return VideoProvider.BufferHeight;
}
[LuaMethodAttributes(
"bufferwidth", "Gets the visible width of the emu display surface (the core video output). This excludes the gameExtraPadding you've set.")]
[LuaMethod("bufferwidth", "Gets the visible width of the emu display surface (the core video output). This excludes the gameExtraPadding you've set.")]
public int BufferWidth()
{
return VideoProvider.BufferWidth;
}
[LuaMethodAttributes("clearautohold", "Clears all autohold keys")]
[LuaMethod("clearautohold", "Clears all autohold keys")]
public void ClearAutohold()
{
GlobalWin.MainForm.ClearHolds();
}
[LuaMethodAttributes("closerom", "Closes the loaded Rom")]
[LuaMethod("closerom", "Closes the loaded Rom")]
public static void CloseRom()
{
GlobalWin.MainForm.CloseRom();
}
[LuaMethodAttributes("enablerewind", "Sets whether or not the rewind feature is enabled")]
[LuaMethod("enablerewind", "Sets whether or not the rewind feature is enabled")]
public void EnableRewind(bool enabled)
{
GlobalWin.MainForm.EnableRewind(enabled);
}
[LuaMethodAttributes("frameskip", "Sets the frame skip value of the client UI")]
[LuaMethod("frameskip", "Sets the frame skip value of the client UI")]
public void FrameSkip(int numFrames)
{
if (numFrames > 0)
@ -106,115 +102,115 @@ namespace BizHawk.Client.EmuHawk
}
else
{
ConsoleLuaLibrary.Log("Invalid frame skip value");
Log("Invalid frame skip value");
}
}
[LuaMethodAttributes("gettargetscanlineintensity", "Gets the current scanline intensity setting, used for the scanline display filter")]
[LuaMethod("gettargetscanlineintensity", "Gets the current scanline intensity setting, used for the scanline display filter")]
public static int GetTargetScanlineIntensity()
{
return Global.Config.TargetScanlineFilterIntensity;
}
[LuaMethodAttributes("getwindowsize", "Gets the main window's size Possible values are 1, 2, 3, 4, 5, and 10")]
[LuaMethod("getwindowsize", "Gets the main window's size Possible values are 1, 2, 3, 4, 5, and 10")]
public int GetWindowSize()
{
return Global.Config.TargetZoomFactors[Emulator.SystemId];
}
[LuaMethodAttributes("SetGameExtraPadding", "Sets the extra padding added to the 'emu' surface so that you can draw HUD elements in predictable placements")]
[LuaMethod("SetGameExtraPadding", "Sets the extra padding added to the 'emu' surface so that you can draw HUD elements in predictable placements")]
public static void SetGameExtraPadding(int left, int top, int right, int bottom)
{
GlobalWin.DisplayManager.GameExtraPadding = new System.Windows.Forms.Padding(left, top, right, bottom);
GlobalWin.MainForm.FrameBufferResized();
}
[LuaMethodAttributes("SetSoundOn", "Sets the state of the Sound On toggle")]
[LuaMethod("SetSoundOn", "Sets the state of the Sound On toggle")]
public static void SetSoundOn(bool enable)
{
Global.Config.SoundEnabled = enable;
}
[LuaMethodAttributes("GetSoundOn", "Gets the state of the Sound On toggle")]
[LuaMethod("GetSoundOn", "Gets the state of the Sound On toggle")]
public static bool GetSoundOn()
{
return Global.Config.SoundEnabled;
}
[LuaMethodAttributes("SetClientExtraPadding", "Sets the extra padding added to the 'native' surface so that you can draw HUD elements in predictable placements")]
[LuaMethod("SetClientExtraPadding", "Sets the extra padding added to the 'native' surface so that you can draw HUD elements in predictable placements")]
public static void SetClientExtraPadding(int left, int top, int right, int bottom)
{
GlobalWin.DisplayManager.ClientExtraPadding = new System.Windows.Forms.Padding(left, top, right, bottom);
GlobalWin.MainForm.FrameBufferResized();
}
[LuaMethodAttributes("ispaused", "Returns true if emulator is paused, otherwise, false")]
[LuaMethod("ispaused", "Returns true if emulator is paused, otherwise, false")]
public static bool IsPaused()
{
return GlobalWin.MainForm.EmulatorPaused;
}
[LuaMethodAttributes("opencheats", "opens the Cheats dialog")]
[LuaMethod("opencheats", "opens the Cheats dialog")]
public static void OpenCheats()
{
GlobalWin.Tools.Load<Cheats>();
}
[LuaMethodAttributes("openhexeditor", "opens the Hex Editor dialog")]
[LuaMethod("openhexeditor", "opens the Hex Editor dialog")]
public static void OpenHexEditor()
{
GlobalWin.Tools.Load<HexEditor>();
}
[LuaMethodAttributes("openramwatch", "opens the RAM Watch dialog")]
[LuaMethod("openramwatch", "opens the RAM Watch dialog")]
public static void OpenRamWatch()
{
GlobalWin.Tools.LoadRamWatch(loadDialog: true);
}
[LuaMethodAttributes("openramsearch", "opens the RAM Search dialog")]
[LuaMethod("openramsearch", "opens the RAM Search dialog")]
public static void OpenRamSearch()
{
GlobalWin.Tools.Load<RamSearch>();
}
[LuaMethodAttributes("openrom", "opens the Open ROM dialog")]
[LuaMethod("openrom", "opens the Open ROM dialog")]
public static void OpenRom(string path)
{
GlobalWin.MainForm.LoadRom(path, new MainForm.LoadRomArgs { OpenAdvanced = new OpenAdvanced_OpenRom() });
}
[LuaMethodAttributes("opentasstudio", "opens the TAStudio dialog")]
[LuaMethod("opentasstudio", "opens the TAStudio dialog")]
public static void OpenTasStudio()
{
GlobalWin.Tools.Load<TAStudio>();
}
[LuaMethodAttributes("opentoolbox", "opens the Toolbox Dialog")]
[LuaMethod("opentoolbox", "opens the Toolbox Dialog")]
public static void OpenToolBox()
{
GlobalWin.Tools.Load<ToolBox>();
}
[LuaMethodAttributes("opentracelogger", "opens the tracelogger if it is available for the given core")]
[LuaMethod("opentracelogger", "opens the tracelogger if it is available for the given core")]
public static void OpenTraceLogger()
{
GlobalWin.Tools.Load<TraceLogger>();
}
[LuaMethodAttributes("pause", "Pauses the emulator")]
[LuaMethod("pause", "Pauses the emulator")]
public static void Pause()
{
GlobalWin.MainForm.PauseEmulator();
}
[LuaMethodAttributes("pause_av", "If currently capturing Audio/Video, this will suspend the record. Frames will not be captured into the AV until client.unpause_av() is called")]
[LuaMethod("pause_av", "If currently capturing Audio/Video, this will suspend the record. Frames will not be captured into the AV until client.unpause_av() is called")]
public static void PauseAv()
{
GlobalWin.MainForm.PauseAvi = true;
}
[LuaMethodAttributes("reboot_core", "Reboots the currently loaded core")]
[LuaMethod("reboot_core", "Reboots the currently loaded core")]
public static void RebootCore()
{
((LuaConsole)GlobalWin.Tools.Get<LuaConsole>()).LuaImp.IsRebootingCore = true;
@ -222,13 +218,13 @@ namespace BizHawk.Client.EmuHawk
((LuaConsole)GlobalWin.Tools.Get<LuaConsole>()).LuaImp.IsRebootingCore = false;
}
[LuaMethodAttributes("screenheight", "Gets the current height in pixels of the emulator's drawing area")]
[LuaMethod("screenheight", "Gets the current height in pixels of the emulator's drawing area")]
public static int ScreenHeight()
{
return GlobalWin.MainForm.PresentationPanel.NativeSize.Height;
}
[LuaMethodAttributes("screenshot", "if a parameter is passed it will function as the Screenshot As menu item of EmuHawk, else it will function as the Screenshot menu item")]
[LuaMethod("screenshot", "if a parameter is passed it will function as the Screenshot As menu item of EmuHawk, else it will function as the Screenshot menu item")]
public static void Screenshot(string path = null)
{
if (path == null)
@ -241,31 +237,31 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("screenshottoclipboard", "Performs the same function as EmuHawk's Screenshot To Clipboard menu item")]
[LuaMethod("screenshottoclipboard", "Performs the same function as EmuHawk's Screenshot To Clipboard menu item")]
public static void ScreenshotToClipboard()
{
GlobalWin.MainForm.TakeScreenshotToClipboard();
}
[LuaMethodAttributes("settargetscanlineintensity", "Sets the current scanline intensity setting, used for the scanline display filter")]
[LuaMethod("settargetscanlineintensity", "Sets the current scanline intensity setting, used for the scanline display filter")]
public static void SetTargetScanlineIntensity(int val)
{
Global.Config.TargetScanlineFilterIntensity = val;
}
[LuaMethodAttributes("setscreenshotosd", "Sets the screenshot Capture OSD property of the client")]
[LuaMethod("setscreenshotosd", "Sets the screenshot Capture OSD property of the client")]
public static void SetScreenshotOSD(bool value)
{
Global.Config.Screenshot_CaptureOSD = value;
}
[LuaMethodAttributes("screenwidth", "Gets the current width in pixels of the emulator's drawing area")]
[LuaMethod("screenwidth", "Gets the current width in pixels of the emulator's drawing area")]
public static int ScreenWidth()
{
return GlobalWin.MainForm.PresentationPanel.NativeSize.Width;
}
[LuaMethodAttributes("setwindowsize", "Sets the main window's size to the give value. Accepted values are 1, 2, 3, 4, 5, and 10")]
[LuaMethod("setwindowsize", "Sets the main window's size to the give value. Accepted values are 1, 2, 3, 4, 5, and 10")]
public void SetWindowSize(int size)
{
if (size == 1 || size == 2 || size == 3 || size == 4 || size == 5 || size == 10)
@ -280,7 +276,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("speedmode", "Sets the speed of the emulator (in terms of percent)")]
[LuaMethod("speedmode", "Sets the speed of the emulator (in terms of percent)")]
public void SpeedMode(int percent)
{
if (percent > 0 && percent < 6400)
@ -293,51 +289,51 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("togglepause", "Toggles the current pause state")]
[LuaMethod("togglepause", "Toggles the current pause state")]
public static void TogglePause()
{
GlobalWin.MainForm.TogglePause();
}
[LuaMethodAttributes("transformPointX", "Transforms an x-coordinate in emulator space to an x-coordinate in client space")]
[LuaMethod("transformPointX", "Transforms an x-coordinate in emulator space to an x-coordinate in client space")]
public static int TransformPointX(int x)
{
var point = new System.Drawing.Point(x, 0);
return GlobalWin.DisplayManager.TransformPoint(point).X;
}
[LuaMethodAttributes("transformPointY", "Transforms an y-coordinate in emulator space to an y-coordinate in client space")]
[LuaMethod("transformPointY", "Transforms an y-coordinate in emulator space to an y-coordinate in client space")]
public static int TransformPointY(int y)
{
var point = new System.Drawing.Point(0, y);
return GlobalWin.DisplayManager.TransformPoint(point).Y;
}
[LuaMethodAttributes("unpause", "Unpauses the emulator")]
[LuaMethod("unpause", "Unpauses the emulator")]
public static void Unpause()
{
GlobalWin.MainForm.UnpauseEmulator();
}
[LuaMethodAttributes("unpause_av", "If currently capturing Audio/Video this resumes capturing")]
[LuaMethod("unpause_av", "If currently capturing Audio/Video this resumes capturing")]
public static void UnpauseAv()
{
GlobalWin.MainForm.PauseAvi = false;
}
[LuaMethodAttributes("xpos", "Returns the x value of the screen position where the client currently sits")]
[LuaMethod("xpos", "Returns the x value of the screen position where the client currently sits")]
public static int Xpos()
{
return GlobalWin.MainForm.DesktopLocation.X;
}
[LuaMethodAttributes("ypos", "Returns the y value of the screen position where the client currently sits")]
[LuaMethod("ypos", "Returns the y value of the screen position where the client currently sits")]
public static int Ypos()
{
return GlobalWin.MainForm.DesktopLocation.Y;
}
[LuaMethodAttributes("getavailabletools", "Returns a list of the tools currently open")]
[LuaMethod("getavailabletools", "Returns a list of the tools currently open")]
public LuaTable GetAvailableTools()
{
var t = Lua.NewTable();
@ -350,8 +346,7 @@ namespace BizHawk.Client.EmuHawk
return t;
}
[LuaMethodAttributes(
"gettool", "Returns an object that represents a tool of the given name (not case sensitive). If the tool is not open, it will be loaded if available. Use gettools to get a list of names")]
[LuaMethod("gettool", "Returns an object that represents a tool of the given name (not case sensitive). If the tool is not open, it will be loaded if available. Use gettools to get a list of names")]
public LuaTable GetTool(string name)
{
var toolType = ReflectionUtil.GetTypeByName(name)
@ -373,8 +368,7 @@ namespace BizHawk.Client.EmuHawk
return null;
}
[LuaMethodAttributes(
"createinstance", "returns a default instance of the given type of object if it exists (not case sensitive). Note: This will only work on objects which have a parameterless constructor. If no suitable type is found, or the type does not have a parameterless constructor, then nil is returned")]
[LuaMethod("createinstance", "returns a default instance of the given type of object if it exists (not case sensitive). Note: This will only work on objects which have a parameterless constructor. If no suitable type is found, or the type does not have a parameterless constructor, then nil is returned")]
public LuaTable CreateInstance(string name)
{
var possibleTypes = ReflectionUtil.GetTypeByName(name);
@ -388,13 +382,13 @@ namespace BizHawk.Client.EmuHawk
return null;
}
[LuaMethodAttributes("displaymessages", "sets whether or not on screen messages will display")]
[LuaMethod("displaymessages", "sets whether or not on screen messages will display")]
public void DisplayMessages(bool value)
{
Global.Config.DisplayMessages = value;
}
[LuaMethodAttributes("saveram", "flushes save ram to disk")]
[LuaMethod("saveram", "flushes save ram to disk")]
public void SaveRam()
{
GlobalWin.MainForm.FlushSaveRAM();

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using BizHawk.Client.Common;
using LuaInterface;
using NLua;
namespace BizHawk.Client.EmuHawk
{
@ -18,7 +18,7 @@ namespace BizHawk.Client.EmuHawk
public override string Name => "console";
[LuaMethodAttributes("clear", "clears the output box of the Lua Console window")]
[LuaMethod("clear", "clears the output box of the Lua Console window")]
public static void Clear()
{
if (GlobalWin.Tools.Has<LuaConsole>())
@ -27,7 +27,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("getluafunctionslist", "returns a list of implemented functions")]
[LuaMethod("getluafunctionslist", "returns a list of implemented functions")]
public static string GetLuaFunctionsList()
{
var list = new StringBuilder();
@ -39,7 +39,7 @@ namespace BizHawk.Client.EmuHawk
return list.ToString();
}
[LuaMethodAttributes("log", "Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable")]
[LuaMethod("log", "Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable")]
public static void Log(params object[] outputs)
{
if (GlobalWin.Tools.Has<LuaConsole>())
@ -57,7 +57,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("writeline", "Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable")]
[LuaMethod("writeline", "Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable")]
public static void WriteLine(params object[] outputs)
{
if (GlobalWin.Tools.Has<LuaConsole>())
@ -66,7 +66,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("write", "Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable")]
[LuaMethod("write", "Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable")]
public static void Write(params object[] outputs)
{
LogWithSeparator("", "", outputs);

View File

@ -6,8 +6,7 @@ using System.Linq;
using System.Windows.Forms;
using BizHawk.Client.Common;
using LuaInterface;
using System.IO;
using NLua;
namespace BizHawk.Client.EmuHawk
{
@ -62,7 +61,7 @@ namespace BizHawk.Client.EmuHawk
#endregion
[LuaMethodAttributes("addclick", "adds the given lua function as a click event to the given control")]
[LuaMethod("addclick", "adds the given lua function as a click event to the given control")]
public void AddClick(int handle, LuaFunction clickEvent)
{
var ptr = new IntPtr(handle);
@ -78,8 +77,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"button", "Creates a button control on the given form. The caption property will be the text value on the button. clickEvent is the name of a Lua function that will be invoked when the button is clicked. x, and y are the optional location parameters for the position of the button within the given form. The function returns the handle of the created button. Width and Height are optional, if not specified they will be a default size")]
[LuaMethod("button", "Creates a button control on the given form. The caption property will be the text value on the button. clickEvent is the name of a Lua function that will be invoked when the button is clicked. x, and y are the optional location parameters for the position of the button within the given form. The function returns the handle of the created button. Width and Height are optional, if not specified they will be a default size")]
public int Button(
int formHandle,
string caption,
@ -113,8 +111,7 @@ namespace BizHawk.Client.EmuHawk
return (int)button.Handle;
}
[LuaMethodAttributes(
"checkbox", "Creates a checkbox control on the given form. The caption property will be the text of the checkbox. x and y are the optional location parameters for the position of the checkbox within the form")]
[LuaMethod("checkbox", "Creates a checkbox control on the given form. The caption property will be the text of the checkbox. x and y are the optional location parameters for the position of the checkbox within the form")]
public int Checkbox(int formHandle, string caption, int? x = null, int? y = null)
{
var form = GetForm(formHandle);
@ -135,7 +132,7 @@ namespace BizHawk.Client.EmuHawk
return (int)checkbox.Handle;
}
[LuaMethodAttributes("clearclicks", "Removes all click events from the given widget at the specified handle")]
[LuaMethod("clearclicks", "Removes all click events from the given widget at the specified handle")]
public void ClearClicks(int handle)
{
var ptr = new IntPtr(handle);
@ -155,7 +152,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("destroy", "Closes and removes a Lua created form with the specified handle. If a dialog was found and removed true is returned, else false")]
[LuaMethod("destroy", "Closes and removes a Lua created form with the specified handle. If a dialog was found and removed true is returned, else false")]
public bool Destroy(int handle)
{
var ptr = new IntPtr(handle);
@ -172,7 +169,7 @@ namespace BizHawk.Client.EmuHawk
return false;
}
[LuaMethodAttributes("destroyall", "Closes and removes all Lua created dialogs")]
[LuaMethod("destroyall", "Closes and removes all Lua created dialogs")]
public void DestroyAll()
{
for (var i = _luaForms.Count - 1; i >= 0; i--)
@ -181,8 +178,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"dropdown", "Creates a dropdown (with a ComboBoxStyle of DropDownList) control on the given form. Dropdown items are passed via a lua table. Only the values will be pulled for the dropdown items, the keys are irrelevant. Items will be sorted alphabetically. x and y are the optional location parameters, and width and height are the optional size parameters.")]
[LuaMethod("dropdown", "Creates a dropdown (with a ComboBoxStyle of DropDownList) control on the given form. Dropdown items are passed via a lua table. Only the values will be pulled for the dropdown items, the keys are irrelevant. Items will be sorted alphabetically. x and y are the optional location parameters, and width and height are the optional size parameters.")]
public int Dropdown(
int formHandle,
LuaTable items,
@ -216,7 +212,7 @@ namespace BizHawk.Client.EmuHawk
return (int)dropdown.Handle;
}
[LuaMethodAttributes("getproperty", "returns a string representation of the value of a property of the widget at the given handle")]
[LuaMethod("getproperty", "returns a string representation of the value of a property of the widget at the given handle")]
public string GetProperty(int handle, string property)
{
try
@ -240,13 +236,13 @@ namespace BizHawk.Client.EmuHawk
}
catch (Exception ex)
{
ConsoleLuaLibrary.Log(ex.Message);
Log(ex.Message);
}
return "";
}
[LuaMethodAttributes("gettext", "Returns the text property of a given form or control")]
[LuaMethod("gettext", "Returns the text property of a given form or control")]
public string GetText(int handle)
{
try
@ -275,13 +271,13 @@ namespace BizHawk.Client.EmuHawk
}
catch (Exception ex)
{
ConsoleLuaLibrary.Log(ex.Message);
Log(ex.Message);
}
return "";
}
[LuaMethodAttributes("ischecked", "Returns the given checkbox's checked property")]
[LuaMethod("ischecked", "Returns the given checkbox's checked property")]
public bool IsChecked(int handle)
{
var ptr = new IntPtr(handle);
@ -309,8 +305,7 @@ namespace BizHawk.Client.EmuHawk
return false;
}
[LuaMethodAttributes(
"label", "Creates a label control on the given form. The caption property is the text of the label. x, and y are the optional location parameters for the position of the label within the given form. The function returns the handle of the created label. Width and Height are optional, if not specified they will be a default size.")]
[LuaMethod("label", "Creates a label control on the given form. The caption property is the text of the label. x, and y are the optional location parameters for the position of the label within the given form. The function returns the handle of the created label. Width and Height are optional, if not specified they will be a default size.")]
public int Label(
int formHandle,
string caption,
@ -348,8 +343,7 @@ namespace BizHawk.Client.EmuHawk
return (int)label.Handle;
}
[LuaMethodAttributes(
"newform", "creates a new default dialog, if both width and height are specified it will create a dialog of the specified size. If title is specified it will be the caption of the dialog, else the dialog caption will be 'Lua Dialog'. The function will return an int representing the handle of the dialog created.")]
[LuaMethod("newform", "creates a new default dialog, if both width and height are specified it will create a dialog of the specified size. If title is specified it will be the caption of the dialog, else the dialog caption will be 'Lua Dialog'. The function will return an int representing the handle of the dialog created.")]
public int NewForm(int? width = null, int? height = null, string title = null, LuaFunction onClose = null)
{
var form = new LuaWinform(CurrentThread);
@ -383,8 +377,7 @@ namespace BizHawk.Client.EmuHawk
return (int)form.Handle;
}
[LuaMethodAttributes(
"openfile", "Creates a standard openfile dialog with optional parameters for the filename, directory, and filter. The return value is the directory that the user picked. If they chose to cancel, it will return an empty string")]
[LuaMethod("openfile", "Creates a standard openfile dialog with optional parameters for the filename, directory, and filter. The return value is the directory that the user picked. If they chose to cancel, it will return an empty string")]
public string OpenFile(string fileName = null, string initialDirectory = null, string filter = "All files (*.*)|*.*")
{
// filterext format ex: "Image Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*"
@ -1207,7 +1200,7 @@ namespace BizHawk.Client.EmuHawk
#endregion
[LuaMethodAttributes("setdropdownitems", "Sets the items for a given dropdown box")]
[LuaMethod("setdropdownitems", "Sets the items for a given dropdown box")]
public void SetDropdownItems(int handle, LuaTable items)
{
try
@ -1242,7 +1235,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("setlocation", "Sets the location of a control or form by passing in the handle of the created object")]
[LuaMethod("setlocation", "Sets the location of a control or form by passing in the handle of the created object")]
public void SetLocation(int handle, int x, int y)
{
var ptr = new IntPtr(handle);
@ -1265,7 +1258,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("setproperty", "Attempts to set the given property of the widget with the given value. Note: not all properties will be able to be represented for the control to accept")]
[LuaMethod("setproperty", "Attempts to set the given property of the widget with the given value. Note: not all properties will be able to be represented for the control to accept")]
public void SetProperty(int handle, string property, object value)
{
var ptr = new IntPtr(handle);
@ -1320,13 +1313,13 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("createcolor", "Creates a color object useful with setproperty")]
[LuaMethod("createcolor", "Creates a color object useful with setproperty")]
public Color CreateColor(int r, int g, int b, int a)
{
return Color.FromArgb(a, r, g, b);
}
[LuaMethodAttributes("setsize", "TODO")]
[LuaMethod("setsize", "Sets the size of the form or control to the given width or height")]
public void SetSize(int handle, int width, int height)
{
var ptr = new IntPtr(handle);
@ -1349,7 +1342,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("settext", "Sets the text property of a control or form by passing in the handle of the created object")]
[LuaMethod("settext", "Sets the text property of a control or form by passing in the handle of the created object")]
public void Settext(int handle, string caption)
{
var ptr = new IntPtr(handle);
@ -1372,8 +1365,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"textbox", "Creates a textbox control on the given form. The caption property will be the initial value of the textbox (default is empty). Width and Height are option, if not specified they will be a default size of 100, 20. Type is an optional property to restrict the textbox input. The available options are HEX, SIGNED, and UNSIGNED. Passing it null or any other value will set it to no restriction. x, and y are the optional location parameters for the position of the textbox within the given form. The function returns the handle of the created textbox. If true, the multiline will enable the standard winform multi-line property. If true, the fixedWidth options will create a fixed width font. Scrollbars is an optional property to specify which scrollbars to display. The available options are Vertical, Horizontal, Both, and None. Scrollbars are only shown on a multiline textbox")]
[LuaMethod("textbox", "Creates a textbox control on the given form. The caption property will be the initial value of the textbox (default is empty). Width and Height are option, if not specified they will be a default size of 100, 20. Type is an optional property to restrict the textbox input. The available options are HEX, SIGNED, and UNSIGNED. Passing it null or any other value will set it to no restriction. x, and y are the optional location parameters for the position of the textbox within the given form. The function returns the handle of the created textbox. If true, the multiline will enable the standard winform multi-line property. If true, the fixedWidth options will create a fixed width font. Scrollbars is an optional property to specify which scrollbars to display. The available options are Vertical, Horizontal, Both, and None. Scrollbars are only shown on a multiline textbox")]
public int Textbox(
int formHandle,
string caption = null,

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using LuaInterface;
using NLua;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
@ -45,8 +45,7 @@ namespace BizHawk.Client.EmuHawk
public bool SurfaceIsNull => _luaSurface == null;
[LuaMethodAttributes(
"DrawNew", "Changes drawing target to the specified lua surface name. This may clobber any previous drawing to this surface (pass false if you don't want it to)")]
[LuaMethod("DrawNew", "Changes drawing target to the specified lua surface name. This may clobber any previous drawing to this surface (pass false if you don't want it to)")]
public void DrawNew(string name, bool? clear = true)
{
try
@ -60,7 +59,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("DrawFinish", "Finishes drawing to the current lua surface and causes it to get displayed.")]
[LuaMethod("DrawFinish", "Finishes drawing to the current lua surface and causes it to get displayed.")]
public void DrawFinish()
{
if (_luaSurface != null)
@ -127,45 +126,44 @@ namespace BizHawk.Client.EmuHawk
#endregion
[LuaMethodAttributes("addmessage", "Adds a message to the OSD's message area")]
[LuaMethod("addmessage", "Adds a message to the OSD's message area")]
public void AddMessage(string message)
{
GlobalWin.OSD.AddMessage(message);
}
[LuaMethodAttributes("clearGraphics", "clears all lua drawn graphics from the screen")]
[LuaMethod("clearGraphics", "clears all lua drawn graphics from the screen")]
public void ClearGraphics()
{
_luaSurface.Clear();
DrawFinish();
}
[LuaMethodAttributes("cleartext", "clears all text created by gui.text()")]
[LuaMethod("cleartext", "clears all text created by gui.text()")]
public static void ClearText()
{
GlobalWin.OSD.ClearGUIText();
}
[LuaMethodAttributes("defaultForeground", "Sets the default foreground color to use in drawing methods, white by default")]
[LuaMethod("defaultForeground", "Sets the default foreground color to use in drawing methods, white by default")]
public void SetDefaultForegroundColor(Color color)
{
_defaultForeground = color;
}
[LuaMethodAttributes("defaultBackground", "Sets the default background color to use in drawing methods, transparent by default")]
[LuaMethod("defaultBackground", "Sets the default background color to use in drawing methods, transparent by default")]
public void SetDefaultBackgroundColor(Color color)
{
_defaultBackground = color;
}
[LuaMethodAttributes("defaultTextBackground", "Sets the default backgroiund color to use in text drawing methods, half-transparent black by default")]
[LuaMethod("defaultTextBackground", "Sets the default backgroiund color to use in text drawing methods, half-transparent black by default")]
public void SetDefaultTextBackground(Color color)
{
_defaultTextBackground = color;
}
[LuaMethodAttributes(
"defaultPixelFont", "Sets the default font to use in gui.pixelText(). Two font families are available, \"fceux\" and \"gens\" (or \"0\" and \"1\" respectively), \"gens\" is used by default")]
[LuaMethod("defaultPixelFont", "Sets the default font to use in gui.pixelText(). Two font families are available, \"fceux\" and \"gens\" (or \"0\" and \"1\" respectively), \"gens\" is used by default")]
public void SetDefaultTextBackground(string fontfamily)
{
switch (fontfamily)
@ -184,7 +182,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("drawBezier", "Draws a Bezier curve using the table of coordinates provided in the given color")]
[LuaMethod("drawBezier", "Draws a Bezier curve using the table of coordinates provided in the given color")]
public void DrawBezier(LuaTable points, Color color)
{
using (var g = GetGraphics())
@ -213,8 +211,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"drawBox", "Draws a rectangle on screen from x1/y1 to x2/y2. Same as drawRectangle except it receives two points intead of a point and width/height")]
[LuaMethod("drawBox", "Draws a rectangle on screen from x1/y1 to x2/y2. Same as drawRectangle except it receives two points intead of a point and width/height")]
public void DrawBox(int x, int y, int x2, int y2, Color? line = null, Color? background = null)
{
using (var g = GetGraphics())
@ -257,8 +254,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"drawEllipse", "Draws an ellipse at the given coordinates and the given width and height. Line is the color of the ellipse. Background is the optional fill color")]
[LuaMethod("drawEllipse", "Draws an ellipse at the given coordinates and the given width and height. Line is the color of the ellipse. Background is the optional fill color")]
public void DrawEllipse(int x, int y, int width, int height, Color? line = null, Color? background = null)
{
using (var g = GetGraphics())
@ -282,8 +278,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"drawIcon", "draws an Icon (.ico) file from the given path at the given coordinate. width and height are optional. If specified, it will resize the image accordingly")]
[LuaMethod("drawIcon", "draws an Icon (.ico) file from the given path at the given coordinate. width and height are optional. If specified, it will resize the image accordingly")]
public void DrawIcon(string path, int x, int y, int? width = null, int? height = null)
{
using (var g = GetGraphics())
@ -309,8 +304,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"drawImage", "draws an image file from the given path at the given coordinate. width and height are optional. If specified, it will resize the image accordingly")]
[LuaMethod("drawImage", "draws an image file from the given path at the given coordinate. width and height are optional. If specified, it will resize the image accordingly")]
public void DrawImage(string path, int x, int y, int? width = null, int? height = null, bool cache = true)
{
if (!File.Exists(path))
@ -339,8 +333,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"clearImageCache", "clears the image cache that is built up by using gui.drawImage, also releases the file handle for cached images")]
[LuaMethod("clearImageCache", "clears the image cache that is built up by using gui.drawImage, also releases the file handle for cached images")]
public void ClearImageCache()
{
foreach (var image in _imageCache)
@ -351,8 +344,7 @@ namespace BizHawk.Client.EmuHawk
_imageCache.Clear();
}
[LuaMethodAttributes(
"drawImageRegion", "draws a given region of an image file from the given path at the given coordinate, and optionally with the given size")]
[LuaMethod("drawImageRegion", "draws a given region of an image file from the given path at the given coordinate, and optionally with the given size")]
public void DrawImageRegion(string path, int source_x, int source_y, int source_width, int source_height, int dest_x, int dest_y, int? dest_width = null, int? dest_height = null)
{
if (!File.Exists(path))
@ -380,8 +372,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"drawLine", "Draws a line from the first coordinate pair to the 2nd. Color is optional (if not specified it will be drawn black)")]
[LuaMethod("drawLine", "Draws a line from the first coordinate pair to the 2nd. Color is optional (if not specified it will be drawn black)")]
public void DrawLine(int x1, int y1, int x2, int y2, Color? color = null)
{
using (var g = GetGraphics())
@ -390,14 +381,14 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("drawAxis", "Draws an axis of the specified size at the coordinate pair.)")]
[LuaMethod("drawAxis", "Draws an axis of the specified size at the coordinate pair.)")]
public void DrawAxis(int x, int y, int size, Color? color = null)
{
DrawLine(x + size, y, x - size, y, color);
DrawLine(x, y + size, x, y - size, color);
}
[LuaMethodAttributes("drawPie", "draws a Pie shape at the given coordinates and the given width and height")]
[LuaMethod("drawPie", "draws a Pie shape at the given coordinates and the given width and height")]
public void DrawPie(
int x,
int y,
@ -421,8 +412,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"drawPixel", "Draws a single pixel at the given coordinates in the given color. Color is optional (if not specified it will be drawn black)")]
[LuaMethod("drawPixel", "Draws a single pixel at the given coordinates in the given color. Color is optional (if not specified it will be drawn black)")]
public void DrawPixel(int x, int y, Color? color = null)
{
using (var g = GetGraphics())
@ -438,8 +428,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"drawPolygon", "Draws a polygon using the table of coordinates specified in points. This should be a table of tables(each of size 2). Line is the color of the polygon. Background is the optional fill color")]
[LuaMethod("drawPolygon", "Draws a polygon using the table of coordinates specified in points. This should be a table of tables(each of size 2). Line is the color of the polygon. Background is the optional fill color")]
public void DrawPolygon(LuaTable points, Color? line = null, Color? background = null)
{
using (var g = GetGraphics())
@ -468,8 +457,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"drawRectangle", "Draws a rectangle at the given coordinate and the given width and height. Line is the color of the box. Background is the optional fill color")]
[LuaMethod("drawRectangle", "Draws a rectangle at the given coordinate and the given width and height. Line is the color of the box. Background is the optional fill color")]
public void DrawRectangle(int x, int y, int width, int height, Color? line = null, Color? background = null)
{
using (var g = GetGraphics())
@ -483,7 +471,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("drawString", "Alias of gui.drawText()")]
[LuaMethod("drawString", "Alias of gui.drawText()")]
public void DrawString(
int x,
int y,
@ -499,8 +487,7 @@ namespace BizHawk.Client.EmuHawk
DrawText(x, y, message, forecolor, backcolor, fontsize, fontfamily, fontstyle, horizalign, vertalign);
}
[LuaMethodAttributes(
"drawText", "Draws the given message in the emulator screen space (like all draw functions) at the given x,y coordinates and the given color. The default color is white. A fontfamily can be specified and is monospace generic if none is specified (font family options are the same as the .NET FontFamily class). The fontsize default is 12. The default font style is regular. Font style options are regular, bold, italic, strikethrough, underline. Horizontal alignment options are left (default), center, or right. Vertical alignment options are bottom (default), middle, or top. Alignment options specify which ends of the text will be drawn at the x and y coordinates.")]
[LuaMethod("drawText", "Draws the given message in the emulator screen space (like all draw functions) at the given x,y coordinates and the given color. The default color is white. A fontfamily can be specified and is monospace generic if none is specified (font family options are the same as the .NET FontFamily class). The fontsize default is 12. The default font style is regular. Font style options are regular, bold, italic, strikethrough, underline. Horizontal alignment options are left (default), center, or right. Vertical alignment options are bottom (default), middle, or top. Alignment options specify which ends of the text will be drawn at the x and y coordinates.")]
public void DrawText(
int x,
int y,
@ -595,9 +582,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"pixelText",
"Draws the given message in the emulator screen space (like all draw functions) at the given x,y coordinates and the given color. The default color is white. Two font families are available, \"fceux\" and \"gens\" (or \"0\" and \"1\" respectively), both are monospace and have the same size as in the emulaors they've been taken from. If no font family is specified, it uses \"gens\" font, unless that's overridden via gui.defaultPixelFont()")]
[LuaMethod("pixelText", "Draws the given message in the emulator screen space (like all draw functions) at the given x,y coordinates and the given color. The default color is white. Two font families are available, \"fceux\" and \"gens\" (or \"0\" and \"1\" respectively), both are monospace and have the same size as in the emulaors they've been taken from. If no font family is specified, it uses \"gens\" font, unless that's overridden via gui.defaultPixelFont()")]
public void DrawText(
int x,
int y,
@ -651,8 +636,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"text", "Displays the given text on the screen at the given coordinates. Optional Foreground color. The optional anchor flag anchors the text to one of the four corners. Anchor flag parameters: topleft, topright, bottomleft, bottomright")]
[LuaMethod("text", "Displays the given text on the screen at the given coordinates. Optional Foreground color. The optional anchor flag anchors the text to one of the four corners. Anchor flag parameters: topleft, topright, bottomleft, bottomright")]
public void Text(
int x,
int y,
@ -693,6 +677,7 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.OSD.AddGUIText(message, x, y, Color.Black, forecolor ?? Color.White, a);
}
[LuaMethodAttributes("createcanvas", "Creates a canvas of the given size and, if specified, the given coordinates.")]
public LuaTable Text(int width, int height, int? x = null, int? y = null)
{

View File

@ -3,7 +3,7 @@ using System.Linq;
using System.Windows.Forms;
using BizHawk.Client.Common;
using LuaInterface;
using NLua;
namespace BizHawk.Client.EmuHawk
{
@ -17,8 +17,7 @@ namespace BizHawk.Client.EmuHawk
public override string Name => "input";
[LuaMethodAttributes(
"get", "Returns a lua table of all the buttons the user is currently pressing on their keyboard and gamepads\nAll buttons that are pressed have their key values set to true; all others remain nil.")]
[LuaMethod("get", "Returns a lua table of all the buttons the user is currently pressing on their keyboard and gamepads\nAll buttons that are pressed have their key values set to true; all others remain nil.")]
public LuaTable Get()
{
var buttons = Lua.NewTable();
@ -30,8 +29,7 @@ namespace BizHawk.Client.EmuHawk
return buttons;
}
[LuaMethodAttributes(
"getmouse", "Returns a lua table of the mouse X/Y coordinates and button states. Table keys are X, Y, Left, Middle, Right, XButton1, XButton2, Wheel.")]
[LuaMethod("getmouse", "Returns a lua table of the mouse X/Y coordinates and button states. Table keys are X, Y, Left, Middle, Right, XButton1, XButton2, Wheel.")]
public LuaTable GetMouse()
{
var buttons = Lua.NewTable();

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.IO;
using LuaInterface;
using NLua;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
@ -17,7 +17,7 @@ namespace BizHawk.Client.EmuHawk
public override string Name => "savestate";
[LuaMethodAttributes("load", "Loads a savestate with the given path")]
[LuaMethod("load", "Loads a savestate with the given path")]
public void Load(string path)
{
if (!File.Exists(path))
@ -30,7 +30,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("loadslot", "Loads the savestate at the given slot number (must be an integer between 0 and 9)")]
[LuaMethod("loadslot", "Loads the savestate at the given slot number (must be an integer between 0 and 9)")]
public void LoadSlot(int slotNum)
{
if (slotNum >= 0 && slotNum <= 9)
@ -39,13 +39,13 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("save", "Saves a state at the given path")]
[LuaMethod("save", "Saves a state at the given path")]
public void Save(string path)
{
GlobalWin.MainForm.SaveState(path, path, true);
}
[LuaMethodAttributes("saveslot", "Saves a state at the given save slot (must be an integer between 0 and 9)")]
[LuaMethod("saveslot", "Saves a state at the given save slot (must be an integer between 0 and 9)")]
public void SaveSlot(int slotNum)
{
if (slotNum >= 0 && slotNum <= 9)

View File

@ -2,13 +2,13 @@
using System.ComponentModel;
using System.Drawing;
using LuaInterface;
using NLua;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
[Description("A library for manipulating the Tastudio dialog of the EmuHawk client")]
[LuaLibraryAttributes(released: true)]
[LuaLibrary(released: true)]
public sealed class TastudioLuaLibrary : LuaLibraryBase
{
public TastudioLuaLibrary(Lua lua)
@ -21,19 +21,19 @@ namespace BizHawk.Client.EmuHawk
private TAStudio Tastudio => GlobalWin.Tools.Get<TAStudio>() as TAStudio;
[LuaMethodAttributes("engaged", "returns whether or not tastudio is currently engaged (active)")]
[LuaMethod("engaged", "returns whether or not tastudio is currently engaged (active)")]
public bool Engaged()
{
return GlobalWin.Tools.Has<TAStudio>(); // TODO: eventually tastudio should have an engaged flag
}
[LuaMethodAttributes("getrecording", "returns whether or not TAStudio is in recording mode")]
[LuaMethod("getrecording", "returns whether or not TAStudio is in recording mode")]
public bool GetRecording()
{
return Tastudio.TasPlaybackBox.RecordingMode;
}
[LuaMethodAttributes("setrecording", "sets the recording mode on/off depending on the parameter")]
[LuaMethod("setrecording", "sets the recording mode on/off depending on the parameter")]
public void SetRecording(bool val)
{
if (Tastudio.TasPlaybackBox.RecordingMode != val)
@ -42,13 +42,13 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("togglerecording", "toggles tastudio recording mode on/off depending on its current state")]
[LuaMethod("togglerecording", "toggles tastudio recording mode on/off depending on its current state")]
public void SetRecording()
{
Tastudio.ToggleReadOnly();
}
[LuaMethodAttributes("setbranchtext", "adds the given message to the existing branch, or to the branch that will be created next if branch index is not specified")]
[LuaMethod("setbranchtext", "adds the given message to the existing branch, or to the branch that will be created next if branch index is not specified")]
public void SetBranchText(string text, int? index = null)
{
if (index != null)
@ -61,7 +61,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("getmarker", "returns the marker text at the given frame, or an empty string if there is no marker for the given frame")]
[LuaMethod("getmarker", "returns the marker text at the given frame, or an empty string if there is no marker for the given frame")]
public string GetMarker(int frame)
{
if (Engaged())
@ -76,7 +76,7 @@ namespace BizHawk.Client.EmuHawk
return "";
}
[LuaMethodAttributes("removemarker", "if there is a marker for the given frame, it will be removed")]
[LuaMethod("removemarker", "if there is a marker for the given frame, it will be removed")]
public void RemoveMarker(int frame)
{
if (Engaged())
@ -90,7 +90,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("setmarker", "Adds or sets a marker at the given frame, with an optional message")]
[LuaMethod("setmarker", "Adds or sets a marker at the given frame, with an optional message")]
public void SetMarker(int frame, string message = null)
{
if (Engaged())
@ -108,7 +108,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("islag", "Returns whether or not the given frame was a lag frame, null if unknown")]
[LuaMethod("islag", "Returns whether or not the given frame was a lag frame, null if unknown")]
public bool? IsLag(int frame)
{
if (Engaged())
@ -122,7 +122,7 @@ namespace BizHawk.Client.EmuHawk
return null;
}
[LuaMethodAttributes("setlag", "Sets the lag information for the given frame, if the frame does not exist in the lag log, it will be added. If the value is null, the lag information for that frame will be removed")]
[LuaMethod("setlag", "Sets the lag information for the given frame, if the frame does not exist in the lag log, it will be added. If the value is null, the lag information for that frame will be removed")]
public void SetLag(int frame, bool? value)
{
if (Engaged())
@ -131,7 +131,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("hasstate", "Returns whether or not the given frame has a savestate associated with it")]
[LuaMethod("hasstate", "Returns whether or not the given frame has a savestate associated with it")]
public bool HasState(int frame)
{
if (Engaged())
@ -145,7 +145,7 @@ namespace BizHawk.Client.EmuHawk
return false;
}
[LuaMethodAttributes("setplayback", "Seeks the given frame (a number) or marker (a string)")]
[LuaMethod("setplayback", "Seeks the given frame (a number) or marker (a string)")]
public void SetPlayback(object frame)
{
if (Engaged())
@ -173,8 +173,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"onqueryitembg", "called during the background draw event of the tastudio listview. luaf must be a function that takes 2 params: index, column. The first is the integer row index of the listview, and the 2nd is the string column name. luaf should return a value that can be parsed into a .NET Color object (string color name, or integer value)")]
[LuaMethod("onqueryitembg", "called during the background draw event of the tastudio listview. luaf must be a function that takes 2 params: index, column. The first is the integer row index of the listview, and the 2nd is the string column name. luaf should return a value that can be parsed into a .NET Color object (string color name, or integer value)")]
public void OnQueryItemBg(LuaFunction luaf)
{
if (Engaged())
@ -194,8 +193,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"onqueryitemtext", "called during the text draw event of the tastudio listview. luaf must be a function that takes 2 params: index, column. The first is the integer row index of the listview, and the 2nd is the string column name. luaf should return a value that can be parsed into a .NET Color object (string color name, or integer value)")]
[LuaMethod("onqueryitemtext", "called during the text draw event of the tastudio listview. luaf must be a function that takes 2 params: index, column. The first is the integer row index of the listview, and the 2nd is the string column name. luaf should return a value that can be parsed into a .NET Color object (string color name, or integer value)")]
public void OnQueryItemText(LuaFunction luaf)
{
if (Engaged())
@ -209,8 +207,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"onqueryitemicon", "called during the icon draw event of the tastudio listview. luaf must be a function that takes 2 params: index, column. The first is the integer row index of the listview, and the 2nd is the string column name. luaf should return a value that can be parsed into a .NET Color object (string color name, or integer value)")]
[LuaMethod("onqueryitemicon", "called during the icon draw event of the tastudio listview. luaf must be a function that takes 2 params: index, column. The first is the integer row index of the listview, and the 2nd is the string column name. luaf should return a value that can be parsed into a .NET Color object (string color name, or integer value)")]
public void OnQueryItemIcon(LuaFunction luaf)
{
if (Engaged())
@ -230,7 +227,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("ongreenzoneinvalidated", "called whenever the greenzone is invalidated and returns the first frame that was invalidated")]
[LuaMethod("ongreenzoneinvalidated", "called whenever the greenzone is invalidated and returns the first frame that was invalidated")]
public void OnGreenzoneInvalidated(LuaFunction luaf)
{
if (Engaged())
@ -242,7 +239,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("getselection", "gets the currently selected frames")]
[LuaMethod("getselection", "gets the currently selected frames")]
public LuaTable GetSelection()
{
LuaTable table = Lua.NewTable();
@ -260,7 +257,7 @@ namespace BizHawk.Client.EmuHawk
return table;
}
[LuaMethodAttributes("insertframes", "inserts the given number of blank frames at the given insertion frame")]
[LuaMethod("insertframes", "inserts the given number of blank frames at the given insertion frame")]
public void InsertNumFrames(int insertionFrame, int numberOfFrames)
{
if (Engaged())
@ -276,7 +273,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes("deleteframes", "deletes the given number of blank frames beginning at the given frame")]
[LuaMethod("deleteframes", "deletes the given number of blank frames beginning at the given frame")]
public void DeleteFrames(int beginningFrame, int numberOfFrames)
{
if (Engaged())

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Reflection;
using System.Threading;
using LuaInterface;
using NLua;
using BizHawk.Common.ReflectionExtensions;
using BizHawk.Emulation.Common;
@ -47,10 +47,10 @@ namespace BizHawk.Client.EmuHawk
foreach (var lib in libs)
{
bool addLibrary = true;
var attributes = lib.GetCustomAttributes(typeof(LuaLibraryAttributes), false);
var attributes = lib.GetCustomAttributes(typeof(LuaLibraryAttribute), false);
if (attributes.Any())
{
addLibrary = VersionInfo.DeveloperBuild || (attributes.First() as LuaLibraryAttributes).Released;
addLibrary = VersionInfo.DeveloperBuild || (attributes.First() as LuaLibraryAttribute).Released;
}
if (addLibrary)
@ -73,7 +73,7 @@ namespace BizHawk.Client.EmuHawk
var methods = luaCanvas
.GetMethods()
.Where(m => m.GetCustomAttributes(typeof(LuaMethodAttributes), false).Any());
.Where(m => m.GetCustomAttributes(typeof(LuaMethodAttribute), false).Any());
foreach (var method in methods)
{

View File

@ -4,7 +4,7 @@ using System.Windows.Forms;
using System.IO;
using BizHawk.Client.Common;
using LuaInterface;
using NLua;
using System;
namespace BizHawk.Client.EmuHawk
@ -56,6 +56,7 @@ namespace BizHawk.Client.EmuHawk
luaPictureBox.Clear(color);
}
[LuaMethodAttributes(
"Refresh",
"Redraws the canvas")]
@ -64,6 +65,7 @@ namespace BizHawk.Client.EmuHawk
luaPictureBox.Refresh();
}
[LuaMethodAttributes(
"SetDefaultForegroundColor",
"Sets the default foreground color to use in drawing methods, white by default")]
@ -72,6 +74,7 @@ namespace BizHawk.Client.EmuHawk
luaPictureBox.SetDefaultForegroundColor(color);
}
[LuaMethodAttributes(
"SetDefaultBackgroundColor",
"Sets the default background color to use in drawing methods, transparent by default")]
@ -104,6 +107,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"DrawBox",
"Draws a rectangle on screen from x1/y1 to x2/y2. Same as drawRectangle except it receives two points intead of a point and width/height")]
@ -120,6 +124,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"DrawEllipse",
"Draws an ellipse at the given coordinates and the given width and height. Line is the color of the ellipse. Background is the optional fill color")]
@ -136,6 +141,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"DrawIcon",
"draws an Icon (.ico) file from the given path at the given coordinate. width and height are optional. If specified, it will resize the image accordingly")]
@ -152,6 +158,7 @@ namespace BizHawk.Client.EmuHawk
}
}
[LuaMethodAttributes(
"DrawImage",
"draws an image file from the given path at the given coordinate. width and height are optional. If specified, it will resize the image accordingly")]
@ -166,6 +173,7 @@ namespace BizHawk.Client.EmuHawk
luaPictureBox.DrawImage(path, x, y, width, height, cache);
}
[LuaMethodAttributes(
"ClearImageCache",
"clears the image cache that is built up by using gui.drawImage, also releases the file handle for cached images")]

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Windows.Forms;
using LuaInterface;
using NLua;
using BizHawk.Client.Common;

View File

@ -10,7 +10,7 @@ using BizHawk.Client.EmuHawk.ToolExtensions;
namespace BizHawk.Client.EmuHawk
{
[ToolAttributes(false, null)]
[Tool(false, null)]
public partial class MacroInputTool : Form, IToolFormAutoConfig
{
[RequiredService]

View File

@ -8,7 +8,7 @@ using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
[ToolAttributes(false, null)]
[Tool(false, null)]
public partial class NESGameGenie : Form, IToolFormAutoConfig
{
[RequiredService]

View File

@ -10,7 +10,7 @@ using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
[ToolAttributes(false, null)]
[Tool(false, null)]
public partial class SNESGameGenie : Form, IToolFormAutoConfig
{
[RequiredService]

View File

@ -23,14 +23,7 @@ namespace BizHawk.Client.EmuHawk
{
_stateSizeMb = Statable.SaveStateBinary().Length / (decimal)1024 / (decimal)1024;
if (Environment.Is64BitProcess) // ?
{
MemCapacityNumeric.Maximum = 1024 * 8;
}
else
{
MemCapacityNumeric.Maximum = 1024;
}
MemCapacityNumeric.Maximum = 1024 * 8;
MemCapacityNumeric.Value = _settings.Capacitymb < MemCapacityNumeric.Maximum ?
_settings.Capacitymb : MemCapacityNumeric.Maximum;

View File

@ -60,7 +60,7 @@ namespace BizHawk.Client.EmuHawk
continue;
if (typeof(ToolBox).IsAssignableFrom(t)) //yo dawg i head you like toolboxes
continue;
if (VersionInfo.DeveloperBuild && t.GetCustomAttributes(false).OfType<ToolAttributes>().Any(a => !a.Released))
if (VersionInfo.DeveloperBuild && t.GetCustomAttributes(false).OfType<ToolAttribute>().Any(a => !a.Released))
continue;
if (t == typeof(GBGameGenie)) // Hack, this tool is specific to a system id and a sub-system (gb and gg) we have no reasonable way to declare a dependency like that
continue;

View File

@ -427,7 +427,10 @@ namespace BizHawk.Client.EmuHawk
foreach (var tool in _tools)
{
tool.NewUpdate(ToolFormUpdateType.PreFrame);
if (!tool.IsDisposed)
{
tool.NewUpdate(ToolFormUpdateType.PreFrame);
}
}
}
@ -445,7 +448,10 @@ namespace BizHawk.Client.EmuHawk
foreach (var tool in _tools)
{
tool.NewUpdate(ToolFormUpdateType.PostFrame);
if (!tool.IsDisposed)
{
tool.NewUpdate(ToolFormUpdateType.PostFrame);
}
}
}
@ -734,7 +740,7 @@ namespace BizHawk.Client.EmuHawk
}
var attr = tool.GetCustomAttributes(false)
.OfType<ToolAttributes>()
.OfType<ToolAttribute>()
.FirstOrDefault();
// If no supported systems mentioned assume all

View File

@ -62,7 +62,12 @@ namespace BizHawk.Client.EmuHawk
TraceView.QueryItemText += TraceView_QueryItemText;
TraceView.VirtualMode = true;
Closing += (o, e) => SaveConfigSettings();
Closing += (o, e) =>
{
SaveConfigSettings();
Tracer.Sink = null;
CloseFile();
};
MaxLines = 10000;
FileSizeCap = 150; // make 1 frame of tracelog for n64/psx fit in

View File

@ -84,7 +84,7 @@ namespace BizHawk.Client.EmuHawk
PadBox.Controls.Add(new VirtualPadAnalogStick
{
Name = button.Name,
SecondaryName = button.SecondaryNames.Any() ? button.SecondaryNames[0] : "",
SecondaryName = (button.SecondaryNames != null && button.SecondaryNames.Any()) ? button.SecondaryNames[0] : "",
Location = UIHelper.Scale(button.Location),
Size = UIHelper.Scale(new Size(180 + 79, 200 + 9)),
RangeX = new float[] { button.MinValue, button.MidValue, button.MaxValue },

View File

@ -84,10 +84,10 @@ namespace BizHawk.Client.EmuHawk
.GetTypes()
.Where(t => typeof(IVirtualPadSchema)
.IsAssignableFrom(t) && t.GetCustomAttributes(false)
.OfType<SchemaAttributes>()
.OfType<SchemaAttribute>()
.Any())
.FirstOrDefault(t => t.GetCustomAttributes(false)
.OfType<SchemaAttributes>()
.OfType<SchemaAttribute>()
.First().SystemId == Emulator.SystemId);
if (schemaType != null)

View File

@ -2,19 +2,46 @@
using System.Drawing;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Atari.Atari2600;
namespace BizHawk.Client.EmuHawk
{
[SchemaAttributes("A26")]
[Schema("A26")]
public class A26Schema : IVirtualPadSchema
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)
{
yield return StandardController(1);
yield return StandardController(2);
var ss = ((Atari2600)core).GetSyncSettings().Clone();
var port1 = PadSchemaFromSetting(ss.Port1, 1);
if (port1 != null)
{
yield return port1;
}
var port2 = PadSchemaFromSetting(ss.Port2, 2);
if (port2 != null)
{
yield return port2;
}
yield return ConsoleButtons();
}
private static PadSchema PadSchemaFromSetting(Atari2600ControllerTypes type, int controller)
{
switch (type)
{
default:
case Atari2600ControllerTypes.Unplugged:
return null;
case Atari2600ControllerTypes.Joystick:
return StandardController(controller);
case Atari2600ControllerTypes.Paddle:
return PaddleController(controller);
}
}
private static PadSchema StandardController(int controller)
{
return new PadSchema
@ -68,13 +95,61 @@ namespace BizHawk.Client.EmuHawk
};
}
private static PadSchema PaddleController(int controller)
{
return new PadSchema
{
DisplayName = "Player " + controller,
IsConsole = false,
DefaultSize = new Size(334, 94),
MaxSize = new Size(334, 94),
Buttons = new[]
{
new PadSchema.ButtonSchema
{
Name = "P" + controller + " Button 1",
DisplayName = "B1",
Location = new Point(5, 24),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonSchema
{
Name = "P" + controller + " Button 2",
DisplayName = "B2",
Location = new Point(5, 48),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonSchema
{
Name = "P" + controller + " Paddle X 1",
DisplayName = "Paddle X 1",
Location = new Point(55, 17),
Type = PadSchema.PadInputType.FloatSingle,
TargetSize = new Size(128, 69),
MaxValue = 127,
MinValue = -127
},
new PadSchema.ButtonSchema
{
Name = "P" + controller + " Paddle X 2",
DisplayName = "Paddle X 2",
Location = new Point(193, 17),
Type = PadSchema.PadInputType.FloatSingle,
TargetSize = new Size(128, 69),
MaxValue = 127,
MinValue = -127
},
}
};
}
private static PadSchema ConsoleButtons()
{
return new PadSchema
{
DisplayName = "Console",
IsConsole = true,
DefaultSize = new Size(160, 50),
DefaultSize = new Size(185, 75),
Buttons = new[]
{
new PadSchema.ButtonSchema
@ -97,7 +172,21 @@ namespace BizHawk.Client.EmuHawk
DisplayName = "Power",
Location = new Point(108, 15),
Type = PadSchema.PadInputType.Boolean
}
},
new PadSchema.ButtonSchema
{
Name = "Toggle Left Difficulty",
DisplayName = "Left Difficulty",
Location = new Point(10, 40),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonSchema
{
Name = "Toggle Right Difficulty",
DisplayName = "Right Difficulty",
Location = new Point(92, 40),
Type = PadSchema.PadInputType.Boolean
},
}
};
}

View File

@ -7,7 +7,7 @@ using BizHawk.Emulation.Cores.Atari.A7800Hawk;
namespace BizHawk.Client.EmuHawk
{
[SchemaAttributes("A7800Hawk")]
[Schema("A7800Hawk")]
public class A7800HawkSchema : IVirtualPadSchema
{
private string UnpluggedControllerName => typeof(UnpluggedController).DisplayName();

View File

@ -6,7 +6,7 @@ using BizHawk.Emulation.Cores.Atari.Atari7800;
namespace BizHawk.Client.EmuHawk
{
[SchemaAttributes("A78")]
[Schema("A78")]
public class A78Schema : IVirtualPadSchema
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)

View File

@ -5,7 +5,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
{
[SchemaAttributes("AppleII")]
[Schema("AppleII")]
public class AppleIISchema : IVirtualPadSchema
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)

View File

@ -5,7 +5,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
{
[SchemaAttributes("C64")]
[Schema("C64")]
public class C64Schema : IVirtualPadSchema
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)

View File

@ -6,7 +6,7 @@ using BizHawk.Emulation.Cores.ColecoVision;
namespace BizHawk.Client.EmuHawk
{
[SchemaAttributes("Coleco")]
[Schema("Coleco")]
public class ColecoSchema : IVirtualPadSchema
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)

View File

@ -5,7 +5,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
{
[SchemaAttributes("DGB")]
[Schema("DGB")]
public class DualGBSchema : IVirtualPadSchema
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)

View File

@ -6,7 +6,7 @@ using BizHawk.Emulation.Cores.Nintendo.GBA;
namespace BizHawk.Client.EmuHawk
{
[SchemaAttributes("GBA")]
[Schema("GBA")]
public class GBASchema : IVirtualPadSchema
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)

Some files were not shown because too many files have changed in this diff Show More