From 7f404e6edb70299fe8464e4a90a7b1f5ea233d72 Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Sat, 11 Aug 2012 12:18:19 +1000 Subject: [PATCH] Update to v091 release. byuu says: A few issues crept up in the last release, this should take care of them. First, it seems that the 32-bit runtime on 64-bit versions of Windows have 64-bit time functions; whereas true 32-bit Windows does not. This was causing a DLL error when attempting to load bsnes v090. Second, when there were more than 2,000 files in the same folder on Windows, it was lagging the file browser. With OV2's help, I've fixed that and it'll now load the list instantly. Lastly, I've included the missing video shaders this time. --- bsnes/data/cheats.xml | 748 +-------------------- bsnes/emulator/emulator.hpp | 2 +- bsnes/nall/image.hpp | 33 + bsnes/nds/system/system.cpp | 22 +- bsnes/phoenix/qt/platform.moc | 2 +- bsnes/phoenix/reference/platform.hpp | 2 + bsnes/phoenix/reference/window.cpp | 6 + bsnes/phoenix/windows/dialog-window.cpp | 14 +- bsnes/phoenix/windows/platform.hpp | 4 +- bsnes/phoenix/windows/widget/list-view.cpp | 117 ++-- shaders/Archive/HDR-TV.OpenGL.shader | 17 + shaders/Archive/Watercolor.OpenGL.shader | 61 ++ shaders/Curvature.OpenGL.shader | 22 + shaders/HQ2x.OpenGL.shader | 73 ++ shaders/Makefile | 4 + shaders/Pixellate.OpenGL.shader | 44 ++ shaders/Scale2x.OpenGL.shader | 55 ++ shaders/Sepia.Direct3D.shader | 30 + 18 files changed, 487 insertions(+), 769 deletions(-) create mode 100644 shaders/Archive/HDR-TV.OpenGL.shader create mode 100644 shaders/Archive/Watercolor.OpenGL.shader create mode 100644 shaders/Curvature.OpenGL.shader create mode 100644 shaders/HQ2x.OpenGL.shader create mode 100644 shaders/Makefile create mode 100644 shaders/Pixellate.OpenGL.shader create mode 100644 shaders/Scale2x.OpenGL.shader create mode 100644 shaders/Sepia.Direct3D.shader diff --git a/bsnes/data/cheats.xml b/bsnes/data/cheats.xml index 1f94df58..0619442d 100644 --- a/bsnes/data/cheats.xml +++ b/bsnes/data/cheats.xml @@ -1,5 +1,5 @@ - + 1942 (Japan, USA) @@ -423,14 +423,6 @@ Invincibility AVISVG - - One hit kills - EIKVVIEY - - - No enemies - GXUIZIAI - Addams Family, The (USA) @@ -3853,10 +3845,6 @@ Super fast punching AEUZITPA - - Force 2-player mode - AENTAIPL - Start with 1 life PENVZILA @@ -4395,13 +4383,6 @@ ZAXAYGAA - - Bio Miracle Bokutte Upa (Japan).nes - - Hit anywhere - normal enemies - AAKTZTIG+AEOLVGTZ - - Bionic Commando (USA) @@ -4436,30 +4417,10 @@ Autofire - main game XYXUUOEN - - Longer grapple line - sidescrolling levels - AINPTZAL+TSEOGZAG+YIVPAXZU - - - Longest grapple line - sidescrolling levels - EINPYZEP+EIVPPZEP+ESEOIZEP - - - Longer range for normal 3-way gun - sidescrolling levels - YOVUESPA - - - Longer range for fireball 3-way gun - sidescrolling levels - IPKLKVGA - Use with BIO Code 11 for improved autofire with normal gun AAKUOOZA - - Have all items (using the hidden gun will crash the game) - ELKLZAEY+EIXLTPEY - Start with 3 life energy capsules LAUKOZAA+XTUKUXVU @@ -9686,13 +9647,6 @@ PAUIEZIA - - Donkey Kong Jr. Math (USA, Europe).nes - - Always get the correct answer - AAKILSZA+AAUILSZP - - Donkey Kong Classics (USA, Europe) @@ -11319,10 +11273,6 @@ Infinite lives (alt) SGXGZGVG - - Multi-jump - ENVVIPNP+PXVVPOVP+XOVVTPXT+ZKVVGOGK - Take more damage APONPXAA @@ -13684,14 +13634,6 @@ Infinite credits SXXGSVVK - - Hit anywhere - AIUPKZEL+APUPSZGX+ASEOEPEL+EUEZTGGN+GKEZIKOS+KXEZYGIA+ZUEOOOAI - - - Get items from anywhere - AINPXZEL+YPNPUXPX - Galactic Crusader (USA) (Unl) @@ -15198,18 +15140,6 @@ Infinite special weapons SXVZTXSE - - One hit kills - EIEIYYEP - - - Enemies die automatically - AAUZLOAP+AUSSANAO+SAUZTOVK - - - Get items from anywhere - AUVSINKU+AVVSTNAP - Invincibility (alt) 0400:02 @@ -15616,13 +15546,6 @@ SLONNKSO - - Heracles no Eikou - Toujin Makyou Den (Japan) - - No random battles - AVSVTZAZ - - Hogan's Alley (World) @@ -17334,14 +17257,6 @@ Take less damage PTYSEK - - Hit anywhere - GKKEAZSK+OVKEPXPA+XEKEZZEP - - - Multi-jump - AEOTTIGA - 9 Tornado Attacks on pick-up PESIKYYE @@ -18728,14 +18643,6 @@ Press Start to complete the level GEXGUALU+LEXGSALU+OXXGXAIK - - Hit anywhere - throwing - ELXKKESZ+TIXKSAYA - - - Multi-jump when falling - ESXPZZEY+KOXPLZKS+OKOOYZOX+PEXPPXSG+PXXPAZES - One life after continue PASKOILA @@ -18982,14 +18889,6 @@ Infinite lives SXKTPKVG - - Hit anywhere (spitting) - AOOEIOOV+AOOETPYE+EANEZAAT+GGNEAESN+GXKEIPEL+VGNEPAGY - - - Inhale from anywhere - AASELZZG+AINEYZEP+SZNEGXSV - Less health from 'pep drinks' ZAKLLXAA @@ -19049,14 +18948,6 @@ Infinite lives SXKTPKVG - - Hit anywhere (spitting) - AEKAIEIA+AEXAIPTL+AOOAGEOV+AOOAIAYE+GXKEIPEL - - - Inhale from anywhere - AASELZZG+GXEAGZEL - Less health from 'pep drinks' ZAKLLXAA @@ -21451,10 +21342,6 @@ Magic of Scheherazade, The (USA) - - Invincibility - OXUYZKPX - Infinite HP OTSXLGSV @@ -21463,18 +21350,6 @@ Infinite lives SXEVPLVG - - Hit anywhere - AEEYYGLA+ALNNIGEP+SZNNLGSG+TZNNTKPA+UGNNGKPE - - - Never lose Mashroobs - SZEAEKVK - - - Get coins from anywhere - TEXAXLLA - Less energy gained from Bread POKAOZZU @@ -21483,6 +21358,10 @@ Less magic gained from Mashroobs ZAEEXGIA + + Never lose Mashroobs + SZEAEKVK + Start with only 20 Gold Coins ZAUTAZIA @@ -26078,13 +25957,6 @@ 03E2:1D - - Otaku no Seiza - An Adventure in the Otaku Galaxy (Japan) - - No random battles - AVEIXKOZ - - Over Horizon (Europe) @@ -27129,7 +27001,7 @@ - Princess Tomato in the Salad Kingdom (USA) + Princess Tomato in Salad Kingdom (USA) Infinite gold coins 03CB:09 @@ -29969,10 +29841,6 @@ Infinite time SZEVYZVG - - Hit anywhere - AKSZANEL+ATUILYEI+OXSZPNEX - 200 Machine Gun bullets on pick-up EKSTEAGV @@ -30710,13 +30578,6 @@ AANOLAZE - - Shinsenden (Japan) - - No random battles - ATXUPAAL - - Shooting Range (USA) @@ -34130,10 +33991,6 @@ Quick pick-up SXUASXOU - - Twice as much time in sub-space - NNXPZIAV - Infinite magic carpet time SLNZZLVI @@ -34337,10 +34194,6 @@ Quick pick-up SXUASXOU - - Twice as much time in sub-space - NNXPZIAV - Jump as high as a squat jump AEUEKKGL @@ -38531,10 +38384,6 @@ Vice - Project Doom (USA) - - Invincibility - AANSEIYP - Infinite lives SZSKIOVK @@ -38555,14 +38404,6 @@ Infinite power SXVYVKSE - - Hit anywhere - AEEYXEET - - - Multi-jump - XVVKISZK - 10 coins for an extra life ZEOYNGGV @@ -39260,22 +39101,10 @@ Wing of Madoola, The (Japan) (Sample) - - Invincibility - SXKGXTSA - Infinite hits and magic SLUUVYSP - - Hit anywhere - AAOGEVPA+AAOGSVZI+PZOGKTSN - - - One hit kills - APXKETSV+APXKOVEE - Start with 9999 hits OOKZKPAE+OOKXEPAO @@ -40661,17 +40490,6 @@ YYKSKIPE - - Ys III - Wanderers from Ys (Japan).nes - - Hit anywhere - XTKXSAAV+XTNXUAAV+XTVZKAAV+XVOZXAAV - - - One hit kills - AAEZYYGA - - Yume Koujou Doki Doki Panic (Japan) [b] (FDS) @@ -40749,10 +40567,6 @@ Zanac (USA) - - Invincibility + Hit anywhere - ALSEGZEU+ATSEIZPL+SZOELXOO - Infinite lives OXEENYVK @@ -42309,14 +42123,9 @@ Infinite lives DD67-4468 - - Hit anywhere - 40B5-17A4+40B6-14A4+40BB-17D4+40BC-1DA4 - - - One hit kills - DDB3-C764 - + + + DDB3-C764 Small magic power-up adds 3 instead of 1 D7C0-37A7 @@ -43114,14 +42923,6 @@ Infinite lives C282-34A1 - - Hit anywhere - DDA0-476A+DDA9-4F6A - - - Moon jump - 5C88-1D09+7D88-1DA9+DD83-17A9 - Adventures of Rocky and Bullwinkle and Friends, The (USA) @@ -44667,25 +44468,6 @@ 6D14-7DD4 - - Ashita no Joe (Japan) - - Hit anywhere - P1 - DD81-64AF - - - Hit anywhere - P2 - DD8A-A46D - - - Invincibility - P1 - 6D8A-6DDD - - - Invincibility - P2 - 6D81-0FDF - - Asterix (Europe) (En,Fr,De,Es) @@ -44993,10 +44775,6 @@ Infinite weapons (except for Flame) 3C37-A7D4 - - Hit anywhere - DDE2-6D04+DDEF-AD04 - Max weapons on pick-up DDC0-C770 @@ -46329,10 +46107,6 @@ Infinite Hyper Bombs - Neptune C2C3-DF67 - - Hit anywhere - 1D85-AD0F+1D8B-ADAF+C28A-D7A4+7685-ADDF+768B-AD6F - Start with 1 ship DD6E-6707 @@ -46404,10 +46178,6 @@ Infinite Discs 8289-CFDF - - Multi-jump - 6D21-CFAF+6D29-CD6F - Bobby's World (USA) (Proto) @@ -46416,25 +46186,13 @@ 2DB7-1DD8 - Infinite health + Infinite energy 82BC-1468 - - Infinite health (alt) - 7E139B03 - Infinite lives 822D-17AF - - Infinite lives (alt) - 7E139509 - - - Multi-jump - DDB3-17AC - Bonkers (USA) @@ -46458,10 +46216,6 @@ Infinite dash C98C-CD0F - - Hit anywhere - 6DE1-1F04+9DE1-1F64 - Boogerman - A Pick and Flick Adventure (USA) @@ -46532,14 +46286,6 @@ Boxing Legends of the Ring (USA) - - Invincibility - P1 - 6D6A-C4A9 - - - Invincibility - P2 - 6D66-3D05 - Infinite super punches - P1 C26D-3F05 @@ -46556,22 +46302,6 @@ Infinite time per round C2BA-A7A7 - - Hit anywhere - P1 - 1DBD-4460+F6BD-4400 - - - Hit anywhere - P2 - 1D69-3FD9+F669-3DA9 - - - Blocking disabled - P1 - DD62-CD09 - - - Blocking disabled - P2 - DD66-3FA5 - Each round is 1 minute DF8D-CDA7 @@ -48676,13 +48406,6 @@ D460-CD0D - - Bulls vs Blazers and the NBA Playoffs (USA) - - Never miss a shot - DD66-C4BD - - Bust-A-Move (USA) @@ -49846,14 +49569,6 @@ Infinite lives DDEC-CF6D - - Hit anywhere - DD6B-ADA4 - - - Multi-jump - DDA2-DDDF - Stay as Super Congo (you may change if you walk on spikes) CB69-34D7 @@ -50392,22 +50107,6 @@ Infinite Nutty attacks C287-34AD - - Hit anywhere - DD33-1DDF - - - Get items from anywhere - DD20-C7A4+DD26-1FD4+DD27-CFA7+DD3C-1D6D - - - One hit kills - 6D86-17DF - - - Disable recoil - DD89-CFAD - Juice cans set health to 1/2 D121-CD64 @@ -51075,14 +50774,6 @@ Invincibility after one hit C92A-44A7 - - Hit anywhere - DD66-47DC+DD6C-4D6C+6D6D-3DDC+6D64-3DAC - - - Get GP from anywhere - DDA5-176C - Large health refills full health C9AC-176C @@ -51799,10 +51490,6 @@ Infinite credits - both players C260-67F7 - - Hit and stomp anywhere - 6DAE-6469+F9AE-64A9 - Clock runs faster 7A64-D420 @@ -53961,17 +53648,9 @@ EE2E-54A1 - Fast money (buy a bread with the code disabled, enable and sell it for $32,646) + Fast money (buy a bread w/the code off, turn code on and sell it for $32,646) EE9A-E5F5 - - Dad never calls - E395-87DD - - - Massive numbers of enemies (piracy check) - 6D4F-7704 - Start with a level 9 character DB23-77D1 @@ -54004,6 +53683,10 @@ Start with a lot of PSI BB2F-54A1 + + Dad never calls + E395-87DD + Infinite health 7E9A13:E7+7E9A14:03 @@ -60820,16 +60503,8 @@ Imperium (USA) - Invincibility - 6DCC-DD27+DD38-AFA9 - - - Hit anywhere - 6D31-DDA1+C236-DD01 - - - Infinite bombs - C2A9-D46F + Invincibility against lesser robots, weapons and lasers + 1D34-D4A1+1DC3-DDF7 Start with 1 life point @@ -61008,18 +60683,6 @@ Health doesn't decrease when Hulked-out C260-4746 - - Hit anywhere - 0AB3-4D00+2DB3-4DD0+3DB2-4700+DDB2-4760+DDB2-47A0 - - - One hit kills - DDBF-47D0 - - - Get items from anywhere - 6DBF-17CB - Get 4 shots from gun D0BC-173B @@ -61710,13 +61373,6 @@ 7E0269:03 - - Jeopardy! (USA) - - Always get the correct answer - 6DC8-6D67+6DCE-64A7 - - Jetsons, The - Invasion of the Planet Pirates (USA) @@ -61843,10 +61499,6 @@ Hit anywhere 6DC3-0DAD+C9E5-DDDD+DDC4-076D - - One hit kills - 40CC-07DD - Start with 2 lives CBC8-6404+DFC8-6464 @@ -64864,9 +64516,10 @@ Pit death disabled 1DA9-04D1 - - - 1BB5-D769+DFB5-D7A9+3CB6-DDD9 + + Get 1 gold for each creature killed + 1BB5-D769+DFB5-D7A9+3CB6-DDD9 + Get 100 gold for each creature killed 1BB5-D769+10B5-D7A9+3CB6-DDD9 @@ -65453,10 +65106,6 @@ Dash without having the Pegasus Boots EEE5-2356 - - Dash without charge up - 45B8-D49A - Use the Magic Mirror to warp between the Light and Dark Worlds freely 6DC9-0D23 @@ -70559,10 +70208,6 @@ Infinite timeouts - both players (slightly glitchy) 8250-5700 - - Cannot be tackled (hold X) - 6D59-7FD7+7D59-7F67+C959-7DA7+DC59-7F07+E959-7FA7 - Field goals worth 0 points DD6F-8404 @@ -70638,10 +70283,6 @@ Infinite timeouts 8297-7F09 - - Cannot be tackled (hold X) - 6D6C-EFDF+7D6C-EF6F+C96C-EDAF+DC6C-EF0F+E96C-EFAF - Safeties are worth 0 points DD62-EFA7 @@ -70707,20 +70348,6 @@ DF65-E7A7 - - Madden NFL 97 (USA) - - Cannot be tackled (hold X) - 6D66-7767+7D6B-7DD7+C966-7707+DC66-77A7+E96B-7D07 - - - - Madden NFL 98 (USA) - - Cannot be tackled (hold X) - 6D6F-5407+7D6F-54A7+C96F-54D7+DC6F-5467+E96F-57D7 - - Magic Boy (USA) @@ -71627,7 +71254,7 @@ Infinite weapon energy - FE42-E405 + FEC2-E405 One hit kills @@ -71641,50 +71268,6 @@ Multi-jump DC51-ED65+BD51-EDA5+D751-EFD5+4D51-EF05+8551-EF65+7451-EFA5+4D51-E4D5+BC51-E405+FF51-E465+1D51-E4A5+1DFC-E400+5EFC-E460+C951-EDD5+0951-ED05 - - Always Shoot Shots - FF40-E405 - - - Always shoot Freeze Cracker - 4040-E405 - - - Always shoot Scorch Wheel - 4140-E405 - - - Always shoot Danger Wrap Bombs - 4340-E405 - - - Always shoot Noise Crush - 1140-E405 - - - Always shoot Fully Charged Mega Buster Blasts - 5240-E405 - - - Always shoot Slash Claw - BA40-E405 - - - Always shoot Thunder Bolt - 8940-E405 - - - Always shoot Wild Coil - E740-E405 - - - Always shoot Charged Wild Coils - EE40-E405 - - - White Shots/Special Weapons - EE02-E465 - Infinite E-Tanks (alt) 7E0BA0:FF @@ -71796,14 +71379,6 @@ Multi-jump 4065-17A9+EA66-1409+B966-1469 - - Enemies always drop large energy - C4CB-3DBD+D4CB-3D2D - - - Enemies always drop large weapon energy - C4CB-3DBD+D0CB-3D2D - Bogus jump (may go back to normal jumps) D08A-1FBC @@ -71907,14 +71482,6 @@ Multi-jump 4065-1F09+E465-17A9+B966-1DD9 - - Enemies always drop large energy - C4C6-379D+D4C6-37BD - - - Enemies always drop large weapon energy - C4C6-379D+D0C6-37BD - Bogus jump (may go back to normal jumps) D08A-1FBC @@ -71986,10 +71553,6 @@ Mega Man X2 (USA) - - Invincibility - D6B0-DD4F - Infinite health C223-0414 @@ -72010,6 +71573,10 @@ Multi-jump 40BE-DD44+26BE-D4C4+8BBE-D434 + + Invincibility + 8944008 + Infinite health (alt 2) 7E09FF:20 @@ -72113,14 +71680,6 @@ Multi-jump 4064-042F+D367-0F9F+C567-0FBF - - Enemies always drop large energy - C42E-0D2F+D42E-0FFF - - - Enemies always drop large weapon energy - C42E-0D2F+D02E-0FFF - Super-jump D586-6F26 @@ -72192,14 +71751,6 @@ View ending (select Capcom Championship) 81829B:EE+81829C:E0 - - Unlock Capcom Championship mode ending - 82D1F0:EA+82D1F1:EA+82D1F2:EA+82D1F3:EA - - - Unlock Tournament mode ending - 82D29C:EA+82D29D:EA+82D29E:EA+82D29F:EA - Metal Combat - Falcon's Revenge (USA) @@ -72546,10 +72097,6 @@ Infinite bombs on pick-up C2B7-0FF7 - - Collect items from anywhere - 4084-D794+6D8A-0724+F282-0DF4 - Mega-jump EC6A-ADF7 @@ -77107,10 +76654,6 @@ PGA Tour Golf (USA) - - Ball goes in from anywhere - 6D85-67AD+6DCC-ADD7 - Allow 14 clubs for full set instead of 13 D235-6D07+D22A-D40F @@ -79264,10 +78807,6 @@ Infinite lives - P2 3CB5-0467 - - Hit anywhere - 44E8-6446+6DE8-6F36+C9E3-6446 - Replacement planes carry 0 bombs - P1 CEB7-DFD7+62B7-DF07 @@ -79892,14 +79431,9 @@ No score lost when special attack is used DD62-A7A6 - - Hit anywhere (might make some enemies invisible) - 6DB6-69EA+F9B6-617A - - - Start with more health - EEC4-OD6F+EE64-646C+EE63-04A7+EE68-A7A1 - + + + EEC4-OD6F+EE64-646C+EE63-04A7+EE68-A7A1 Start with less health FEC4-0D6F+FE64-646C+FE63-04A7+FE68-A7A1 @@ -83546,14 +83080,9 @@ Infinite health C208-87D1 - - Hit anywhere - 40F8-84B0 - - - Don't blink after getting hit - FDDB-5FB9 - + + + FDDB-5FB9 Falling doesn't use life points C2F4-7FD1 @@ -88454,10 +87983,6 @@ Spin jump in mid air (hold for float down) F53F-6767+DD3F-67A7 - - Press R to scroll through items in the items box - D2AF-6407+D2AF-6DD7+DFAF-6F67+17AF-6FD7+1DAF-6467+62AF-6FA7+A4AD-67A7+A4AD-67D7+A4AF-64D7+CBAF-6F07+D1AF-6D67+D2AD-6707 - Low jump D02C-AF6F @@ -88975,10 +88500,6 @@ Infinite Power Bombs (alt) 17DA-9E8C - - Hit anywhere - 40C8-18DD+6DB1-3C6F+6DC2-1BDD - Super-jumps don't drain energy C22A-456D @@ -90196,28 +89717,6 @@ D4E9-6DEF - - Super Solitaire (USA) (En,Fr,De,Es,It) - - Move cards to any pile - Klondike - 6D8C-476F+DD8A-34AD+DD88-3D0D - - - Move cards to any pile - Free Cell - 6D8F-44A4 - - - - Super Soukoban (Japan) - - Infinite steps - C2CC-64AB - - - Walk through walls - DD88-D4A6+DD88-D706 - - Super Star Wars (USA) (Rev 1) @@ -91858,14 +91357,6 @@ Infinite hits on armor C2AA-0FAF - - Hit anywhere - DD8D-DD0D+DDAB-D4DF - - - Get items from anywhere - 6D8A-AF67 - Heart worth more F684-0F0D @@ -92667,13 +92158,6 @@ 3C38-C25D - - Tecmo Super NBA Basketball (USA) - - Never miss a shot (hold Y and press the shot button) - 7D69-CDE7+C269-CD77+D869-CD57+DC69-CD87+FF69-CF77 - - Teenage Mutant Ninja Turtles IV - Turtles in Time (USA) @@ -92887,26 +92371,6 @@ Start with 7 continues D6B1-CF60 - - Infinite health - 7E0EE460 - - - Full power bar - 7E1AC060 - - - Empty power bar - opponent - 7E1B1000 - - - Opponent dizzy after every knockdown - 7E0FC210 - - - Win one round to win match - 7E195002 - Tengai Makyou Zero (Japan) @@ -93734,18 +93198,6 @@ Race in any country 6DB7-AFEA - - Don't slow down offroad - C229-D4F1 - - - Don't slow down against obstacles - DD23-6499 - - - Don't slow down against cars - DD38-D7F9+DD38-DF29 - Start with 1/2 fuel 972B-0F64 @@ -97666,10 +97118,6 @@ Zero the Kamikaze Squirrel (USA) - - Jump higher - E060-1D62+E060-CF03 - Invincibility 7E0E2C:02 @@ -99499,25 +98947,6 @@ FA1-21E-4C1 - - Bubble Bobble (USA, Europe) - - Hit anywhere - 00D-22E-C4A+18D-29E-08A - - - Hit anywhere - Bosses (except final boss) - 00C-05B-A29+00B-FCB-A29 - - - Get items from anywhere - 00C-02D-A29+00C-0BD-A29+00D-56D-A29+375-8FB-6EE+37D-5FD-A29+C95-90B-91E - - - One hit kill - final boss - AF8-B7B-19E - - Bubble Bobble Part 2 (USA, Europe) @@ -99572,17 +99001,6 @@ BE6-00E-19E - - Bug's Life, A (USA) (SGB Enhanced) - - Infinite lives - 006-2FD-3BE - - - Invincibility (can still drown) - 000-EEE-081 - - BurgerTime Deluxe (World) @@ -100284,13 +99702,6 @@ 0AB-0C8-E6E - - Deer Hunter (USA) - - Infinite time - 004-1FF-19A - - Dig Dug (USA) @@ -101550,14 +100961,6 @@ Kid Icarus - Of Myths and Monsters (USA, Europe) - - Hit anywhere - 008-B8B-5D4 - - - Run into enemies to get Hearts - 185-67B-4CA - Collected hammers seem to count towards your enemy kill number C9A-D18-08F+7AA-B48-E69 @@ -101664,14 +101067,6 @@ Infinite vitality bars except against end of stage boss FA4-63B-4C1 - - Hit anywhere - 003-E1B-F7E - - - Inhale from anywhere - 008-53B-08E+008-67B-7FE - Start with 2 lives 021-BBF-F7E @@ -101719,18 +101114,6 @@ Infinite lives FA1-C4B-4C1 - - Hit anywhere - 006-E5D-6EA+187-04D-2AA - - - Inhale from anywhere - 005-BED-19E+005-DFD-91A - - - Get items from anywhere - 18B-898-08A - One hit and you die AFA-9EC-A28 @@ -102736,17 +102119,6 @@ 095-B2E-E66 - - Ms. Pac-Man (USA) - - Invincibility - 009-06E-E62 - - - Get fruit from anywhere - 00B-21E-D56 - - Mysterium (USA) @@ -102789,44 +102161,6 @@ 084-B5F-F7A - - Nemesis (Europe) - - Hit anywhere - Default weapon - 008-A7D-A29+008-B8D-A29 - - - Hit anywhere - Laser - 009-5FD-A29+009-70D-A29 - - - Hit anywhere - Missiles - 009-CBD-A29+009-DCD-A29 - - - Get items from anywhere - 007-68D-A29 - - - - Nemesis (USA) - - Hit anywhere - normal weapon - 008-A5D-A29+008-94D-A29 - - - Hit anywhere - Laser - 009-5DD-A29+009-4CD-A29 - - - Hit anywhere - Missiles - 009-C9D-A29+009-B8D-A29 - - - Get items from anywhere - 007-55D-A29 - - NFL Football (USA) @@ -102850,13 +102184,6 @@ 08F-59F-F72 - - Ninja Boy (USA, Europe) - - Hit anywhere (can get items from anywhere by punching) - 00E-279-C43 - - Nintendo World Cup (USA, Europe) @@ -102989,17 +102316,6 @@ 081-ACF-E66 - - Pac-Man (USA) - - Invincibility - C97-7DE-A29 - - - Get fruit from anywhere - 009-22E-E69+009-28E-E69 - - Pagemaster, The (USA) (SGB Enhanced) diff --git a/bsnes/emulator/emulator.hpp b/bsnes/emulator/emulator.hpp index b5e856aa..6f1cf2d2 100644 --- a/bsnes/emulator/emulator.hpp +++ b/bsnes/emulator/emulator.hpp @@ -3,7 +3,7 @@ namespace Emulator { static const char Name[] = "bsnes"; - static const char Version[] = "090"; + static const char Version[] = "091"; static const char Author[] = "byuu"; static const char License[] = "GPLv3"; } diff --git a/bsnes/nall/image.hpp b/bsnes/nall/image.hpp index 552a3e30..e334b6e0 100644 --- a/bsnes/nall/image.hpp +++ b/bsnes/nall/image.hpp @@ -24,6 +24,14 @@ struct image { uint64_t mask; unsigned depth; unsigned shift; + + inline bool operator==(const Channel &source) { + return mask == source.mask && depth == source.depth && shift == source.shift; + } + + inline bool operator!=(const Channel &source) { + return !operator==(source); + } } alpha, red, green, blue; typedef double (*interpolation)(double, double, double, double, double); @@ -31,6 +39,9 @@ struct image { static inline unsigned bitShift(uint64_t color); static inline uint64_t normalize(uint64_t color, unsigned sourceDepth, unsigned targetDepth); + inline bool operator==(const image &source); + inline bool operator!=(const image &source); + inline image& operator=(const image &source); inline image& operator=(image &&source); inline image(const image &source); @@ -89,6 +100,26 @@ uint64_t image::normalize(uint64_t color, unsigned sourceDepth, unsigned targetD //public +bool image::operator==(const image &source) { + if(width != source.width) return false; + if(height != source.height) return false; + if(pitch != source.pitch) return false; + + if(endian != source.endian) return false; + if(stride != source.stride) return false; + + if(alpha != source.alpha) return false; + if(red != source.red) return false; + if(green != source.green) return false; + if(blue != source.blue) return false; + + return memcmp(data, source.data, width * height * stride) == 0; +} + +bool image::operator!=(const image &source) { + return !operator==(source); +} + image& image::operator=(const image &source) { free(); @@ -110,6 +141,8 @@ image& image::operator=(const image &source) { } image& image::operator=(image &&source) { + free(); + width = source.width; height = source.height; pitch = source.pitch; diff --git a/bsnes/nds/system/system.cpp b/bsnes/nds/system/system.cpp index cc2b6c7c..61c5e60b 100644 --- a/bsnes/nds/system/system.cpp +++ b/bsnes/nds/system/system.cpp @@ -8,13 +8,23 @@ #include #include - struct timeval { - int64_t tv_sec, tv_usec; - }; - #define timegm(tm) _mkgmtime64(tm) - #define gmtime(tv) _gmtime64(tv) + #if defined(__amd64__) || defined(_M_AMD64) + struct timeval { + int64_t tv_sec, tv_usec; + }; + #define timegm(tm) _mkgmtime64(tm) + #define gmtime(tv) _gmtime64(tv) + #else + //Windows 32-bit run-time doesn't have 64-bit time functions + struct timeval { + time_t tv_sec, tv_usec; + }; + #define timegm(tm) mktime(tm) + #define gmtime(tv) localtime(tv) + #endif + #define gettimeofday(tv,tz) gettimeofday64(tv,tz) - + int gettimeofday64(struct timeval *tv, struct timezone *tz) { FILETIME ft; GetSystemTimeAsFileTime(&ft); // UTC in 100ns units diff --git a/bsnes/phoenix/qt/platform.moc b/bsnes/phoenix/qt/platform.moc index 3b2db923..bf31cfa0 100644 --- a/bsnes/phoenix/qt/platform.moc +++ b/bsnes/phoenix/qt/platform.moc @@ -1,7 +1,7 @@ /**************************************************************************** ** Meta object code from reading C++ file 'platform.moc.hpp' ** -** Created: Sun Jul 22 02:20:29 2012 +** Created: Thu Aug 9 18:10:14 2012 ** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3) ** ** WARNING! All changes made in this file will be lost! diff --git a/bsnes/phoenix/reference/platform.hpp b/bsnes/phoenix/reference/platform.hpp index 5ffb5b60..3acc9d55 100644 --- a/bsnes/phoenix/reference/platform.hpp +++ b/bsnes/phoenix/reference/platform.hpp @@ -69,6 +69,8 @@ struct pTimer : public pObject { struct pWindow : public pObject { Window &window; + static Window& none(); + void append(Layout &layout); void append(Menu &menu); void append(Widget &widget); diff --git a/bsnes/phoenix/reference/window.cpp b/bsnes/phoenix/reference/window.cpp index 128a9c2d..aca2cc2d 100644 --- a/bsnes/phoenix/reference/window.cpp +++ b/bsnes/phoenix/reference/window.cpp @@ -1,3 +1,9 @@ +Window& pWindow::none() { + static Window *window = nullptr; + if(window == nullptr) window = new Window; + return *window; +} + void pWindow::append(Layout &layout) { } diff --git a/bsnes/phoenix/windows/dialog-window.cpp b/bsnes/phoenix/windows/dialog-window.cpp index 3005c020..5ef21153 100644 --- a/bsnes/phoenix/windows/dialog-window.cpp +++ b/bsnes/phoenix/windows/dialog-window.cpp @@ -56,16 +56,26 @@ string pDialogWindow::fileSave(Window &parent, const string &path, const lstring return FileDialog(true, parent, path, filter); } +static int CALLBACK BrowseCallbackProc(HWND hwnd, UINT msg, LPARAM lparam, LPARAM lpdata) { + if(msg == BFFM_INITIALIZED) { + if(lpdata) SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpdata); + } + + return 0; +} + string pDialogWindow::folderSelect(Window &parent, const string &path) { wchar_t wfilename[PATH_MAX + 1] = L""; + utf16_t wpath(string{path}.transform("/", "\\")); + BROWSEINFO bi; bi.hwndOwner = &parent != &Window::none() ? parent.p.hwnd : 0; bi.pidlRoot = NULL; bi.pszDisplayName = wfilename; bi.lpszTitle = L""; bi.ulFlags = BIF_NEWDIALOGSTYLE | BIF_RETURNONLYFSDIRS; - bi.lpfn = NULL; - bi.lParam = 0; + bi.lpfn = BrowseCallbackProc; + bi.lParam = (LPARAM)(wchar_t*)wpath; bi.iImage = 0; bool result = false; LPITEMIDLIST pidl = SHBrowseForFolder(&bi); diff --git a/bsnes/phoenix/windows/platform.hpp b/bsnes/phoenix/windows/platform.hpp index 96811796..56277a92 100644 --- a/bsnes/phoenix/windows/platform.hpp +++ b/bsnes/phoenix/windows/platform.hpp @@ -373,6 +373,8 @@ struct pLineEdit : public pWidget { struct pListView : public pWidget { ListView &listView; HIMAGELIST imageList; + vector> imageMap; + vector images; bool lostFocus; void append(const lstring &text); @@ -396,7 +398,7 @@ struct pListView : public pWidget { void destructor(); void orphan(); void setGeometry(const Geometry &geometry); - void setImageList(); + void buildImageList(); }; struct pProgressBar : public pWidget { diff --git a/bsnes/phoenix/windows/widget/list-view.cpp b/bsnes/phoenix/windows/widget/list-view.cpp index 11ae023f..675691e6 100644 --- a/bsnes/phoenix/windows/widget/list-view.cpp +++ b/bsnes/phoenix/windows/widget/list-view.cpp @@ -6,6 +6,34 @@ unsigned ListView_GetColumnCount(HWND hwnd) { return --count; } +void ListView_SetImage(HWND hwnd, HIMAGELIST imageList, unsigned row, unsigned column, unsigned imageID) { + //if this is the first image assigned, set image list now + //do not set sooner, or image blocks will appear in a list with no images + if(ListView_GetImageList(hwnd, LVSIL_SMALL) != imageList) { + ListView_SetImageList(hwnd, imageList, LVSIL_SMALL); + } + + LVITEM item; + item.mask = LVIF_IMAGE; + item.iItem = row; + item.iSubItem = column; + item.iImage = imageID; + ListView_SetItem(hwnd, &item); +} + +void ImageList_Append(HIMAGELIST imageList, const nall::image &source) { + auto image = source; + if(image.empty()) { + image.allocate(15, 15); + image.clear(GetSysColor(COLOR_WINDOW)); + } + image.transform(0, 32, 255u << 24, 255u << 16, 255u << 8, 255u << 0); + image.scale(15, 15, Interpolation::Linear); + HBITMAP bitmap = CreateBitmap(image); + ImageList_Add(imageList, bitmap, NULL); + DeleteObject(bitmap); +} + void pListView::append(const lstring &list) { wchar_t empty[] = L""; unsigned row = ListView_GetItemCount(hwnd); @@ -43,11 +71,11 @@ void pListView::modify(unsigned row, const lstring &list) { void pListView::remove(unsigned row) { ListView_DeleteItem(hwnd, row); - setImageList(); } void pListView::reset() { ListView_DeleteAllItems(hwnd); + buildImageList(); //free previously allocated images } bool pListView::selected() { @@ -103,7 +131,19 @@ void pListView::setHeaderVisible(bool visible) { } void pListView::setImage(unsigned row, unsigned column, const image &image) { - setImageList(); + //assign existing image + for(unsigned n = 0; n < images.size(); n++) { + if(images[n] == image) { + imageMap(row)(column) = n; + return ListView_SetImage(hwnd, imageList, row, column, n); + } + } + + //append and assign new image + imageMap(row)(column) = images.size(); + images.append(image); + ImageList_Append(imageList, image); + ListView_SetImage(hwnd, imageList, row, column, imageMap(row)(column)); } void pListView::setSelected(bool selected) { @@ -138,7 +178,7 @@ void pListView::constructor() { setCheckable(listView.state.checkable); for(auto &text : listView.state.text) append(text); for(unsigned n = 0; n < listView.state.checked.size(); n++) setChecked(n, listView.state.checked[n]); - setImageList(); + buildImageList(); if(listView.state.selected) setSelection(listView.state.selection); autoSizeColumns(); synchronize(); @@ -158,53 +198,46 @@ void pListView::setGeometry(const Geometry &geometry) { autoSizeColumns(); } -void pListView::setImageList() { +void pListView::buildImageList() { auto &list = listView.state.image; + unsigned columns = listView.state.text.size(); + unsigned rows = max(1u, listView.state.headerText.size()); - if(imageList) { - ImageList_Destroy(imageList); - imageList = nullptr; - } + ListView_SetImageList(hwnd, NULL, LVSIL_SMALL); + if(imageList) ImageList_Destroy(imageList); + imageList = ImageList_Create(15, 15, ILC_COLOR32, 1, 0); - bool found = false; - for(auto &row : listView.state.image) { - for(auto &column : row) { - if(column.empty() == false) { - found = true; - break; + imageMap.reset(); + images.reset(); + images.append(nall::image()); //empty icon for cells without an image assigned (I_IMAGENONE does not work) + + //create a vector of unique images from all images used (many cells may use the same image) + for(unsigned y = 0; y < list.size(); y++) { + for(unsigned x = 0; x < list[y].size(); x++) { + bool found = false; + for(unsigned z = 0; z < images.size(); z++) { + if(list[y][x] == images[z]) { + found = true; + imageMap(y)(x) = z; + break; + } + } + + if(found == false) { + imageMap(y)(x) = images.size(); + images.append(list[y][x]); } } } - if(found == false) return; - imageList = ImageList_Create(15, 15, ILC_COLOR32, 1, 0); - nall::image image; - image.allocate(15, 15); - image.clear(GetSysColor(COLOR_WINDOW)); - ImageList_Add(imageList, CreateBitmap(image), NULL); + //build image list + for(auto &imageItem : images) ImageList_Append(imageList, imageItem); + if(images.size() <= 1) return; - for(unsigned row = 0; row < list.size(); row++) { - for(unsigned column = 0; column < list(row).size(); column++) { - nall::image image = list(row)(column); - if(image.empty()) continue; - image.transform(0, 32, 255u << 24, 255u << 16, 255u << 8, 255u << 0); - image.scale(15, 15, Interpolation::Linear); - ImageList_Add(imageList, CreateBitmap(image), NULL); - } - } - - ListView_SetImageList(hwnd, imageList, LVSIL_SMALL); - - unsigned ID = 1; - for(unsigned row = 0; row < list.size(); row++) { - for(unsigned column = 0; column < list(row).size(); column++) { - if(list(row)(column).empty()) continue; //I_IMAGENONE does not work properly - LVITEM item; - item.mask = LVIF_IMAGE; - item.iItem = row; - item.iSubItem = column; - item.iImage = ID++; - ListView_SetItem(hwnd, &item); + //set images for all cells + for(unsigned y = 0; y < columns; y++) { + for(unsigned x = 0; x < rows; x++) { + ListView_SetImage(hwnd, imageList, y, x, imageMap(y)(x)); } } } diff --git a/shaders/Archive/HDR-TV.OpenGL.shader b/shaders/Archive/HDR-TV.OpenGL.shader new file mode 100644 index 00000000..929f378a --- /dev/null +++ b/shaders/Archive/HDR-TV.OpenGL.shader @@ -0,0 +1,17 @@ +shader language=GLSL + vertex~ + void main(void) { + gl_Position = ftransform(); + gl_TexCoord[0] = gl_MultiTexCoord0; + } + + fragment~ filter=linear + uniform sampler2D rubyTexture; + + void main(void) { + vec4 rgb = texture2D(rubyTexture, gl_TexCoord[0].xy); + vec4 intens = smoothstep(0.2,0.8,rgb) + normalize(vec4(rgb.xyz, 1.0)); + + if(fract(gl_FragCoord.y * 0.5) > 0.5) intens = rgb * 0.8; + gl_FragColor = intens; + } diff --git a/shaders/Archive/Watercolor.OpenGL.shader b/shaders/Archive/Watercolor.OpenGL.shader new file mode 100644 index 00000000..5bce374e --- /dev/null +++ b/shaders/Archive/Watercolor.OpenGL.shader @@ -0,0 +1,61 @@ +shader language=GLSL + vertex~ + uniform vec2 rubyTextureSize; + + void main() + { + float x = 0.5 * (1.0 / rubyTextureSize.x); + float y = 0.5 * (1.0 / rubyTextureSize.y); + vec2 dg1 = vec2( x, y); + vec2 dg2 = vec2(-x, y); + vec2 dx = vec2(x, 0.0); + vec2 dy = vec2(0.0, y); + + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + gl_TexCoord[0] = gl_MultiTexCoord0; + gl_TexCoord[1].xy = gl_TexCoord[0].xy - dg1; + gl_TexCoord[1].zw = gl_TexCoord[0].xy - dy; + gl_TexCoord[2].xy = gl_TexCoord[0].xy - dg2; + gl_TexCoord[2].zw = gl_TexCoord[0].xy + dx; + gl_TexCoord[3].xy = gl_TexCoord[0].xy + dg1; + gl_TexCoord[3].zw = gl_TexCoord[0].xy + dy; + gl_TexCoord[4].xy = gl_TexCoord[0].xy + dg2; + gl_TexCoord[4].zw = gl_TexCoord[0].xy - dx; + } + + fragment~ filter=linear + vec4 compress(vec4 in_color, float threshold, float ratio) + { + vec4 diff = in_color - vec4(threshold); + diff = clamp(diff, 0.0, 100.0); + return in_color - (diff * (1.0 - 1.0/ratio)); + } + + uniform sampler2D rubyTexture; + uniform vec2 rubyTextureSize; + + void main() + { + vec3 c00 = texture2D(rubyTexture, gl_TexCoord[1].xy).xyz; + vec3 c01 = texture2D(rubyTexture, gl_TexCoord[4].zw).xyz; + vec3 c02 = texture2D(rubyTexture, gl_TexCoord[4].xy).xyz; + vec3 c10 = texture2D(rubyTexture, gl_TexCoord[1].zw).xyz; + vec3 c11 = texture2D(rubyTexture, gl_TexCoord[0].xy).xyz; + vec3 c12 = texture2D(rubyTexture, gl_TexCoord[3].zw).xyz; + vec3 c20 = texture2D(rubyTexture, gl_TexCoord[2].xy).xyz; + vec3 c21 = texture2D(rubyTexture, gl_TexCoord[2].zw).xyz; + vec3 c22 = texture2D(rubyTexture, gl_TexCoord[3].xy).xyz; + + vec2 tex = gl_TexCoord[0].xy; + vec2 texsize = rubyTextureSize; + + vec3 first = mix(c00, c20, fract(tex.x * texsize.x + 0.5)); + vec3 second = mix(c02, c22, fract(tex.x * texsize.x + 0.5)); + + vec3 mid_horiz = mix(c01, c21, fract(tex.x * texsize.x + 0.5)); + vec3 mid_vert = mix(c10, c12, fract(tex.y * texsize.y + 0.5)); + + vec3 res = mix(first, second, fract(tex.y * texsize.y + 0.5)); + vec4 final = vec4(0.26 * (res + mid_horiz + mid_vert) + 3.5 * abs(res - mix(mid_horiz, mid_vert, 0.5)), 1.0); + gl_FragColor = compress(final, 0.8, 5.0); + } diff --git a/shaders/Curvature.OpenGL.shader b/shaders/Curvature.OpenGL.shader new file mode 100644 index 00000000..2a7083a5 --- /dev/null +++ b/shaders/Curvature.OpenGL.shader @@ -0,0 +1,22 @@ + + + + diff --git a/shaders/HQ2x.OpenGL.shader b/shaders/HQ2x.OpenGL.shader new file mode 100644 index 00000000..ef507728 --- /dev/null +++ b/shaders/HQ2x.OpenGL.shader @@ -0,0 +1,73 @@ + + + + + + diff --git a/shaders/Makefile b/shaders/Makefile new file mode 100644 index 00000000..5180834a --- /dev/null +++ b/shaders/Makefile @@ -0,0 +1,4 @@ +install: + mkdir -p ~/.config/bsnes/shaders + chmod 777 ~/.config/bsnes/shaders + cp *.shader ~/.config/bsnes/shaders diff --git a/shaders/Pixellate.OpenGL.shader b/shaders/Pixellate.OpenGL.shader new file mode 100644 index 00000000..4ddcae18 --- /dev/null +++ b/shaders/Pixellate.OpenGL.shader @@ -0,0 +1,44 @@ + + + + + + diff --git a/shaders/Scale2x.OpenGL.shader b/shaders/Scale2x.OpenGL.shader new file mode 100644 index 00000000..cfe0e689 --- /dev/null +++ b/shaders/Scale2x.OpenGL.shader @@ -0,0 +1,55 @@ + + + + + = 0.5) { tmp = colB; colB = colH; colH = tmp; } //E1 (or E3): swap B and H + if(sel.x >= 0.5) { tmp = colF; colF = colD; colD = tmp; } //E2 (or E3): swap D and F + + if(colB == colD && colB != colF && colD != colH) { //do the Scale2x rule + col = colD; + } + + gl_FragColor = col; + } + ]]> + diff --git a/shaders/Sepia.Direct3D.shader b/shaders/Sepia.Direct3D.shader new file mode 100644 index 00000000..1fa725e2 --- /dev/null +++ b/shaders/Sepia.Direct3D.shader @@ -0,0 +1,30 @@ + + + ; }; + float3 LightColor = { 1.0, 0.7, 0.5 }; + float3 DarkColor = { 0.2, 0.05, 0.0 }; + + float4 DiffColorPass(in float2 Tex : TEXCOORD0) : COLOR0 + { + vec.x = 0.5; + vec.y = 1.0; + float3 scnColor = LightColor * tex2D(s0, Tex).xyz; + float3 grayXfer = float3(0.3, 0.59, 0.11); + float gray = dot(grayXfer, scnColor); + float3 muted = lerp(scnColor, gray.xxx, vec.x); + float3 sepia = lerp(DarkColor, LightColor, gray); + float3 result = lerp(muted, sepia, vec.y); + return float4(result, 1); + } + + Technique T0 + { + pass p0 { PixelShader = compile ps_2_0 DiffColorPass(); } + } + ]]> +