Merge ..\zilmar into PropertySheetsTemp

This commit is contained in:
Julio C. Rocha 2015-09-23 20:06:48 -07:00
commit e178ec96fc
88 changed files with 1751 additions and 710 deletions

View File

@ -1,4 +1,4 @@
// ============ RDB for PJ64 v2.2. GoodN64 v321 ===================================== // ============ RDB for PJ64 v2.2. GoodN64 v321 =====================================
// PJ64 v2.2 Official RDB // PJ64 v2.2 Official RDB
// Not for use with PJ64 v1.6 or previous // Not for use with PJ64 v1.6 or previous
//---- START OF RDB FILE HEADER --------------------------------------------------------- //---- START OF RDB FILE HEADER ---------------------------------------------------------
@ -1386,14 +1386,16 @@ Status=Compatible
[A5F667E1-DA1FBD1F-C:4A] [A5F667E1-DA1FBD1F-C:4A]
Good Name=Derby Stallion 64 (J) Good Name=Derby Stallion 64 (J)
Internal Name=DERBYSTALLION 64 Internal Name=DERBYSTALLION 64
Save Type=FlashRam
Status=Compatible Status=Compatible
AiCountPerBytes=200 AiCountPerBytes=200
Sync Audio=0
[96BA4EFB-C9988E4E-C:0] [96BA4EFB-C9988E4E-C:0]
Good Name=Derby Stallion 64 (J) (Beta) Good Name=Derby Stallion 64 (J) (Beta)
Internal Name= Internal Name=
Status=Unsupported Save Type=FlashRam
Status=Compatible
CRC-Recalc=Yes
[630AA37D-896BD7DB-C:50] [630AA37D-896BD7DB-C:50]
Good Name=Destruction Derby 64 (E) (M3) Good Name=Destruction Derby 64 (E) (M3)
@ -1706,6 +1708,12 @@ Internal Name=DUKE NUKEM
Status=Compatible Status=Compatible
Plugin Note=[video] depth problem; use Glide64 Plugin Note=[video] depth problem; use Glide64
[FF14C1DA-167FDE92-C:45]
Good Name=Duke Nukem 64 (Prototype)
Internal Name=duke
Status=Compatible
Plugin Note=[video] depth problem; use Glide64
[1E12883D-D3B92718-C:46] [1E12883D-D3B92718-C:46]
Good Name=Duke Nukem 64 (F) Good Name=Duke Nukem 64 (F)
Internal Name=DUKE NUKEM Internal Name=DUKE NUKEM
@ -1952,6 +1960,16 @@ RDRAM Size=8
Culling=1 Culling=1
AllowROMWrites=Yes AllowROMWrites=Yes
[C6E39C0A-D2726676-C:45]
Good Name=F-ZERO X + Expansion Kit (U) [CART HACK]
Status=Compatible
Core Note=(see GameFAQ)
Plugin Note=[video] (see GameFAQ)
32bit=No
RDRAM Size=8
Culling=1
AllowROMWrites=Yes
[3CECBCB8-6126BF07-C:50] [3CECBCB8-6126BF07-C:50]
Good Name=F1 Racing Championship (E) (M5) Good Name=F1 Racing Championship (E) (M5)
Internal Name=F1RacingChampionship Internal Name=F1RacingChampionship
@ -2112,21 +2130,22 @@ Culling=1
[F774EAEE-F0D8B13E-C:4A] [F774EAEE-F0D8B13E-C:4A]
Good Name=Fushigi no Dungeon - Fuurai no Shiren 2 - Oni Shuurai! Shiren Jou! (J) Good Name=Fushigi no Dungeon - Fuurai no Shiren 2 - Oni Shuurai! Shiren Jou! (J)
Internal Name=F3 ̳ײɼÚÝ2 Internal Name=F3 フウライノシレン2
Status=Uncertain Status=Issues (plugin)
Core Note=? Plugin Note=[video] missing:graphics (see GameFAQ)
Plugin Note=[video] (see GameFAQ)
32bit=No
Clear Frame=2
Counter Factor=1 Counter Factor=1
Culling=1 32bit=No
Self Texture=1
//================ G ================ //================ G ================
[68FCF726-49658CBC-C:50] [68FCF726-49658CBC-C:50]
Good Name=G.A.S.P!! Fighters' NEXTream (E) Good Name=G.A.S.P!! Fighters' NEXTream (E)
Internal Name=G.A.S.P!!Fighters'NE Internal Name=G.A.S.P!!Fighters'NE
Status=Compatible Status=Compatible
SMM-Cache=0
SMM-FUNC=0
SMM-PI DMA=0
SMM-Protect=1
SMM-TLB=0
Culling=1 Culling=1
RDRAM Size=8 RDRAM Size=8
@ -2134,6 +2153,11 @@ RDRAM Size=8
Good Name=G.A.S.P!! Fighters' NEXTream (J) Good Name=G.A.S.P!! Fighters' NEXTream (J)
Internal Name=G.A.S.P!!Fighters'NE Internal Name=G.A.S.P!!Fighters'NE
Status=Compatible Status=Compatible
SMM-Cache=0
SMM-FUNC=0
SMM-PI DMA=0
SMM-Protect=1
SMM-TLB=0
RDRAM Size=8 RDRAM Size=8
[457B9CD9-09C55352-C:4A] [457B9CD9-09C55352-C:4A]
@ -2406,8 +2430,8 @@ Counter Factor=1
[3E70E866-4438BAE8-C:4A] [3E70E866-4438BAE8-C:4A]
Good Name=Heiwa Pachinko World 64 (J) Good Name=Heiwa Pachinko World 64 (J)
Internal Name=HEIWA ÊßÁݺ Ü°ÙÄÞ64 Internal Name=HEIWA ÊßÁݺ Ü°ÙÄÞ64
Status=Uncertain Status=Issues (plugin)
Plugin Note=[video] unsupported; use Glide64; errors:? Plugin Note=[video] use Glide64; errors:various
RDRAM Size=8 RDRAM Size=8
[AE90DBEB-79B89123-C:50] [AE90DBEB-79B89123-C:50]
@ -2808,8 +2832,7 @@ Status=Compatible
[C73AD016-48C5537D-C:4A] [C73AD016-48C5537D-C:4A]
Good Name=Jangou Simulation Mahjong Dou 64 (J) Good Name=Jangou Simulation Mahjong Dou 64 (J)
Internal Name=Ï°¼Þ¬ÝÄÞ³64 Internal Name=Ï°¼Þ¬ÝÄÞ³64
Status=Only intro/part OK Status=Compatible
Core Note=crashes
[C99936D1-23D1D65D-C:4A] [C99936D1-23D1D65D-C:4A]
Good Name=Japan Pro Golf Tour 64 (J) [CART HACK] Good Name=Japan Pro Golf Tour 64 (J) [CART HACK]
@ -3085,7 +3108,7 @@ Good Name=King Hill 64 - Extreme Snowboarding (J)
Internal Name=KING HILL 64 Internal Name=KING HILL 64
Status=Issues (core) Status=Issues (core)
Core Note=no sound Core Note=no sound
Plugin Note=[video] errors:menu snowflakes Plugin Note=[video] errors:menu snowflakes; use Glide64
RDRAM Size=8 RDRAM Size=8
[75BC6AD6-78552BC9-C:4A] [75BC6AD6-78552BC9-C:4A]
@ -3447,6 +3470,7 @@ Self Texture=1
Good Name=Mario Kart 64 (E) (V1.0) Good Name=Mario Kart 64 (E) (V1.0)
Internal Name=MARIOKART64 Internal Name=MARIOKART64
Status=Compatible Status=Compatible
Cheat0=81001A38 2409,81001A3A 0002,81001A3C 2409,81001A3E 0002,81001C90 240A,81001C92 0002,81001C94 240A,81001C96 0002 //Multiplayer timing fix
Plugin Note=[video] (see GameFAQ) Plugin Note=[video] (see GameFAQ)
Culling=1 Culling=1
Primary Frame Buffer=1 Primary Frame Buffer=1
@ -3455,6 +3479,7 @@ Primary Frame Buffer=1
Good Name=Mario Kart 64 (E) (V1.1) Good Name=Mario Kart 64 (E) (V1.1)
Internal Name=MARIOKART64 Internal Name=MARIOKART64
Status=Compatible Status=Compatible
Cheat0=81001A38 2409,81001A3A 0002,81001A3C 2409,81001A3E 0002,81001C90 240A,81001C92 0002,81001C94 240A,81001C96 0002 //Multiplayer timing fix
Plugin Note=[video] (see GameFAQ) Plugin Note=[video] (see GameFAQ)
Culling=1 Culling=1
Primary Frame Buffer=1 Primary Frame Buffer=1
@ -3463,6 +3488,7 @@ Primary Frame Buffer=1
Good Name=Mario Kart 64 (J) (V1.0) Good Name=Mario Kart 64 (J) (V1.0)
Internal Name=MARIOKART64 Internal Name=MARIOKART64
Status=Compatible Status=Compatible
Cheat0=81001A38 2409,81001A3A 0002,81001A3C 2409,81001A3E 0002,81001C90 240A,81001C92 0002,81001C94 240A,81001C96 0002 //Multiplayer timing fix
Plugin Note=[video] (see GameFAQ) Plugin Note=[video] (see GameFAQ)
Culling=1 Culling=1
Primary Frame Buffer=1 Primary Frame Buffer=1
@ -3471,6 +3497,7 @@ Primary Frame Buffer=1
Good Name=Mario Kart 64 (J) (V1.1) Good Name=Mario Kart 64 (J) (V1.1)
Internal Name=MARIOKART64 Internal Name=MARIOKART64
Status=Compatible Status=Compatible
Cheat0=81001A38 2409,81001A3A 0002,81001A3C 2409,81001A3E 0002,81001C90 240A,81001C92 0002,81001C94 240A,81001C96 0002 //Multiplayer timing fix
Plugin Note=[video] (see GameFAQ) Plugin Note=[video] (see GameFAQ)
Culling=1 Culling=1
Primary Frame Buffer=1 Primary Frame Buffer=1
@ -3479,6 +3506,7 @@ Primary Frame Buffer=1
Good Name=Mario Kart 64 (U) Good Name=Mario Kart 64 (U)
Internal Name=MARIOKART64 Internal Name=MARIOKART64
Status=Compatible Status=Compatible
Cheat0=81001A38 2409,81001A3A 0002,81001A3C 2409,81001A3E 0002,81001C90 240A,81001C92 0002,81001C94 240A,81001C96 0002 //Multiplayer timing fix
Plugin Note=[video] (see GameFAQ) Plugin Note=[video] (see GameFAQ)
Culling=1 Culling=1
Primary Frame Buffer=1 Primary Frame Buffer=1
@ -3486,9 +3514,8 @@ Primary Frame Buffer=1
[9A9890AC-F0C313DF-C:4A] [9A9890AC-F0C313DF-C:4A]
Good Name=Mario no Photopi (J) Good Name=Mario no Photopi (J)
Internal Name=ÏصÉÌ«ÄËß° Internal Name=ÏصÉÌ«ÄËß°
Status=Needs video plugin Status=Needs RSP plugin
Plugin Note=[video] HLE not supported; major errors Plugin Note=[rsp] needs semaphore lock
HLE GFX=No
[9C663069-80F24A80-C:50] [9C663069-80F24A80-C:50]
Good Name=Mario Party (E) (M3) Good Name=Mario Party (E) (M3)
@ -4223,7 +4250,8 @@ Culling=1
[5B9B1618-1B43C649-C:4A] [5B9B1618-1B43C649-C:4A]
Good Name=Nushi Duri 64 - Shiokaze ni Notte (J) Good Name=Nushi Duri 64 - Shiokaze ni Notte (J)
Internal Name=ǼÂÞØ64¼µ¶¾ÞÆɯà Internal Name=ǼÂÞØ64¼µ¶¾ÞÆɯÃ
Status=Unsupported Status=Compatible
Plugin Note=[video] missing:lots; use Glide64
//================ O ================ //================ O ================
[812289D0-C2E53296-C:50] [812289D0-C2E53296-C:50]
@ -5071,8 +5099,7 @@ RDRAM Size=8
[272B690F-AD0A7A77-C:4A] [272B690F-AD0A7A77-C:4A]
Good Name=Robot Ponkottsu 64 - 7tsu no Umi no Caramel (J) Good Name=Robot Ponkottsu 64 - 7tsu no Umi no Caramel (J)
Internal Name=Robopon64 Internal Name=Robopon64
Status=Uncertain Status=Compatible
Core Note=TLB used?
Clear Frame=1 Clear Frame=1
Save Type=16kbit Eeprom Save Type=16kbit Eeprom
@ -6769,7 +6796,7 @@ Good Name=Twisted Edge Extreme Snowboarding (E)
Internal Name=TWISTED EDGE Internal Name=TWISTED EDGE
Status=Issues (core) Status=Issues (core)
Core Note=no sound Core Note=no sound
Plugin Note=[video] errors:menu snowflakes; Plugin Note=[video] errors:menu snowflakes; use Glide64
RDRAM Size=8 RDRAM Size=8
[BBC99D32-117DAA80-C:45] [BBC99D32-117DAA80-C:45]
@ -6777,7 +6804,7 @@ Good Name=Twisted Edge Extreme Snowboarding (U)
Internal Name=TWISTED EDGE Internal Name=TWISTED EDGE
Status=Issues (core) Status=Issues (core)
Core Note=no sound Core Note=no sound
Plugin Note=[video] errors:menu snowflakes; Plugin Note=[video] errors:menu snowflakes; use Glide64
Culling=1 Culling=1
RDRAM Size=8 RDRAM Size=8
@ -8598,3 +8625,44 @@ Core Note=slow
Good Name=Yoshi's Story BootEmu (PD) Good Name=Yoshi's Story BootEmu (PD)
Internal Name=YOSHI BOOT EMU Internal Name=YOSHI BOOT EMU
Status=Unsupported Status=Unsupported
[5A4C57FE-AA6807C4-C:41]
Good Name=NUS-64 Aging Cassette
Internal Name=AGING ROM
Status=Needs RSP plugin
[BB0598C7-AE917C5D-C:0]
Good Name=64GB Checker V1.05
Internal Name=64GB Checker V1.05
Status=Compatible
[816BE37F-9BCE6CAA-C:0]
Good Name=Dolphin Controller Test
Internal Name=Dolphin Controller Test
Status=Compatible
[6F46DA42-D971A312-C:45]
Good Name=Ronaldinho's Soccer 64
Internal Name=RONALDINHO SOCCER
Status=Compatible
Plugin Note=[video] errors:shadows; use Glide64
AiCountPerBytes=200
Counter Factor=1
Culling=1
[A01B8D3B-E0FAC46F-C:0]
Good Name=Photo Viewer
Internal Name=Photo Viewer
Status=Compatible
[2F33EFCA-6CA95A9C-C:0]
Good Name=funnelcube (PD)
Internal Name=funnelcube
Status=Compatible
[D55891EB-2BEFD9C8-C:0]
Good Name=MGC 2011 Demo (PD)
Internal Name=shut up and code
CPU Type=Interpreter
RDRAM Size=8
Status=Unsupported

View File

@ -8,17 +8,17 @@
#4 # "6 Mai 2015" // Date #4 # "6 Mai 2015" // Date
//About DLL Dialog //About DLL Dialog
#5 # "Langue en cours" #5 # "Langue actuelle"
#6 # "Auteur" #6 # "Auteur"
#7 # "Version" #7 # "Version"
#8 # "Date" #8 # "Date"
#9 # "Visiter le Site Web" #9 # "Visiter le site web"
#10 # "Base de données des ROMs (.RDB)" #10 # "Base de données des ROM (.rdb)"
#11 # "Fichier des Codes Cheats (.CHT)" #11 # "Fichier des cheats (.cht)"
#12 # "Info sur les ROM étendues (.RDX)" #12 # "Infos sur les ROM étendues (.rdx)"
//About INI title //About INI title
#20 # "A Propos Des Fichiers Config" #20 # "À propos des fichiers de configuration"
/********************************************************************************* /*********************************************************************************
* Menu * * Menu *
@ -26,55 +26,55 @@
//File Menu //File Menu
#100# "&Fichier" #100# "&Fichier"
#101# "&Ouvrir une ROM" #101# "&Ouvrir une ROM"
#102# "&Info sur la ROM..." #102# "&Infos sur la ROM…"
#103# "Démarrer l'Emulation" #103# "Démarrer l’émulation"
#104# "Arrêter l'Emulation" #104# "Arrêter l’émulation"
#105# "Choisir le Répertoire ROM..." #105# "Choisir le répertoire des ROM…"
#106# "Rafraîchir la Liste de ROM" #106# "Rafraîchir la liste des ROM"
#107# "ROM Récente" #107# "ROM récentes"
#108# "Répertoires ROM Récente" #108# "Répertoires des ROM récentes"
#109# "&Quitter" #109# "&Quitter"
//System Menu //System Menu
#120# "&Système" #120# "&Système"
#121# "&Redémarrer" #121# "&Redémarrer"
#122# "&Pause" #122# "&Pause"
#123# "&Capture d'Ecran" #123# "&Capture d’écran"
#124# "Limiter les FPS" #124# "Limiter les FPS"
#125# "&Sauvegarder l'Etat" #125# "&Sauvegarder l’état"
#126# "Sauvegarder Sous..." #126# "Sauvegarder sous…"
#127# "&Charger un Etat" #127# "&Charger un état"
#128# "Charger..." #128# "Charger"
#129# "Sauvegarder l'&Etat en Cours" #129# "Sauvegarder l&état actuel"
#130# "Cheats..." #130# "Cheats"
#131# "Bouton GameShark (Cheats)" #131# "Bouton GameShark (cheats)"
#132# "R&eprendre" #132# "R&eprendre"
#133# "Redémarrage &Logiciel" #133# "Redémarrage &logiciel"
#134# "Redémarrage &Matériel" #134# "Redémarrage &matériel"
//Options Menu //Options Menu
#140# "&Options" #140# "&Options"
#141# "&Plein écran" #141# "&Plein écran"
#142# "&Afficher la Fenêtre au Premier Plan" #142# "&Toujours visible"
#143# "Configurer le Plugin Graphique..." #143# "Configurer le plugin graphique…"
#144# "Configurer le Plugin Audio..." #144# "Configurer le plugin audio…"
#145# "Configurer le Plugin Contrôleur..." #145# "Configurer le plugin contrôleur…"
#146# "Configurer le Plugin RSP..." #146# "Configurer le plugin RSP…"
#147# "Afficher l'Utilisation du CPU" #147# "Afficher lutilisation du CPU"
#148# "&Paramètres..." #148# "&Paramètres"
//Debugger Menu //Debugger Menu
#160# "&Débugeur" #160# "&Débogueur"
//Language Menu //Language Menu
#175# "&Langage" #175# "&Langage"
//Help MenuAide" //Help Menu
#180# "&Aide" #180# "&Aide"
#181# "A Propos Des Fichiers Conf&ig" #181# "À propos des fichiers de conf&iguration"
#182# "&A Propos De Project64" #182# "À &propos de Project64"
#183# "&Forum de Support" #183# "&Forum de support"
#184# "Site &Web" #184# "Site &web"
//Current Save Slot menu //Current Save Slot menu
#190# "Défaut" #190# "Défaut"
@ -90,94 +90,94 @@
#200# "Emplacement 10" #200# "Emplacement 10"
//Pop up Menu //Pop up Menu
#210# "Lancer le Jeu" #210# "Lancer le jeu"
#211# "Information sur la ROM" #211# "Informations sur la ROM"
#212# "Editer les Paramètres du Jeu" #212# "Éditer les paramètres du jeu"
#213# "Editer les Cheats" #213# "Éditer les cheats"
#214# "Plugin Graphiques" #214# "Plugin graphique"
//Alternate Name to save Slot //Alternate Name to save Slot
#220# "Sauvegarder l'Emplacement - Défaut" #220# "Emplacement de sauvegarde - Défaut"
#221# "Sauvegarder l'Emplacement - 1" #221# "Emplacement de sauvegarde - 1"
#222# "Sauvegarder l'Emplacement - 2" #222# "Emplacement de sauvegarde - 2"
#223# "Sauvegarder l'Emplacement - 3" #223# "Emplacement de sauvegarde - 3"
#224# "Sauvegarder l'Emplacement - 4" #224# "Emplacement de sauvegarde - 4"
#225# "Sauvegarder l'Emplacement - 5" #225# "Emplacement de sauvegarde - 5"
#226# "Sauvegarder l'Emplacement - 6" #226# "Emplacement de sauvegarde - 6"
#227# "Sauvegarder l'Emplacement - 7" #227# "Emplacement de sauvegarde - 7"
#228# "Sauvegarder l'Emplacement - 8" #228# "Emplacement de sauvegarde - 8"
#229# "Sauvegarder l'Emplacement - 9" #229# "Emplacement de sauvegarde - 9"
#230# "Sauvegarder l'Emplacement - 10" #230# "Emplacement de sauvegarde - 10"
// Menu Descriptions // Menu Descriptions
#250# "Ouvrir une Image ROM N64" #250# "Ouvrir une image ROM N64"
#251# "Afficher les informations concernant l'image chargé" #251# "Afficher les informations concernant limage chargée"
#252# "Lancer l'émulation d'une image ROM chargé" #252# "Lancer lémulation de limage ROM chargée"
#253# "Arrêter l'émulation d'une image ROM chargé" #253# "Arrêter lémulation de limage ROM chargée"
#254# "Sélectionner le répertoire de la ROM" #254# "Sélectionner le répertoire des ROM"
#255# "Rafraîchir la liste de ROMS en cours dans le navigateur de ROM" #255# "Rafraîchir la liste actuelle des ROM dans le navigateur de ROM"
#256# "Quitter l'application" #256# "Quitter lapplication"
#257# "Redémarrer l'image de la ROM en cours (recharger tous les changements de paramètres)" #257# "Redémarrer limage ROM actuelle (recharger tous les changements de paramètres)"
#258# "Mettre en pause/reprendre l'émulation de la ROM lancé en cours" #258# "Mettre en pause/reprendre lémulation de la ROM lancée"
#259# "Générer une image bitmap de l'écran en cours" #259# "Générer une image bitmap de lécran actuel"
#260# "Limiter les FPS à la bonne vitesse de la N64" #260# "Limiter les FPS à la bonne vitesse de la N64"
#261# "Sauvegarder l'état du système en cours" #261# "Sauvegarder létat actuel du système"
#262# "Sauvegarder l'état du système en cours dans l'emplacement du fichier sélectionné" #262# "Sauvegarder létat actuel du système à lemplacement du fichier sélectionné"
#263# "Charger l'état du système sauvegardé" #263# "Charger létat du système sauvegardé"
#264# "Choisir un fichier d'état système sauvegardé à charger" #264# "Choisir un fichier détat système sauvegardé à charger"
#265# "Activer/Désactiver les cheats GameShark" #265# "Activer/désactiver les cheats GameShark"
#266# "Le bouton GameShark est utilisé avec des cheats spécifique." #266# "Le bouton GameShark est utilisé avec des cheats spécifiques."
#267# "Basculer l'émulation du mode fenêtré vers le mode plein écran." #267# "Basculer lémulation du mode fenêtré vers le mode plein écran."
#268# "Permet de mettre la fenêtre Project64 au premier plan" #268# "Permet de mettre la fenêtre Project64 au premier plan"
#269# "Configurer le plugin graphique" #269# "Configurer le plugin graphique"
#270# "Configurer le plugin audio" #270# "Configurer le plugin audio"
#271# "Configurer le plugin contrôleur (ex : choisir les touches)" #271# "Configurer le plugin contrôleur (ex : choisir les touches)"
#272# "Configurer le plugin RSP" #272# "Configurer le plugin RSP"
#273# "Afficher l'utilisation du CPU de l'émulateur répartie sur les différentes tâches" #273# "Afficher lutilisation du CPU de lémulateur répartie sur les différentes tâches"
#274# "Voir/changer les paramètres pour cette application" #274# "Voir/changer les paramètres pour cette application"
#275# "Voir le manuel pour l'application" #275# "Voir le manuel pour lapplication"
#276# "Voir la FAQ pour l'application" #276# "Voir la FAQ pour lapplication"
#278# "A Propos de l'application et des auteurs" #278# "À propos de lapplication et des auteurs"
#277# "A Propos des auteurs sur les fichiers de support" #277# "À propos des auteurs sur les fichiers de support"
#279# "Ouvrir l'image ROM ouverte précédemment" #279# "Ouvrir limage ROM ouverte précédemment"
#280# "Choisir ce répertoire comme votre répertoire de jeu" #280# "Choisir ce répertoire comme votre répertoire de jeu"
#281# "Changer l'application pour utiliser cette langue" #281# "Changer lapplication pour utiliser cette langue"
#282# "Choisir l'emplacement de sauvegarde pour l'état sauvegardé" #282# "Choisir lemplacement de sauvegarde pour létat sauvegardé"
#283# "Jouer au jeu sélectionné" #283# "Jouer au jeu sélectionné"
#284# "Information concernant le jeu sélectionné" #284# "Informations concernant le jeu sélectionné"
#285# "Editer les paramètres pour le jeu sélectionné" #285# "Éditer les paramètres pour le jeu sélectionné"
#286# "Editer les cheats pour le jeu sélectionné" #286# "Éditer les cheats pour le jeu sélectionné"
/********************************************************************************* /*********************************************************************************
* ROM Browser * * ROM Browser *
*********************************************************************************/ *********************************************************************************/
//ROM Browser Fields //ROM Browser Fields
#300# "Nom du Fichier" #300# "Nom du fichier"
#301# "Nom Interne" #301# "Nom interne"
#302# "Nom Correcte (GOODN64)" #302# "Nom correct (GoodN64)"
#303# "Statut" #303# "Statut"
#304# "Taille de la ROM" #304# "Taille de la ROM"
#305# "Notes (noyau)" #305# "Notes (noyau)"
#306# "Notes (plugins par défaut)" #306# "Notes (plugins par défaut)"
#307# "Notes (utilisateur)" #307# "Notes (utilisateur)"
#308# "ID de la Cartouche" #308# "ID de la cartouche"
#309# "Constructeur" #309# "Constructeur"
#310# "Pays" #310# "Pays"
#311# "Développeur" #311# "Développeur"
#312# "CRC1" #312# "CRC1"
#313# "CRC2" #313# "CRC2"
#314# "Puce CIC" #314# "Puce CIC"
#315# "Date de Sortie" #315# "Date de sortie"
#316# "Genre" #316# "Genre"
#317# "Joueurs" #317# "Joueurs"
#318# "Forcer le Feedback" #318# "Forcer le feedback"
#319# "Format de Fichier" #319# "Format de fichier"
//Select ROM //Select ROM
#320# "Sélectionner le Répertoire ROM en cours" #320# "Sélectionner le répertoire de ROM actuel"
//Messages //Messages
#340# "Mauvaise ROM ? Utilisez GoodN64 & vérifier la mise à jour de RDB" #340# "Mauvaise ROM ? Utilisez GoodN64 et vérifiez la mise à jour de RDB"
/********************************************************************************* /*********************************************************************************
* Options * * Options *
@ -189,122 +189,122 @@
#401# "Plugins" #401# "Plugins"
#402# "Répertoires" #402# "Répertoires"
#403# "Options" #403# "Options"
#404# "Sélection de la ROM" #404# "Navigateur de ROM"
#405# "Avancée" #405# "Avancé"
#406# "Paramètre Général" #406# "Paramètres généraux"
#407# "Intégration du Shell" #407# "Intégration au shell"
#408# "Notes" #408# "Notes"
#409# "Raccourcis Clavier" #409# "Raccourcis clavier"
#410# "Statut" #410# "Statut"
#411# "Recompileur" #411# "Recompilateur"
//Plugin Dialog //Plugin Dialog
#420# "A Propos De" #420# "À propos"
#421# " Plugin RSP (Reality Signal Processor) : " #421# " Plugin RSP (Reality Signal Processor) : "
#422# " Plugin Vidéo (graphique) : " #422# " Plugin vidéo (graphique) : "
#423# " Plugin Audio (son) : " #423# " Plugin audio (son) : "
#424# " Plugin Input (contrôleur) : " #424# " Plugin input (contrôleur) : "
#425# "Graphismes HLE" #425# "Graphismes HLE"
#426# "Audio HLE" #426# "Audio HLE"
#427# "** Utiliser le Système de Plugin **" #427# "** Utiliser le plugin système **"
//Directory Dialog //Directory Dialog
#440# " Répertoire Plugins : " #440# " Répertoire des plugins : "
#441# " Répertoire ROM : " #441# " Répertoire des ROM : "
#442# " Répertoire des Sauvegardes N64 natif : " #442# " Répertoire des sauvegardes N64 natives : "
#443# " Répertoire des Etats Sauvegardés : " #443# " Répertoire des sauvegardes détat : "
#444# " Répertoire des Captures d'Ecrans : " #444# " Répertoire des captures décran : "
#445# "Dernier Dossier d'où la ROM a été ouverte" #445# "Dernier répertoire doù la ROM a été ouverte"
#446# "Sélectionner le Répertoire Plugin" #446# "Sélectionner le répertoire des plugins"
#447# "Sélectionner le Répertoire ROM" #447# "Sélectionner le répertoire des ROM"
#448# "Sélectionner le Répertoire des Sauvegardes N64 natif" #448# "Sélectionner le répertoire des sauvegardes N64 natives"
#449# "Sélectionner le Répertoire des Etats Sauvegardés" #449# "Sélectionner le répertoire des sauvegardes détat"
#450# "Sélectionner le Répertoire des Copies d'Ecrans" #450# "Sélectionner le répertoire des captures décran"
#451# " Répertoire du Pack de Texture : " #451# " Répertoire du pack de textures : "
#452# "Sélectionner le Répertoire du Pack de Texture" #452# "Sélectionner le répertoire du pack de texture"
//Options (general) Tab //Options (general) Tab
#460# "Emulation en pause quand la fenêtre n'est pas active" #460# "Émulation en pause quand la fenêtre est inactive"
#461# "Entrer en mode Plein Ecran pendant le Chargement d'une ROM" #461# "Passer en plein écran au chargement dune ROM"
#462# "Cacher les Paramètres Avancées" #462# "Cacher les paramètres avancés"
#463# "Retenir les Cheats Sélectionnés" #463# "Retenir les cheats sélectionnés"
#464# "Désactiver l'Ecran de Veille pendant le Lancement d'une ROM" #464# "Désactiver lécran de veille quand une ROM est lancée"
#465# "Afficher la Vitesse" #465# "Afficher la vitesse"
#466# "Vitesse Affiché" #466# "Vitesse affichée :"
#467# "Vérifier si Project64 est déjà lancé" #467# "Vérifier si Project64 est déjà lancé"
//ROM Browser Tab //ROM Browser Tab
#480# "Max de ROMS à retenir (0-10) :" #480# "Max de ROM à retenir (0-10) :"
#481# "ROMs" #481# "ROM"
#482# "Max de répertoires ROM à retenir (0-10) :" #482# "Max de répertoires ROM à retenir (0-10) :"
#483# "répertoires" #483# "répertoires"
#484# "Utiliser le Navigateur de ROM" #484# "Utiliser le navigateur de ROM"
#485# "Utiliser la Récursivité du Répertoire" #485# "Utiliser également les sous-répertoires"
#486# "Champs Disponible :" #486# "Champs disponibles :"
#487# "Champs dans l'ordre :" #487# "Champs dans lordre :"
#488# "Ajouter ->" #488# "Ajouter ->"
#489# "<- Supprimer" #489# "<- Supprimer"
#490# "Haut" #490# "Haut"
#491# "Bas" #491# "Bas"
#492# "Rafraîchir Automatique le Navigateur" #492# "Rafraîchir automatiquement le navigateur"
//Advanced Options //Advanced Options
#500# "La plupart de ces changements ne prendront pas effet jusqu'à ce qu'une nouvelle ROM soit ouverte ou que la ROM en cours soit redémarré." #500# "La plupart de ces changements ne prendront pas effet avant quune nouvelle ROM soit ouverte ou que la ROM actuelle soit redémarrée."
#501# "Noyau par Défaut" #501# "Noyau par défaut"
#502# "Style du Noyau du CPU :" #502# "Style de noyau CPU :"
#503# "Méthodes Self mod" #503# "Méthodes Self Mod"
#504# "Taille de la Mémoire par Défaut :" #504# "Taille de la mémoire par défaut :"
#505# "Lien Avancée du Bloc :" #505# "Liaison de blocs avancée"
#506# "Démarrer l'émulation après le chargement des ROMS" #506# "Démarrer lémulation au chargement dune ROM"
#507# "Préférer les réglages du fichier RDB à ceux par défaut" #507# "Préférer les réglages du fichier RDB à ceux par défaut"
#508# "Compresser Automatiquement les Etats Sauvegardés" #508# "Compresser automatiquement les sauvegardes détat"
#509# "Activer le Débugeur" #509# "Activer le débogueur"
#510# "Cache" #510# "Cache"
#511# "PI DMA" #511# "PI DMA"
#512# "Lance le Changement" #512# "Lancer si modifié"
#513# "Mémoire Protégé" #513# "Protéger la mémoire"
#514# "TLB Non Défini" #514# "TLB unmapping"
//ROM Options //ROM Options
#520# "Style de Noyau :" #520# "Style de noyau CPU :"
#521# "Taux Rafraîchissement VI :" #521# "Taux de rafraîchissement VI :"
#522# "Taille de la Mémoire :" #522# "Taille de la mémoire :"
#523# "Lien Avancée du Bloc" #523# "Liaison de blocs avancée"
#524# "Type de Sauvegarde :" #524# "Type de sauvegarde :"
#525# "Compteur (Facteur) :" #525# "Facteur compteur :"
#526# "Augmentation Compilé du Tampon" #526# "Plus grand tampon de compilation"
#527# "Utiliser le TLB" #527# "Utiliser le TLB"
#528# "Registre en Cache" #528# "Mettre en cache les registres"
#529# "Retarder l'Interruption SI" #529# "Retarder linterruption SI"
#530# "SP Rapide" #530# "SP rapide"
#531# "Défaut" #531# "Défaut"
#532# "Signal Audio RSP" #532# "Signal audio RSP"
#533# "Correction du Timing Audio" #533# "Correction du timing audio"
#534# "Méthode Fonction Recherche :" #534# "Méthode de recherche de fonctions :"
#535# "Méthode Personnalisé self mod" #535# "Méthode self mod personnalisée"
#536# "Synchronisation Audio" #536# "Synchronisation audio"
#537# "Compteur AI par byte" #537# "Compteur AI par octet"
#538# "Moteur 32-bit" #538# "Moteur 32 bits"
#539# "Retarder l'Interruption DP" #539# "Retarder linterruption DP"
//Core Styles //Core Styles
#540# "Interpréteur" #540# "Interpréteur"
#541# "Recompileur" #541# "Recompilateur"
#542# "Synchroniser les Noyaux" #542# "Synchroniser les noyaux"
//Self Mod Methods //Self Mod Methods
#560# "Aucun" #560# "Aucun"
#561# "Cache" #561# "Cache"
#562# "Mémoire Protégé" #562# "Protéger la mémoire"
#563# "Vérifier la Mémoire & le Cache" #563# "Vérifier la mémoire et le cache"
#564# "Changer la Mémoire & le Cache" #564# "Changer la mémoire et le cache"
#565# "Vérifier la Mémoire Avancée" #565# "Vérifier la mémoire avancée"
#566# "Vider le Code du Cache" #566# "Vider le code du cache"
//Function Lookup method //Function Lookup method
#570# "Table de Recherche Physique" #570# "Table de recherche physique"
#571# "Table de Recherche Virtuelle" #571# "Table de recherche virtuelle"
#572# "Changer la Mémoire" #572# "Changer la mémoire"
//RDRAM Size //RDRAM Size
#580# "4 Mo" #580# "4 Mo"
@ -316,59 +316,59 @@
//Save Type //Save Type
#620# "Par défaut" #620# "Par défaut"
#621# "4-kbit EEPROM" #621# "4 kbit EEPROM"
#622# "16-kbit EEPROM" #622# "16 kbit EEPROM"
#623# "32-kbyte SRAM" #623# "32 ko SRAM"
#624# "Flash RAM" #624# "Flash RAM"
//Shell Integration Tab //Shell Integration Tab
#640# "Associer Fichier d'Extension :" #640# "Associer lextension de fichier :"
//ROM Notes //ROM Notes
#660# "Statut ROM :" #660# "Statut ROM :"
#661# "Note Noyau :" #661# "Note noyau :"
#662# "Note Plugin :" #662# "Note plugin :"
// Accelerator Selector // Accelerator Selector
#680# "Etat du CPU :" #680# "État du CPU :"
#681# "Menu Objet :" #681# "Menu objet :"
#682# "Touches en Cours :" #682# "Touches actuelles :"
#683# "Sélectionner Nouveau Raccourci :" #683# "Sélectionner nouveau raccourci :"
#684# "Actuellement Assigné à :" #684# "Actuellement assigné à :"
#685# "Assigner" #685# "Assigner"
#686# "Supprimer" #686# "Supprimer"
#687# "Tout Redémarrer" #687# "Tout Réinitialiser"
#688# "Le jeu ne se lance pas" #688# "Aucun jeu lancé"
#689# "Le jeu fonctionne" #689# "Un jeu est lancé"
#690# "Le jeu fonctionne (Fenêtré)" #690# "Un jeu est lancé (fenêtré)"
#691# "Le jeu fonctionne (Plein Ecran)" #691# "Un jeu est lancé (plein écran)"
// Frame Rate Option // Frame Rate Option
#700# "Interruptions Vertical par secondes" #700# "Interruptions verticales par seconde"
#701# "Afficher les listes par secondes" #701# "Listes daffichage par seconde"
#702# "Pourcentage à Pleine Vitesse" #702# "Pourcentage de la vitesse normale"
// Increase speed // Increase speed
#710# "Augmenter la Vitesse du Jeu" #710# "Augmenter la vitesse du jeu"
#711# "Diminuer la Vitesse du Jeu" #711# "Diminuer la vitesse du jeu"
//Bottom page buttons //Bottom page buttons
#720# "Redémarrer la Page" #720# "Réinitialiser la page"
#721# "Tout Redémarrer" #721# "Tout réinitialiser"
#722# "Appliquer" #722# "Appliquer"
/********************************************************************************* /*********************************************************************************
* ROM Information * * ROM Information *
*********************************************************************************/ *********************************************************************************/
//ROM Info Title //ROM Info Title
#800# "Information ROM" #800# "Informations sur la ROM"
//ROM Info Text //ROM Info Text
#801# "Nom de la ROM :" #801# "Nom de la ROM :"
#802# "Nom du Fichier :" #802# "Nom du fichier :"
#803# "Localisation :" #803# "Emplacement :"
#804# "Taille de la ROM :" #804# "Taille de la ROM :"
#805# "ID Cartouche :" #805# "ID cartouche :"
#806# "Développeur :" #806# "Développeur :"
#807# "Pays :" #807# "Pays :"
#808# "CRC1 :" #808# "CRC1 :"
@ -383,114 +383,114 @@
#1000# "Cheats" #1000# "Cheats"
#1001# "Cheats :" #1001# "Cheats :"
#1002# " Notes : " #1002# " Notes : "
#1003# "Tout Marquer" #1003# "Tout cocher"
#1004# "Rien Marquer" #1004# "Tout décocher"
//Add Cheat //Add Cheat
#1005# "Ajouter un Cheat" #1005# "Ajouter un cheat"
#1006# "Nom :" #1006# "Nom :"
#1007# "Code :" #1007# "Code :"
#1008# "Insérer" #1008# "Insérer"
#1009# "Vider" #1009# "Vider"
#1010# " Notes Cheat : " #1010# " Notes cheat : "
#1011# "Ajout à la BDD" #1011# "Ajouter à la BDD"
//Code extension //Code extension
#1012# "Code Extensions" #1012# "Extensions de code"
#1013# "Veuillez choisir une valeur a utilisé pour :" #1013# "Veuillez choisir une valeur à utiliser pour :"
#1014# "OK" #1014# "OK"
#1015# "Annuler" #1015# "Annuler"
//Digital Value //Digital Value
#1016# "Quantité de Chiffre" #1016# "Nombre quantité"
#1017# "Veuillez Choisir une Valeur pour :" #1017# "Veuillez choisir une valeur pour :"
#1018# "&Valeur" #1018# "&Valeur"
#1019# "depuis" #1019# "depuis"
#1020# "vers" #1020# "vers"
#1021# "&Notes :" #1021# "&Notes :"
#1022# "Ajouter un Cheat" #1022# "Ajouter un cheat"
#1023# "Nouveau Cheat" #1023# "nouveau cheat"
#1024# "<adresse> <valeur>" #1024# "<adresse> <valeur>"
#1025# "Options :" #1025# "Options :"
#1026# "<value> <label>" #1026# "<valeur> <label>"
//Edit Cheat //Edit Cheat
#1027# "Editer un Cheat" #1027# "Éditer un cheat"
#1028# "Mise à jour du Cheat" #1028# "Mettre à jour un cheat"
#1029# "Le Cheat a été changé.\n\nVoulez vous mettre à jour ?" #1029# "Le cheat a été modifié.\n\nVoulez vous mettre à jour ?"
#1030# "Cheat mise à jour" #1030# "Cheat mise à jour"
//Cheat Popup Menu //Cheat Popup Menu
#1040# "Ajouter un Nouveau Cheat..." #1040# "Ajouter un nouveau cheat…"
#1041# "Editer" #1041# "Éditer"
#1042# "Effacer" #1042# "Effacer"
// short-cut editor // short-cut editor
#1100# "Raz les Raccourcis" #1100# "Réinitialiser les raccourcis"
#1101# "Etes vous sûr de vouloir redémarrer les raccourcis ?\n\nCette action ne peut pas être annulé." #1101# "Êtes-vous sûr de vouloir réinitialiser les raccourcis?\n\nCette action ne peut pas être annulée."
#1102# "Menu Fichier" #1102# "Menu fichier"
#1103# "Menu Système" #1103# "Menu système"
#1104# "Options" #1104# "Options"
#1105# "Sauvegarder les Emplacements" #1105# "Emplacements de sauvegarde"
/********************************************************************************* /*********************************************************************************
* Messages * * Messages *
*********************************************************************************/ *********************************************************************************/
#2000# "*** CPU EN PAUSE ***" #2000# "*** CPU EN PAUSE ***"
#2001# "Reprise CPU" #2001# "Reprise du CPU"
#2002# "Dans une boucle permanente, on ne peut pas quitter. \nL'émulation s'arrêtera. \n\nVérifier la ROM et les paramètres de la ROM." #2002# "Dans une boucle permanente dont il est impossible de sortir.\nLémulation va maintenant sarrêter.\n\nVérifiez la ROM et les paramètres de la ROM."
#2003# "L'allocation de mémoire a échoué" #2003# "Lallocation de mémoire a échoué"
#2004# "Le plugin Vidéo sélectionné ou par défaut est manquant ou invalide. \n\nVous devez aller dans les Paramètres et sélectionner un plugin Vidéo (graphique).\nVérifier que vous ayez au moins un fichier plugin compatible dans votre dossier plugin." #2004# "Le plugin vidéo sélectionné ou par défaut est manquant ou invalide.\n\nVous devez aller dans les paramètres et sélectionner un plugin vidéo (graphique).\nVérifiez que vous avez au moins un fichier plugin compatible dans votre répertoire de plugins."
#2005# "Le plugin Audio sélectionné ou par défaut est manquant ou invalide. \n\nVous devez aller dans les Paramètres et sélectionner un plugin Audio (son).\nVérifier que vous ayez au moins un fichier plugin compatible dans votre dossier plugin." #2005# "Le plugin audio sélectionné ou par défaut est manquant ou invalide.\n\nVous devez aller dans les paramètres et sélectionner un plugin audio (son).\nVérifiez que vous avez au moins un fichier plugin compatible dans votre répertoire de plugins."
#2006# "Le plugin RSP sélectionné ou par défaut est manquant ou invalide. \n\nVous devez aller dans les Paramètres et sélectionner un plugin RSP (Reality Signal Processor).\nVérifier que vous ayez au moins un fichier plugin compatible dans votre dossier plugin." #2006# "Le plugin RSP sélectionné ou par défaut est manquant ou invalide.\n\nVous devez aller dans les paramètres et sélectionner un plugin RSP (Reality Signal Processor).\nVérifiez que vous avez au moins un fichier plugin compatible dans votre répertoire de plugins."
#2007# "Le plugin Entrée sélectionné ou par défaut est manquant ou invalide. \n\nVous devez aller dans les Paramètres et sélectionner un plugin Entrée (contrôleur).\nVérifier que vous ayez au moins un fichier plugin compatible dans votre dossier plugin." #2007# "Le plugin input sélectionné ou par défaut est manquant ou invalide.\n\nVous devez aller dans les paramètres et sélectionner un plugin input (contrôleur).\nVérifiez que vous avez au moins un fichier plugin compatible dans votre répertoire de plugins."
#2008# "Echec du chargement du plugin :" #2008# "Échec du chargement du plugin :"
#2009# "Echec du chargement word.\n\nVérifier la ROM et les paramètres de la ROM." #2009# "Échec du chargement word.\n\nVérifier la ROM et les paramètres de la ROM."
#2010# "Echec à l'ouverture du fichier de sauvegarde" #2010# "Échec à louverture du fichier de sauvegarde"
#2011# "Echec à l'ouverture de l'EEPROM" #2011# "Échec à louverture de lEEPROM"
#2012# "Echec à l'ouverture de la RAM flash" #2012# "Échec à louverture de la RAM flash"
#2013# "Echec à l'ouverture du mempak" #2013# "Échec à louverture du mempak"
#2014# "La tentative d'ouverture du fichier zip a échouée. \n\nIl est possible que le fichier zip soit corrompue - essayez de décompresser la RAM manuellement." #2014# "La tentative douverture du fichier zip a échoué.\n\nIl est possible que le fichier zip soit corrompu essayez de décompresser la RAM manuellement."
#2015# "La tentative d'ouverture du fichier a échouée." #2015# "La tentative douverture du fichier a échoué."
#2016# "L'erreur s'est produite pendant l'ouverture du fichier zip." #2016# "Une erreur sest produite pendant louverture du fichier zip."
#2017# "Le fichier chargé ne semble pas être une ROM N64 valide. \n\nVérifier vos ROMS avec GoodN64." #2017# "Le fichier chargé ne semble pas être une ROM N64 valide.\n\nVérifiez vos ROM avec GoodN64."
#2018# "Pays inconnu" #2018# "Pays inconnu"
#2019# "Puce CIC inconnu" #2019# "Puce CIC inconnu"
#2020# "Format de Fichier inconnu" #2020# "Format de fichier inconnu"
#2021# "Action de la mémoire inconnu\n\nL'émulation est arrêté" #2021# "Action de la mémoire inconnue\n\nLémulation sest arrêtée."
#2022# "OpCode R4300i non pris en charge à" #2022# "Opcode R4300i non pris en charge à"
#2023# "Exécution d'un espace non définie.\n\nVérifier la ROM et les paramètres de ROM." #2023# "Exécution depuis un espace non mappé.\n\nVérifiez la ROM et les paramètres de ROM."
#2024# "Cette sauvegarde d'état ne semble pas correspondre à la ROM qui est lancé. \n\nLes états sauvegardés & chargés doivent être à 100% identiques à la ROM. \nEn particulier la REGION et la VERSION doivent être identique. \nLe chargement de cet état peut probablement faire planter le jeu ou l'émulateur. \n\nSouhaitez-vous le charger quand même ?" #2024# "Cette sauvegarde détat ne semble pas correspondre à la ROM qui est lancée.\n\nLes états sauvegardés et chargés doivent être à 100 % identiques à la ROM.\nEn particulier la REGION et la VERSION doivent être identiques.\nLe chargement de cette sauvegarde va probablement faire planter le jeu ou lémulateur.\n\nSouhaitez-vous le charger quand même ?"
#2025# "Erreur" #2025# "Erreur"
#2026# "La séquence de Copyright n'a pas été trouvé dans LUT. Le jeu ne fonctionnera plus." #2026# "La séquence de copyright na pas été trouvé dans la LUT. Le jeu ne fonctionnera plus."
#2027# "Echec de la protection de la copie" #2027# "Échec de la protection de copie"
#2028# "Changer un plugin nécessite que Project64 redémarre la ROM lancée. \nSi vous ne voulez pas perdre votre progression, répondez Non et sauvegarder le premier état en cours. \n\nChanger les plugins et redémarrer maintenant ?" #2028# "Changer un plugin nécessite que Project64 redémarre la ROM lancée.\nSi vous ne voulez pas perdre votre progression, répondez non et sauvegardez létat actuel dabord.\n\nChanger les plugins et redémarrer maintenant ?"
#2029# "Changer les Plugins" #2029# "Changer les plugins"
#2030# "Emulation terminée" #2030# "Émulation terminée"
#2031# "Emulation démarrée" #2031# "Émulation démarrée"
#2032# "Impossible de charger un état" #2032# "Impossible de charger létat"
#2033# "Etat chargé" #2033# "État chargé"
#2034# "Sauvegarder l'état en cours vers" #2034# "État sauvegardé vers"
#2035# "Emplacement d'état" #2035# "Emplacement détat"
#2036# "Byte-swapping image" #2036# "Byte-swapping image"
#2037# "Choisir une ROM N64" #2037# "Choisir une image N64"
#2038# "Chargé" #2038# "Chargé"
#2039# "Chargement d'une image" #2039# "Chargement de limage"
#2040# "Ne peut pas ouvrir une ROM car les plugins n'ont pas été initialisés." #2040# "Impossible douvrir une ROM car les plugins nont pas été initialisés."
#2041# "Etes vous sûr de vouloir vraiment effacer ?" #2041# "Êtes-vous sûr de vouloir effacer ceci ?"
#2042# "Effacer un Cheat" #2042# "Effacer le cheat"
#2043# "Le nom du cheat est déjà utilisé." #2043# "Le nom du cheat est déjà utilisé."
#2044# "Vous avez atteint le nombre maximum de codes cheats pour ce jeu" #2044# "Vous avez atteint le nombre maximum de codes cheats pour ce jeu"
#2045# "Initialisation du Plugin" #2045# "Initialisation du plugin"
#2046# "Vous n'avez pas sélectionné une touche virtuelle à assigner au menu objet." #2046# "Vous navez pas sélectionné de touche virtuelle à assigner à lentrée de menu."
#2047# "Vous avez besoin de sélectionner un menu objet pour assigner cette touche." #2047# "Vous avez besoin de sélectionner une entrée de menu à laquelle assigner cette touche."
#2048# "Le raccourci a déjà été assigné vers un autre menu objet." #2048# "Le raccourci a déjà été assigné à une autre entrée de menu."
#2049# "Aucun raccourci n'a été sélectionné pour être supprimé." #2049# "Aucun raccourci na été sélectionné pour être supprimé."
#2050# "ROM chargé. Emulation en attente de lancement." #2050# "ROM chargée. Émulation en attente de lancement."
#2051# "Project64 beta est réservé aux membres seulement.\n\nSi vous avez un compte sur pj64-emu.com, vous ne devriez pas voir cette erreur !!\nVeuillez nous contacter sur le site." #2051# "Project64 beta est réservé aux membres seulement.\n\nSi vous avez un compte sur pj64-emu.com, vous ne devriez pas voir cette erreur !!\nVeuillez nous contacter sur le site."
#2052# "Erreur du Programme" #2052# "Erreur du programme"
#2053# "Impossible de trouver le nom de fichier dans l'archive 7z" #2053# "Impossible de trouver le nom de fichier dans larchive 7z"
#2054# "Emulation des graphismes bas niveau (LLE)" #2054# "Émulation des graphismes bas niveau (LLE)"
#2055# "Les graphismes LLE ne sont pas à utiliser par tout le monde !!!\nIl est fortement conseillé d'utiliser seulement ceci à des fins de test et non pour jouer.\n\nChanger pour les graphismes en mode LLE ?" #2055# "Les graphismes LLE ne sont pas à utiliser par tout le monde !!!\nIl est recommandé dutiliser seulement ceci à des fins de test et non pour jouer.\n\nChanger pour les graphismes en mode LLE ?"
#2056# "Emulation Audio haut niveau (HLE)" #2056# "Émulation audio haut niveau (HLE)"
#2057# "L'Audio HLE nécessite un plugin tiers !!!\nSi vous n'utilisez pas un plugin audio tiers qui supporte le HLE, vous n'entendrez aucun son.\n\nChanger pour l'Audio en mode HLE ?" #2057# "Laudio HLE nécessite un plugin tiers !!!\nSi vous nutilisez pas un plugin audio tiers qui supporte le HLE, vous nentendrez aucun son.\n\nChanger pour laudio en mode HLE ?"

View File

@ -98,6 +98,7 @@ Stop_Compiling_Bad_Endian
#endif #endif
#if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (_MSC_VER >= 1300) #if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (_MSC_VER >= 1300)
#include <stdlib.h>
#pragma intrinsic(_byteswap_ulong) #pragma intrinsic(_byteswap_ulong)
#pragma intrinsic(_byteswap_uint64) #pragma intrinsic(_byteswap_uint64)

View File

@ -62,6 +62,10 @@
#define wxCOMPILER_PREFIX vc100 #define wxCOMPILER_PREFIX vc100
#elif _MSC_VER == 1700 #elif _MSC_VER == 1700
#define wxCOMPILER_PREFIX vc110 #define wxCOMPILER_PREFIX vc110
#elif _MSC_VER == 1800
#define wxCOMPILER_PREFIX vc120
#elif _MSC_VER == 1900
#define wxCOMPILER_PREFIX vc140
#else #else
#error "Unknown MSVC compiler version, please report to wx-dev." #error "Unknown MSVC compiler version, please report to wx-dev."
#endif #endif

View File

@ -437,7 +437,9 @@
# elif __VISUALC__ < 1800 # elif __VISUALC__ < 1800
# define __VISUALC11__ # define __VISUALC11__
# elif __VISUALC__ < 1900 # elif __VISUALC__ < 1900
# define __VISUALC12__ # define __VISUALC12__
# elif __VISUALC__ < 2000
# define __VISUALC14__
# else # else
# pragma message("Please update wx/platform.h to recognize this VC++ version") # pragma message("Please update wx/platform.h to recognize this VC++ version")
# endif # endif
@ -523,7 +525,7 @@
# define wxVISUALC_VERSION(major) 0 # define wxVISUALC_VERSION(major) 0
# define wxCHECK_VISUALC_VERSION(major) 0 # define wxCHECK_VISUALC_VERSION(major) 0
#else #else
# define wxVISUALC_VERSION(major) ( (6 + major) * 100 ) # define wxVISUALC_VERSION(major) ( (6 + (major >= 14 ? 1 : 0) + major) * 100 )
# define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) ) # define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) )
#endif #endif

View File

@ -25,7 +25,6 @@ public:
void LogF ( LPCTSTR Message, ... ); void LogF ( LPCTSTR Message, ... );
void LogArgs ( LPCTSTR Message, va_list & args ); void LogArgs ( LPCTSTR Message, va_list & args );
bool Empty ( void ); bool Empty ( void );
void Reset ( void );
void Close ( void ); void Close ( void );
inline void SetMaxFileSize ( ULONG Size ) inline void SetMaxFileSize ( ULONG Size )

View File

@ -1,5 +1,8 @@
#ifdef _DEBUG #ifdef _DEBUG
#if (defined(_MSC_VER) && (_MSC_VER < 1900))
#define MEM_LEAK_TEST #define MEM_LEAK_TEST
#endif
#ifdef MEM_LEAK_TEST #ifdef MEM_LEAK_TEST

View File

@ -1022,7 +1022,7 @@ void CPath::cleanPathString(stdstr& rDirectory) const
pos = rDirectory.find( DIR_DOUBLEDELIM ); pos = rDirectory.find( DIR_DOUBLEDELIM );
while ( pos != std::string::npos ) while ( pos != std::string::npos )
{ {
rDirectory.replace( pos, 1, &DIRECTORY_DELIMITER ); rDirectory.replace( pos, 2, &DIRECTORY_DELIMITER );
pos = rDirectory.find( DIR_DOUBLEDELIM, pos + 1 ); pos = rDirectory.find( DIR_DOUBLEDELIM, pos + 1 );
} }
if (AppendEnd) if (AppendEnd)

View File

@ -15902,6 +15902,10 @@ void CombineBlender ()
A_BLEND (GR_BLEND_SRC_ALPHA, GR_BLEND_ONE); A_BLEND (GR_BLEND_SRC_ALPHA, GR_BLEND_ONE);
break; break;
case 0x5000: /* Vigilante 8 explosions */
A_BLEND (GR_BLEND_ONE_MINUS_SRC_ALPHA, GR_BLEND_SRC_ALPHA);
break;
default: default:
A_BLEND (GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA); A_BLEND (GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA);
} }

View File

@ -23,7 +23,7 @@
#define VERSION_MAJOR 2 #define VERSION_MAJOR 2
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 0 #define VERSION_REVISION 0
#define VERSION_BUILD 5 #define VERSION_BUILD 9999
#define VER_FILE_DESCRIPTION_STR "Glide 64 for Project64" #define VER_FILE_DESCRIPTION_STR "Glide 64 for Project64"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD

View File

@ -765,7 +765,7 @@ LRESULT CALLBACK LangSelectProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
CLIP_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
PROOF_QUALITY, PROOF_QUALITY,
DEFAULT_PITCH|FF_DONTCARE, DEFAULT_PITCH|FF_DONTCARE,
_T("Arial") "Arial"
); );
SendDlgItemMessage(hDlg,IDC_SELECT_LANG,WM_SETFONT,(WPARAM)hTextFont,TRUE); SendDlgItemMessage(hDlg,IDC_SELECT_LANG,WM_SETFONT,(WPARAM)hTextFont,TRUE);
} }

View File

@ -10,6 +10,8 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#include <prsht.h>
void LoadLogSetting (HKEY hKey,char * String, BOOL * Value); void LoadLogSetting (HKEY hKey,char * String, BOOL * Value);
void SaveLogOptions (void); void SaveLogOptions (void);
@ -63,7 +65,11 @@ void EnterLogOptions(HWND hwndOwner)
psh.pfnCallback = NULL; psh.pfnCallback = NULL;
LoadLogOptions(&TempOptions,TRUE); LoadLogOptions(&TempOptions,TRUE);
PropertySheet(&psh); #if defined(WINDOWS_UI)
PropertySheet(&psh);
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
SaveLogOptions(); SaveLogOptions();
LoadLogOptions(&LogOptions, FALSE); LoadLogOptions(&LogOptions, FALSE);
return; return;
@ -896,8 +902,8 @@ void StartLog (void)
} }
CPath LogFile(CPath::MODULE_DIRECTORY); CPath LogFile(CPath::MODULE_DIRECTORY);
LogFile.AppendDirectory(_T("Logs")); LogFile.AppendDirectory("Logs");
LogFile.SetNameExtension(_T("cpudebug.log")); LogFile.SetNameExtension("cpudebug.log");
hLogFile = CreateFile(LogFile,GENERIC_WRITE, FILE_SHARE_READ,NULL,CREATE_ALWAYS, hLogFile = CreateFile(LogFile,GENERIC_WRITE, FILE_SHARE_READ,NULL,CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);

View File

@ -10,6 +10,8 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#include <commctrl.h>
#include <windowsx.h>
#include "Settings/SettingType/SettingsType-Cheats.h" #include "Settings/SettingType/SettingsType-Cheats.h"
enum { WM_EDITCHEAT = WM_USER + 0x120 }; enum { WM_EDITCHEAT = WM_USER + 0x120 };
@ -986,6 +988,7 @@ int CALLBACK CCheats::CheatListProc (HWND hDlg,DWORD uMsg,DWORD wParam, DWORD lP
Style = GetWindowLong((HWND)_this->m_hCheatTree,GWL_STYLE); Style = GetWindowLong((HWND)_this->m_hCheatTree,GWL_STYLE);
SetWindowLong((HWND)_this->m_hCheatTree,GWL_STYLE,TVS_CHECKBOXES |TVS_SHOWSELALWAYS| Style); SetWindowLong((HWND)_this->m_hCheatTree,GWL_STYLE,TVS_CHECKBOXES |TVS_SHOWSELALWAYS| Style);
#if defined(WINDOWS_UI)
//Creats an image list from the bitmap in the resource section //Creats an image list from the bitmap in the resource section
HIMAGELIST hImageList; HIMAGELIST hImageList;
HBITMAP hBmp; HBITMAP hBmp;
@ -996,6 +999,9 @@ int CALLBACK CCheats::CheatListProc (HWND hDlg,DWORD uMsg,DWORD wParam, DWORD lP
DeleteObject(hBmp); DeleteObject(hBmp);
TreeView_SetImageList((HWND)_this->m_hCheatTree,hImageList,TVSIL_STATE); TreeView_SetImageList((HWND)_this->m_hCheatTree,hImageList,TVSIL_STATE);
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
_this->m_hSelectedItem = NULL; _this->m_hSelectedItem = NULL;

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Debugger UI.h" #include "Debugger UI.h"
CDumpMemory::CDumpMemory(CDebugger * debugger) : CDumpMemory::CDumpMemory(CDebugger * debugger) :
@ -593,3 +595,4 @@ bool CDumpMemory::DumpMemory ( LPCSTR FileName,DumpFormat Format, DWORD StartPC,
// } // }
// return false; // return false;
//} //}
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Debugger UI.h" #include "Debugger UI.h"
CDebugMemorySearch::CDebugMemorySearch(CDebugger * debugger) : CDebugMemorySearch::CDebugMemorySearch(CDebugger * debugger) :
@ -787,3 +789,4 @@ bool CDebugMemorySearch::SearchForValue (DWORD Value, MemorySize Size, DWORD &St
} }
return false; return false;
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Debugger UI.h" #include "Debugger UI.h"
CDebugTlb::CDebugTlb(CDebugger * debugger) : CDebugTlb::CDebugTlb(CDebugger * debugger) :
@ -285,3 +287,4 @@ void CDebugTlb::RefreshTLBWindow (void)
} }
} }
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Debugger UI.h" #include "Debugger UI.h"
CDebugMemoryView::CDebugMemoryView(CDebugger * debugger) : CDebugMemoryView::CDebugMemoryView(CDebugger * debugger) :
@ -470,3 +472,4 @@ void CDebugMemoryView::RefreshMemory ( bool ResetCompare )
Insert_MemoryLineDump ( count ); Insert_MemoryLineDump ( count );
} }
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Debugger UI.h" #include "Debugger UI.h"
CPj64Module _Module; CPj64Module _Module;
@ -130,3 +132,4 @@ void CDebugger::Debug_ShowMemorySearch()
m_MemorySearch->ShowWindow(); m_MemorySearch->ShowWindow();
} }
} }
#endif

View File

@ -2364,7 +2364,10 @@ __inline void Float_RoundToInteger32( int * Dest, float * Source )
fistp dword ptr [edi] fistp dword ptr [edi]
} }
#else #else
g_Notify->BreakPoint(__FILEW__,__LINE__); __m128 xmm;
xmm = _mm_load_ss(Source);
*(Dest) = _mm_cvt_ss2si(xmm);
#endif #endif
} }
@ -2379,7 +2382,10 @@ __inline void Float_RoundToInteger64( __int64 * Dest, float * Source )
fistp qword ptr [edi] fistp qword ptr [edi]
} }
#else #else
g_Notify->BreakPoint(__FILEW__,__LINE__); __m128 xmm;
xmm = _mm_load_ss(Source);
*(Dest) = _mm_cvtss_si64(xmm);
#endif #endif
} }
@ -2413,12 +2419,12 @@ void R4300iOp::COP1_S_DIV()
void R4300iOp::COP1_S_SQRT() void R4300iOp::COP1_S_SQRT()
{ {
float * Dest = (float *)(_FPR_S[m_Opcode.fd]);
float * Source = (float *)(_FPR_S[m_Opcode.fs]);
TEST_COP1_USABLE_EXCEPTION TEST_COP1_USABLE_EXCEPTION
_controlfp(*_RoundingModel,_MCW_RC); _controlfp(*_RoundingModel,_MCW_RC);
#ifdef _M_IX86 #ifdef _M_IX86
float * Dest = (float *)_FPR_S[m_Opcode.fd];
float * Source = (float *)_FPR_S[m_Opcode.fs];
_asm _asm
{ {
push esi push esi
@ -2430,7 +2436,11 @@ void R4300iOp::COP1_S_SQRT()
pop esi pop esi
} }
#else #else
g_Notify->BreakPoint(__FILEW__,__LINE__); __m128 xmm;
xmm = _mm_load_ss(Source);
xmm = _mm_sqrt_ss(xmm);
*(Dest) = _mm_cvtss_f32(xmm);
#endif #endif
} }
@ -2586,7 +2596,10 @@ __inline void Double_RoundToInteger32( DWORD * Dest, double * Source )
fistp dword ptr [edi] fistp dword ptr [edi]
} }
#else #else
g_Notify->BreakPoint(__FILEW__,__LINE__); __m128d xmm;
xmm = _mm_load_sd(Source);
*(Dest) = _mm_cvtsd_si32(xmm);
#endif #endif
} }

View File

@ -22,7 +22,7 @@ void CDMA::OnFirstDMA()
switch (g_Rom->CicChipID()) switch (g_Rom->CicChipID())
{ {
case CIC_NUS_6101: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break; case CIC_NUS_6101: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case CIC_NUS_8303: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break; case CIC_NUS_5167: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case CIC_UNKNOWN: case CIC_UNKNOWN:
case CIC_NUS_6102: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break; case CIC_NUS_6102: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case CIC_NUS_6103: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break; case CIC_NUS_6103: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
@ -35,12 +35,18 @@ void CDMA::OnFirstDMA()
void CDMA::PI_DMA_READ() void CDMA::PI_DMA_READ()
{ {
// PI_STATUS_REG |= PI_STATUS_DMA_BUSY; // PI_STATUS_REG |= PI_STATUS_DMA_BUSY;
DWORD PI_RD_LEN_REG = ((g_Reg->PI_RD_LEN_REG) & 0x00FFFFFFul) + 1;
if ( g_Reg->PI_DRAM_ADDR_REG + g_Reg->PI_RD_LEN_REG + 1 > g_MMU->RdramSize()) if ((PI_RD_LEN_REG & 1) != 0)
{
PI_RD_LEN_REG += 1;
}
if ( g_Reg->PI_DRAM_ADDR_REG + PI_RD_LEN_REG > g_MMU->RdramSize())
{ {
if (bHaveDebugger()) if (bHaveDebugger())
{ {
g_Notify->DisplayError(L"PI_DMA_READ not in Memory: %08X", g_Reg->PI_DRAM_ADDR_REG + g_Reg->PI_RD_LEN_REG + 1); g_Notify->DisplayError(L"PI_DMA_READ not in Memory: %08X", g_Reg->PI_DRAM_ADDR_REG + PI_RD_LEN_REG);
} }
g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY; g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY;
g_Reg->MI_INTR_REG |= MI_INTR_PI; g_Reg->MI_INTR_REG |= MI_INTR_PI;
@ -48,6 +54,7 @@ void CDMA::PI_DMA_READ()
return; return;
} }
//Write ROM Area (for 64DD Convert)
if (g_Reg->PI_CART_ADDR_REG >= 0x10000000 && g_Reg->PI_CART_ADDR_REG <= 0x1FBFFFFF && g_Settings->LoadBool(Game_AllowROMWrites)) if (g_Reg->PI_CART_ADDR_REG >= 0x10000000 && g_Reg->PI_CART_ADDR_REG <= 0x1FBFFFFF && g_Settings->LoadBool(Game_AllowROMWrites))
{ {
DWORD i; DWORD i;
@ -58,9 +65,9 @@ void CDMA::PI_DMA_READ()
VirtualProtect(ROM, g_Rom->GetRomSize(), PAGE_READWRITE, &OldProtect); VirtualProtect(ROM, g_Rom->GetRomSize(), PAGE_READWRITE, &OldProtect);
g_Reg->PI_CART_ADDR_REG -= 0x10000000; g_Reg->PI_CART_ADDR_REG -= 0x10000000;
if (g_Reg->PI_CART_ADDR_REG + g_Reg->PI_RD_LEN_REG < g_Rom->GetRomSize()) if (g_Reg->PI_CART_ADDR_REG + PI_RD_LEN_REG < g_Rom->GetRomSize())
{ {
for (i = 0; i < g_Reg->PI_RD_LEN_REG; i++) for (i = 0; i < PI_RD_LEN_REG; i++)
{ {
*(ROM + ((g_Reg->PI_CART_ADDR_REG + i) ^ 3)) = *(RDRAM + ((g_Reg->PI_DRAM_ADDR_REG + i) ^ 3)); *(ROM + ((g_Reg->PI_CART_ADDR_REG + i) ^ 3)) = *(RDRAM + ((g_Reg->PI_DRAM_ADDR_REG + i) ^ 3));
} }
@ -87,6 +94,11 @@ void CDMA::PI_DMA_READ()
} }
VirtualProtect(ROM, g_Rom->GetRomSize(), PAGE_READONLY, &OldProtect); VirtualProtect(ROM, g_Rom->GetRomSize(), PAGE_READONLY, &OldProtect);
g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY;
g_Reg->MI_INTR_REG |= MI_INTR_PI;
g_Reg->CheckInterrupts();
return;
} }
if ( g_Reg->PI_CART_ADDR_REG >= 0x08000000 && g_Reg->PI_CART_ADDR_REG <= 0x08010000) if ( g_Reg->PI_CART_ADDR_REG >= 0x08000000 && g_Reg->PI_CART_ADDR_REG <= 0x08010000)
@ -100,7 +112,7 @@ void CDMA::PI_DMA_READ()
m_Sram.DmaToSram( m_Sram.DmaToSram(
g_MMU->Rdram() + g_Reg->PI_DRAM_ADDR_REG, g_MMU->Rdram() + g_Reg->PI_DRAM_ADDR_REG,
g_Reg->PI_CART_ADDR_REG - 0x08000000, g_Reg->PI_CART_ADDR_REG - 0x08000000,
g_Reg->PI_RD_LEN_REG + 1 PI_RD_LEN_REG
); );
g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY; g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY;
g_Reg->MI_INTR_REG |= MI_INTR_PI; g_Reg->MI_INTR_REG |= MI_INTR_PI;
@ -112,7 +124,7 @@ void CDMA::PI_DMA_READ()
m_FlashRam.DmaToFlashram( m_FlashRam.DmaToFlashram(
g_MMU->Rdram()+g_Reg->PI_DRAM_ADDR_REG, g_MMU->Rdram()+g_Reg->PI_DRAM_ADDR_REG,
g_Reg->PI_CART_ADDR_REG - 0x08000000, g_Reg->PI_CART_ADDR_REG - 0x08000000,
g_Reg->PI_RD_LEN_REG + 1 PI_RD_LEN_REG
); );
g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY; g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY;
g_Reg->MI_INTR_REG |= MI_INTR_PI; g_Reg->MI_INTR_REG |= MI_INTR_PI;
@ -130,7 +142,7 @@ void CDMA::PI_DMA_READ()
} }
if (bHaveDebugger()) if (bHaveDebugger())
{ {
g_Notify->DisplayError(L"PI_DMA_READ where are you dmaing to ?"); g_Notify->DisplayError(L"PI_DMA_READ where are you dmaing to ?: 08X", g_Reg->PI_CART_ADDR_REG);
} }
g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY; g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY;
g_Reg->MI_INTR_REG |= MI_INTR_PI; g_Reg->MI_INTR_REG |= MI_INTR_PI;

View File

@ -11,9 +11,9 @@
#include "stdafx.h" #include "stdafx.h"
CFlashram::CFlashram(bool ReadOnly): CFlashram::CFlashram(bool ReadOnly):
m_FlashRamPointer(NULL),
m_FlashFlag(FLASHRAM_MODE_NOPES), m_FlashFlag(FLASHRAM_MODE_NOPES),
m_FlashStatus(0), m_FlashStatus(0),
m_FlashRamPointer(NULL),
m_FlashRAM_Offset(0), m_FlashRAM_Offset(0),
m_ReadOnly(ReadOnly), m_ReadOnly(ReadOnly),
m_hFile(NULL) m_hFile(NULL)
@ -70,25 +70,14 @@ void CFlashram::DmaFromFlashram ( BYTE * dest, int StartOffset, int len)
FlipBuffer[count] = 0xFF; FlipBuffer[count] = 0xFF;
} }
#ifdef _M_IX86 for (count = 0; (int)count < len; count += 4)
_asm
{ {
mov edi, dest register DWORD eax;
lea ecx, [FlipBuffer]
mov edx, 0
mov ebx, len
memcpyloop: eax = *(unsigned __int32 *)&FlipBuffer[count];
mov eax, dword ptr [ecx + edx] // eax = swap32by8(eax); // ; bswap eax
;bswap eax *(unsigned __int32 *)(dest + count) = eax;
mov dword ptr [edi + edx],eax
add edx, 4
cmp edx, ebx
jb memcpyloop
} }
#else
g_Notify->BreakPoint(__FILEW__,__LINE__);
#endif
break; break;
case FLASHRAM_MODE_STATUS: case FLASHRAM_MODE_STATUS:
if (StartOffset != 0 && len != 8) if (StartOffset != 0 && len != 8)
@ -198,28 +187,18 @@ void CFlashram::WriteToFlashCommand(DWORD FlashRAM_Command)
} }
{ {
BYTE FlipBuffer[128]; BYTE FlipBuffer[128];
memset(FlipBuffer,0,sizeof(FlipBuffer)); register size_t edx;
#ifdef _M_IX86
DWORD dwWritten;
BYTE * FlashRamPointer = m_FlashRamPointer; BYTE * FlashRamPointer = m_FlashRamPointer;
_asm
{
lea edi, [FlipBuffer]
mov ecx, FlashRamPointer
mov edx, 0
memcpyloop: memset(FlipBuffer,0,sizeof(FlipBuffer));
mov eax, dword ptr [ecx + edx] for (edx = 0; edx < 128; edx += 4)
;bswap eax {
mov dword ptr [edi + edx],eax register DWORD eax;
add edx, 4
cmp edx, 128 eax = *(unsigned __int32 *)&FlashRamPointer[edx];
jb memcpyloop // eax = swap32by8(eax); // ; bswap eax
*(unsigned __int32 *)(FlipBuffer + edx) = eax;
} }
#else
g_Notify->BreakPoint(__FILEW__,__LINE__);
#endif
SetFilePointer(m_hFile,m_FlashRAM_Offset,NULL,FILE_BEGIN); SetFilePointer(m_hFile,m_FlashRAM_Offset,NULL,FILE_BEGIN);
WriteFile(m_hFile,FlipBuffer,128,&dwWritten,NULL); WriteFile(m_hFile,FlipBuffer,128,&dwWritten,NULL);

View File

@ -10,6 +10,8 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <objbase.h>
interface CMipsMemory_CallBack interface CMipsMemory_CallBack
{ {
//Protected memory has been written to, returns true if that memory has been unprotected //Protected memory has been written to, returns true if that memory has been unprotected

View File

@ -12,7 +12,7 @@
DWORD CMemoryLabel::AsciiToHex (char * HexValue) DWORD CMemoryLabel::AsciiToHex (char * HexValue)
{ {
DWORD Count, Finish, Value = 0; DWORD Count, Finish, Current, Value = 0;
Finish = strlen(HexValue); Finish = strlen(HexValue);
if (Finish > 8 ) if (Finish > 8 )
@ -23,33 +23,25 @@ DWORD CMemoryLabel::AsciiToHex (char * HexValue)
for (Count = 0; Count < Finish; Count++) for (Count = 0; Count < Finish; Count++)
{ {
Value = (Value << 4); Value = (Value << 4);
switch ( HexValue[Count] ) Current = HexValue[Count];
if(Current >= '0' && Current <= '9')
{ {
case '0': break; Value += Current - '0';
case '1': Value += 1; break; }
case '2': Value += 2; break; else
case '3': Value += 3; break; {
case '4': Value += 4; break; if(Current > 'F')
case '5': Value += 5; break; Current -= 32; //32 is the distance between A and a
case '6': Value += 6; break;
case '7': Value += 7; break; if (Current >= 'A' && Current <= 'F')
case '8': Value += 8; break; {
case '9': Value += 9; break; Value += Current - 55; //55 is the code for 'A' less 10
case 'A': Value += 10; break; }
case 'a': Value += 10; break; else
case 'B': Value += 11; break; {
case 'b': Value += 11; break; Value = (Value >> 4);
case 'C': Value += 12; break; Count = Finish;
case 'c': Value += 12; break; }
case 'D': Value += 13; break;
case 'd': Value += 13; break;
case 'E': Value += 14; break;
case 'e': Value += 14; break;
case 'F': Value += 15; break;
case 'f': Value += 15; break;
default:
Value = (Value >> 4);
Count = Finish;
} }
} }
return Value; return Value;

View File

@ -22,8 +22,6 @@ CMipsMemoryVM::CMipsMemoryVM( CMipsMemory_CallBack * CallBack, bool SavesReadOnl
CSram(SavesReadOnly), CSram(SavesReadOnly),
CDMA(*this,*this), CDMA(*this,*this),
m_CBClass(CallBack), m_CBClass(CallBack),
m_TLB_ReadMap(NULL),
m_TLB_WriteMap(NULL),
m_RomMapped(false), m_RomMapped(false),
m_Rom(NULL), m_Rom(NULL),
m_RomSize(0), m_RomSize(0),
@ -32,7 +30,9 @@ CMipsMemoryVM::CMipsMemoryVM( CMipsMemory_CallBack * CallBack, bool SavesReadOnl
m_HalfLine(0), m_HalfLine(0),
m_HalfLineCheck(false), m_HalfLineCheck(false),
m_FieldSerration(0), m_FieldSerration(0),
m_TempValue(0) m_TempValue(0),
m_TLB_ReadMap(NULL),
m_TLB_WriteMap(NULL)
{ {
g_Settings->RegisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged); g_Settings->RegisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged);
m_RDRAM = NULL; m_RDRAM = NULL;
@ -40,6 +40,23 @@ CMipsMemoryVM::CMipsMemoryVM( CMipsMemory_CallBack * CallBack, bool SavesReadOnl
m_IMEM = NULL; m_IMEM = NULL;
} }
unsigned long swap32by8(unsigned long word)
{
const unsigned long swapped =
#if defined(_MSC_VER)
_byteswap_ulong(word)
#elif defined(__GNUC__)
__builtin_bswap32(word)
#else
(word & 0x000000FFul) << 24
| (word & 0x0000FF00ul) << 8
| (word & 0x00FF0000ul) >> 8
| (word & 0xFF000000ul) >> 24
#endif
;
return (swapped & 0xFFFFFFFFul);
}
CMipsMemoryVM::~CMipsMemoryVM() CMipsMemoryVM::~CMipsMemoryVM()
{ {
g_Settings->UnregisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged); g_Settings->UnregisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged);
@ -50,24 +67,26 @@ void CMipsMemoryVM::Reset( bool /*EraseMemory*/ )
{ {
if (m_TLB_ReadMap) if (m_TLB_ReadMap)
{ {
memset(m_TLB_ReadMap,0,(0xFFFFF * sizeof(DWORD))); size_t address;
memset(m_TLB_WriteMap,0,(0xFFFFF * sizeof(DWORD)));
for (DWORD address = 0x80000000; address < 0xC0000000; address += 0x1000) memset(m_TLB_ReadMap , 0, 0xFFFFF * sizeof(size_t));
memset(m_TLB_WriteMap, 0, 0xFFFFF * sizeof(size_t));
for (address = 0x80000000; address < 0xC0000000; address += 0x1000)
{ {
m_TLB_ReadMap[address >> 12] = ((DWORD)m_RDRAM + (address & 0x1FFFFFFF)) - address; m_TLB_ReadMap[address >> 12] = ((size_t)m_RDRAM + (address & 0x1FFFFFFF)) - address;
m_TLB_WriteMap[address >> 12] = ((DWORD)m_RDRAM + (address & 0x1FFFFFFF)) - address; m_TLB_WriteMap[address >> 12] = ((size_t)m_RDRAM + (address & 0x1FFFFFFF)) - address;
} }
if (g_Settings->LoadDword(Rdb_TLB_VAddrStart) != 0) if (g_Settings->LoadDword(Rdb_TLB_VAddrStart) != 0)
{ {
DWORD Start = g_Settings->LoadDword(Rdb_TLB_VAddrStart); //0x7F000000; size_t Start = g_Settings->LoadDword(Rdb_TLB_VAddrStart); //0x7F000000;
DWORD Len = g_Settings->LoadDword(Rdb_TLB_VAddrLen); //0x01000000; size_t Len = g_Settings->LoadDword(Rdb_TLB_VAddrLen); //0x01000000;
DWORD PAddr = g_Settings->LoadDword(Rdb_TLB_PAddrStart); //0x10034b30; size_t PAddr = g_Settings->LoadDword(Rdb_TLB_PAddrStart); //0x10034b30;
DWORD End = Start + Len; size_t End = Start + Len;
for (DWORD address = Start; address < End; address += 0x1000) for (address = Start; address < End; address += 0x1000)
{ {
m_TLB_ReadMap[address >> 12] = ((DWORD)m_RDRAM + (address - Start + PAddr)) - address; m_TLB_ReadMap[address >> 12] = ((size_t)m_RDRAM + (address - Start + PAddr)) - address;
m_TLB_WriteMap[address >> 12] = ((DWORD)m_RDRAM + (address - Start + PAddr)) - address; m_TLB_WriteMap[address >> 12] = ((size_t)m_RDRAM + (address - Start + PAddr)) - address;
} }
} }
} }
@ -164,18 +183,28 @@ bool CMipsMemoryVM::Initialize()
} }
CPifRam::Reset(); CPifRam::Reset();
m_TLB_ReadMap = (DWORD *)VirtualAlloc(NULL,0xFFFFF * sizeof(DWORD),MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE); m_TLB_ReadMap = (size_t *)VirtualAlloc(
NULL,
0xFFFFF * sizeof(size_t),
MEM_RESERVE | MEM_COMMIT,
PAGE_READWRITE
);
if (m_TLB_ReadMap == NULL) if (m_TLB_ReadMap == NULL)
{ {
WriteTraceF(TraceError,__FUNCTION__ ": Failed to Allocate m_TLB_ReadMap (Size: 0x%X)",0xFFFFF * sizeof(DWORD)); WriteTraceF(TraceError,__FUNCTION__": Failed to Allocate m_TLB_ReadMap (Size: 0x%X)",0xFFFFF * sizeof(size_t));
FreeMemory(); FreeMemory();
return false; return false;
} }
m_TLB_WriteMap = (DWORD *)VirtualAlloc(NULL,0xFFFFF * sizeof(DWORD),MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE); m_TLB_WriteMap = (size_t *)VirtualAlloc(
NULL,
0xFFFFF * sizeof(size_t),
MEM_RESERVE | MEM_COMMIT,
PAGE_READWRITE
);
if (m_TLB_WriteMap == NULL) if (m_TLB_WriteMap == NULL)
{ {
WriteTraceF(TraceError,__FUNCTION__ ": Failed to Allocate m_TLB_ReadMap (Size: 0x%X)",0xFFFFF * sizeof(DWORD)); WriteTraceF(TraceError,__FUNCTION__": Failed to Allocate m_TLB_WriteMap (Size: 0x%X)",0xFFFFF * sizeof(size_t));
FreeMemory(); FreeMemory();
return false; return false;
} }
@ -2135,9 +2164,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %02X", g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM, (char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2147,9 +2176,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to load half word\n\nMIPS Address: %08X\nX86 Address: %02X", g_Notify->DisplayError(L"Failed to load half word\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM, (char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2159,9 +2188,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %02X", g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM, (char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2171,9 +2200,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to load half word\n\nMIPS Address: %08X\nX86 Address: %02X", g_Notify->DisplayError(L"Failed to load half word\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM, (char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2194,9 +2223,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to half word\n\nMIPS Address: %08X\nX86 Address: %02X", g_Notify->DisplayError(L"Failed to half word\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM, (char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2206,8 +2235,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to store half word\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress, g_Notify->DisplayError(L"Failed to store half word\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2224,8 +2253,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
if (!SH_NonMemory(MemAddress,*(WORD *)ReadPos)) { if (!SH_NonMemory(MemAddress,*(WORD *)ReadPos)) {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to store half word\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress, g_Notify->DisplayError(L"Failed to store half word\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)(ReadPos + 2); lpEP->ContextRecord->Eip = (DWORD)(ReadPos + 2);
@ -2243,9 +2272,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to store byte\n\nMIPS Address: %08X\nX86 Address: %02X", g_Notify->DisplayError(L"Failed to store byte\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM, (char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2255,9 +2284,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %02X", g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM, (char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2267,9 +2296,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to load word\n\nMIPS Address: %08X\nX86 Address: %02X", g_Notify->DisplayError(L"Failed to load word\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM, (char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2279,8 +2308,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to store word\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress, g_Notify->DisplayError(L"Failed to store word\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)ReadPos; lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2298,8 +2327,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to store byte\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress, g_Notify->DisplayError(L"Failed to store byte\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)(ReadPos + 1); lpEP->ContextRecord->Eip = (DWORD)(ReadPos + 1);
@ -2317,8 +2346,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{ {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{ {
g_Notify->DisplayError(L"Failed to store word\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress, g_Notify->DisplayError(L"Failed to store word\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip); (unsigned char *)lpEP->ContextRecord->Eip);
} }
} }
lpEP->ContextRecord->Eip = (DWORD)(ReadPos + 4); lpEP->ContextRecord->Eip = (DWORD)(ReadPos + 4);
@ -2641,32 +2670,16 @@ bool CMipsMemoryVM::LW_NonMemory(DWORD PAddr, DWORD* Value)
case 0x1FC00000: case 0x1FC00000:
if (PAddr < 0x1FC007C0) if (PAddr < 0x1FC007C0)
{ {
/* DWORD ToSwap = *(DWORD *)(&PifRom[PAddr - 0x1FC00000]); /* *Value = *(DWORD *)(&PifRom[PAddr - 0x1FC00000]);
_asm *Value = swap32by8(*Value); */
{
mov eax,ToSwap
bswap eax
mov ToSwap,eax
}
* Value = ToSwap;*/
g_Notify->BreakPoint(__FILEW__,__LINE__); g_Notify->BreakPoint(__FILEW__,__LINE__);
return true; return true;
} }
else if (PAddr < 0x1FC00800) else if (PAddr < 0x1FC00800)
{ {
#ifdef _M_IX86
BYTE * PIF_Ram = g_MMU->PifRam(); BYTE * PIF_Ram = g_MMU->PifRam();
DWORD ToSwap = *(DWORD *)(&PIF_Ram[PAddr - 0x1FC007C0]); *Value = *(DWORD *)(&PIF_Ram[PAddr - 0x1FC007C0]);
_asm *Value = swap32by8(*Value);
{
mov eax,ToSwap
bswap eax
mov ToSwap,eax
}
*Value = ToSwap;
#else
g_Notify->BreakPoint(__FILEW__,__LINE__);
#endif
return true; return true;
} }
else else
@ -3363,16 +3376,7 @@ bool CMipsMemoryVM::SW_NonMemory(DWORD PAddr, DWORD Value)
} }
else if (PAddr < 0x1FC00800) else if (PAddr < 0x1FC00800)
{ {
#ifdef _M_IX86 Value = swap32by8(Value);
_asm
{
mov eax,Value
bswap eax
mov Value,eax
}
#else
g_Notify->BreakPoint(__FILEW__,__LINE__);
#endif
*(DWORD *)(&m_PifRam[PAddr - 0x1FC007C0]) = Value; *(DWORD *)(&m_PifRam[PAddr - 0x1FC007C0]) = Value;
if (PAddr == 0x1FC007FC) if (PAddr == 0x1FC007FC)
{ {
@ -3411,9 +3415,10 @@ void CMipsMemoryVM::UpdateHalfLine()
g_SystemTimer->UpdateTimers(); g_SystemTimer->UpdateTimers();
NextViTimer = g_SystemTimer->GetTimer(CSystemTimer::ViTimer); NextViTimer = g_SystemTimer->GetTimer(CSystemTimer::ViTimer);
} }
m_HalfLine = (DWORD)(NextViTimer / g_System->ViRefreshRate()); m_HalfLine = (DWORD)(*g_NextTimer / g_System->ViRefreshRate());
m_HalfLine &= ~1; m_HalfLine &= ~1;
m_HalfLine |= m_FieldSerration; m_HalfLine |= m_FieldSerration;
g_Reg->VI_V_CURRENT_LINE_REG = m_HalfLine;
m_HalfLineCheck = NextViTimer; m_HalfLineCheck = NextViTimer;
} }
@ -5349,22 +5354,28 @@ LPCTSTR CMipsMemoryVM::LabelName ( DWORD Address ) const
void CMipsMemoryVM::TLB_Mapped( DWORD VAddr, DWORD Len, DWORD PAddr, bool bReadOnly ) void CMipsMemoryVM::TLB_Mapped( DWORD VAddr, DWORD Len, DWORD PAddr, bool bReadOnly )
{ {
for (DWORD count = VAddr, VEnd = VAddr + Len; count < VEnd; count += 0x1000) size_t count, VEnd;
VEnd = VAddr + Len;
for (count = VAddr; count < VEnd; count += 0x1000)
{ {
DWORD Index = count >> 12; size_t Index = count >> 12;
m_TLB_ReadMap[Index] = ((DWORD)m_RDRAM + (count - VAddr + PAddr)) - count; m_TLB_ReadMap[Index] = ((size_t)m_RDRAM + (count - VAddr + PAddr)) - count;
if (!bReadOnly) if (!bReadOnly)
{ {
m_TLB_WriteMap[Index] = ((DWORD)m_RDRAM + (count - VAddr + PAddr)) - count; m_TLB_WriteMap[Index] = ((size_t)m_RDRAM + (count - VAddr + PAddr)) - count;
} }
} }
} }
void CMipsMemoryVM::TLB_Unmaped( DWORD Vaddr, DWORD Len ) void CMipsMemoryVM::TLB_Unmaped( DWORD Vaddr, DWORD Len )
{ {
for (DWORD count = Vaddr, End = Vaddr + Len; count < End; count += 0x1000) size_t count, End;
End = Vaddr + Len;
for (count = Vaddr; count < End; count += 0x1000)
{ {
DWORD Index = count >> 12; size_t Index = count >> 12;
m_TLB_ReadMap[Index] = NULL; m_TLB_ReadMap[Index] = NULL;
m_TLB_WriteMap[Index] = NULL; m_TLB_WriteMap[Index] = NULL;
} }
@ -5372,25 +5383,38 @@ void CMipsMemoryVM::TLB_Unmaped( DWORD Vaddr, DWORD Len )
void CMipsMemoryVM::RdramChanged ( CMipsMemoryVM * _this ) void CMipsMemoryVM::RdramChanged ( CMipsMemoryVM * _this )
{ {
if (_this->m_AllocatedRdramSize == g_Settings->LoadDword(Game_RDRamSize)) const size_t new_size = g_Settings -> LoadDword(Game_RDRamSize);
const size_t old_size = _this -> m_AllocatedRdramSize;
if (old_size == new_size)
{ {
return; return;
} }
if (_this->m_AllocatedRdramSize == 0x400000) if (old_size > new_size)
{ {
if (VirtualAlloc(_this->m_RDRAM + 0x400000, 0x400000, MEM_COMMIT, PAGE_READWRITE)==NULL) VirtualFree(
{ _this->m_RDRAM + new_size,
WriteTrace(TraceError,__FUNCTION__ ": failed to allocate extended memory"); old_size - new_size,
g_Notify->FatalError(GS(MSG_MEM_ALLOC_ERROR)); MEM_DECOMMIT
} );
_this->m_AllocatedRdramSize = 0x800000;
} }
else else
{ {
VirtualFree(_this->m_RDRAM + 0x400000, 0x400000,MEM_DECOMMIT); void * result;
_this->m_AllocatedRdramSize = 0x400000;
}
result = VirtualAlloc(
_this->m_RDRAM + old_size,
new_size - old_size,
MEM_COMMIT,
PAGE_READWRITE
);
if (result == NULL)
{
WriteTrace(TraceError, __FUNCTION__": failed to allocate extended memory");
g_Notify -> FatalError(GS(MSG_MEM_ALLOC_ERROR));
}
}
_this->m_AllocatedRdramSize = new_size;
} }
void CMipsMemoryVM::ChangeSpStatus() void CMipsMemoryVM::ChangeSpStatus()

View File

@ -10,6 +10,8 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
extern unsigned long swap32by8(unsigned long word);
class CMipsMemoryVM : class CMipsMemoryVM :
public CMipsMemory, public CMipsMemory,
public CTransVaddr, public CTransVaddr,
@ -65,7 +67,6 @@ public:
//Compilation Functions //Compilation Functions
void ResetMemoryStack(); void ResetMemoryStack();
void ResetTLB();
void Compile_LB(); void Compile_LB();
void Compile_LBU(); void Compile_LBU();
@ -166,6 +167,6 @@ private:
mutable char m_strLabelName[100]; mutable char m_strLabelName[100];
//BIG look up table to quickly translate the tlb to real mem address //BIG look up table to quickly translate the tlb to real mem address
DWORD * m_TLB_ReadMap; size_t * m_TLB_ReadMap;
DWORD * m_TLB_WriteMap; size_t * m_TLB_WriteMap;
}; };

View File

@ -173,13 +173,13 @@ void CPifRam::PifRamWrite()
{ {
ResponseValue = (ResponseValue << 8) | ((Response[(z - 1)*2] << 4) + Response[(z - 1)*2+1]); ResponseValue = (ResponseValue << 8) | ((Response[(z - 1)*2] << 4) + Response[(z - 1)*2+1]);
} }
*(QWORD *)&m_PifRam[48] = ResponseValue; std::memcpy(&m_PifRam[48], &ResponseValue, sizeof(QWORD));
ResponseValue = 0; ResponseValue = 0;
for (int z = 7; z > 0; z--) for (int z = 7; z > 0; z--)
{ {
ResponseValue = (ResponseValue << 8) | ((Response[((z + 8) - 1)*2] << 4) + Response[((z + 8) - 1)*2+1]); ResponseValue = (ResponseValue << 8) | ((Response[((z + 8) - 1)*2] << 4) + Response[((z + 8) - 1)*2+1]);
} }
*(QWORD *)&m_PifRam[56] = ResponseValue; std::memcpy(&m_PifRam[56], &ResponseValue, sizeof(QWORD));
} }
break; break;
case 0x08: case 0x08:
@ -302,34 +302,15 @@ void CPifRam::SI_DMA_READ()
} }
else else
{ {
#ifdef _M_IX86 for (size_t i = 0; i < 64; i += 4)
_asm
{ {
mov edi, dword ptr [SI_DRAM_ADDR_REG] unsigned __int32 pif_ram_dword;
mov edi, dword ptr [edi] std::memcpy(&pif_ram_dword, &PifRamPos[i], sizeof(unsigned __int32));
add edi, RDRAM
mov ecx, PifRamPos pif_ram_dword = swap32by8(pif_ram_dword);
mov edx, 0
memcpyloop: std::memcpy(&RDRAM[SI_DRAM_ADDR_REG + i], &pif_ram_dword, sizeof(unsigned __int32));
mov eax, dword ptr [ecx + edx]
bswap eax
mov dword ptr [edi + edx],eax
mov eax, dword ptr [ecx + edx + 4]
bswap eax
mov dword ptr [edi + edx + 4],eax
mov eax, dword ptr [ecx + edx + 8]
bswap eax
mov dword ptr [edi + edx + 8],eax
mov eax, dword ptr [ecx + edx + 12]
bswap eax
mov dword ptr [edi + edx + 12],eax
add edx, 16
cmp edx, 64
jb memcpyloop
} }
#else
g_Notify->BreakPoint(__FILEW__,__LINE__);
#endif
} }
if (LogOptions.LogPRDMAMemStores) if (LogOptions.LogPRDMAMemStores)
@ -399,10 +380,9 @@ void CPifRam::SI_DMA_WRITE()
if ((int)SI_DRAM_ADDR_REG < 0) if ((int)SI_DRAM_ADDR_REG < 0)
{ {
int count, RdramPos; int RdramPos = (int)SI_DRAM_ADDR_REG;
RdramPos = (int)SI_DRAM_ADDR_REG; for (int count = 0; count < 0x40; count++, RdramPos++)
for (count = 0; count < 0x40; count++, RdramPos++)
{ {
if (RdramPos < 0) if (RdramPos < 0)
{ {
@ -413,34 +393,15 @@ void CPifRam::SI_DMA_WRITE()
} }
else else
{ {
#ifdef _M_IX86 for (size_t i = 0; i < 64; i += 4)
_asm
{ {
mov ecx, dword ptr [SI_DRAM_ADDR_REG] unsigned __int32 rdram_dword;
mov ecx, dword ptr [ecx] std::memcpy(&rdram_dword, &RDRAM[SI_DRAM_ADDR_REG + i], sizeof(unsigned __int32));
add ecx, RDRAM
mov edi, PifRamPos rdram_dword = swap32by8(rdram_dword);
mov edx, 0
memcpyloop: std::memcpy(&PifRamPos[i], &rdram_dword, sizeof(unsigned __int32));
mov eax, dword ptr [ecx + edx]
bswap eax
mov dword ptr [edi + edx],eax
mov eax, dword ptr [ecx + edx + 4]
bswap eax
mov dword ptr [edi + edx + 4],eax
mov eax, dword ptr [ecx + edx + 8]
bswap eax
mov dword ptr [edi + edx + 8],eax
mov eax, dword ptr [ecx + edx + 12]
bswap eax
mov dword ptr [edi + edx + 12],eax
add edx, 16
cmp edx, 64
jb memcpyloop
} }
#else
g_Notify->BreakPoint(__FILEW__,__LINE__);
#endif
} }
if (LogOptions.LogPRDMAMemLoads) if (LogOptions.LogPRDMAMemLoads)
@ -656,7 +617,9 @@ void CPifRam::ReadControllerCommand (int Control, BYTE * Command) {
if (Command[0] != 1) { g_Notify->DisplayError(L"What am I meant to do with this Controller Command"); } if (Command[0] != 1) { g_Notify->DisplayError(L"What am I meant to do with this Controller Command"); }
if (Command[1] != 4) { g_Notify->DisplayError(L"What am I meant to do with this Controller Command"); } if (Command[1] != 4) { g_Notify->DisplayError(L"What am I meant to do with this Controller Command"); }
} }
*(DWORD *)&Command[3] = g_BaseSystem->GetButtons(Control);
const DWORD buttons = g_BaseSystem->GetButtons(Control);
std::memcpy(&Command[3], &buttons, sizeof(DWORD));
} }
break; break;
case 0x02: //read from controller pack case 0x02: //read from controller pack

View File

@ -11,8 +11,8 @@
#include "stdafx.h" #include "stdafx.h"
CSram::CSram ( bool ReadOnly ) : CSram::CSram ( bool ReadOnly ) :
m_hFile(NULL), m_ReadOnly(ReadOnly),
m_ReadOnly(ReadOnly) m_hFile(NULL)
{ {
} }
@ -53,6 +53,8 @@ bool CSram::LoadSram()
void CSram::DmaFromSram(BYTE * dest, int StartOffset, int len) void CSram::DmaFromSram(BYTE * dest, int StartOffset, int len)
{ {
DWORD dwRead; DWORD dwRead;
DWORD i;
BYTE tmp[4];
if (m_hFile == NULL) if (m_hFile == NULL)
{ {
@ -61,13 +63,76 @@ void CSram::DmaFromSram(BYTE * dest, int StartOffset, int len)
return; return;
} }
} }
SetFilePointer(m_hFile,StartOffset,NULL,FILE_BEGIN); DWORD Offset = StartOffset & 3;
ReadFile(m_hFile,dest,len,&dwRead,NULL);
if (Offset == 0)
{
SetFilePointer(m_hFile, StartOffset, NULL, FILE_BEGIN);
ReadFile(m_hFile, dest, len, &dwRead, NULL);
}
else
{
SetFilePointer(m_hFile, StartOffset - Offset, NULL, FILE_BEGIN);
ReadFile(m_hFile, tmp, 4, &dwRead, NULL);
for (i = 0; i < (4 - Offset); i++)
{
dest[i + Offset] = tmp[i];
}
for (i = 4 - Offset; i < len - Offset; i += 4)
{
ReadFile(m_hFile, tmp, 4, &dwRead, NULL);
switch (Offset)
{
case 1:
dest[i + 2] = tmp[0];
dest[i + 3] = tmp[1];
dest[i + 4] = tmp[2];
dest[i - 3] = tmp[3];
break;
case 2:
dest[i + 4] = tmp[0];
dest[i + 5] = tmp[1];
dest[i - 2] = tmp[2];
dest[i - 1] = tmp[3];
break;
case 3:
dest[i + 6] = tmp[0];
dest[i - 1] = tmp[1];
dest[i] = tmp[2];
dest[i + 1] = tmp[3];
break;
default:
break;
}
}
ReadFile(m_hFile, tmp, 4, &dwRead, NULL);
switch (Offset)
{
case 1:
dest[i - 3] = tmp[3];
break;
case 2:
dest[i - 2] = tmp[2];
dest[i - 1] = tmp[3];
break;
case 3:
dest[i - 1] = tmp[1];
dest[i] = tmp[2];
dest[i + 1] = tmp[3];
break;
default:
break;
}
}
} }
void CSram::DmaToSram(BYTE * Source, int StartOffset, int len) void CSram::DmaToSram(BYTE * Source, int StartOffset, int len)
{ {
DWORD dwWritten;
DWORD i;
BYTE tmp[4];
if (m_ReadOnly) if (m_ReadOnly)
{ {
return; return;
@ -80,8 +145,68 @@ void CSram::DmaToSram(BYTE * Source, int StartOffset, int len)
return; return;
} }
} }
DWORD dwWritten; DWORD Offset = StartOffset & 3;
SetFilePointer(m_hFile,StartOffset,NULL,FILE_BEGIN); if (Offset == 0)
WriteFile(m_hFile,Source,len,&dwWritten,NULL); {
SetFilePointer(m_hFile, StartOffset, NULL, FILE_BEGIN);
WriteFile(m_hFile, Source, len, &dwWritten, NULL);
}
else
{
for (i = 0; i < (4 - Offset); i++)
{
tmp[i] = Source[i + Offset];
}
SetFilePointer(m_hFile, StartOffset - Offset, NULL, FILE_BEGIN);
WriteFile(m_hFile, tmp, (4 - Offset), &dwWritten, NULL);
SetFilePointer(m_hFile, Offset, NULL, FILE_CURRENT);
for (i = 4 - Offset; i < len - Offset; i += 4)
{
switch (Offset)
{
case 1:
tmp[0] = Source[i + 2];
tmp[1] = Source[i + 3];
tmp[2] = Source[i + 4];
tmp[3] = Source[i - 3];
break;
case 2:
tmp[0] = Source[i + 4];
tmp[1] = Source[i + 5];
tmp[2] = Source[i - 2];
tmp[3] = Source[i - 1];
break;
case 3:
tmp[0] = Source[i + 6];
tmp[1] = Source[i - 1];
tmp[2] = Source[i];
tmp[3] = Source[i + 1];
break;
default:
break;
}
WriteFile(m_hFile, tmp, 4, &dwWritten, NULL);
}
switch (Offset)
{
case 1:
tmp[0] = Source[i - 3];
break;
case 2:
tmp[0] = Source[i - 2];
tmp[0] = Source[i - 1];
break;
case 3:
tmp[0] = Source[i - 1];
tmp[0] = Source[i];
tmp[0] = Source[i + 1];
break;
default:
break;
}
SetFilePointer(m_hFile, 4 - Offset, NULL, FILE_CURRENT);
WriteFile(m_hFile, tmp, Offset, &dwWritten, NULL);
}
FlushFileBuffers(m_hFile); FlushFileBuffers(m_hFile);
} }

View File

@ -11,9 +11,9 @@
#include "stdafx.h" #include "stdafx.h"
CSystemEvents::CSystemEvents(CN64System * System, CPlugins * Plugins) : CSystemEvents::CSystemEvents(CN64System * System, CPlugins * Plugins) :
m_bDoSomething(false),
m_System(System), m_System(System),
m_Plugins(Plugins) m_Plugins(Plugins),
m_bDoSomething(false)
{ {
} }

View File

@ -13,36 +13,37 @@
#pragma warning(disable:4355) // Disable 'this' : used in base member initializer list #pragma warning(disable:4355) // Disable 'this' : used in base member initializer list
#include <windows.h> #include <windows.h>
#include <commdlg.h>
CN64System::CN64System ( CPlugins * Plugins, bool SavesReadOnly ) : CN64System::CN64System ( CPlugins * Plugins, bool SavesReadOnly ) :
CSystemEvents(this, Plugins), CSystemEvents(this, Plugins),
m_Cheats(NULL),
m_EndEmulation(false),
m_SaveUsing((SAVE_CHIP_TYPE)g_Settings->LoadDword(Game_SaveChip)),
m_Plugins(Plugins),
m_SyncCPU(NULL),
m_SyncPlugins(NULL), m_SyncPlugins(NULL),
m_SyncWindow(NULL), m_SyncWindow(NULL),
m_Reg(this,this),
m_MMU_VM(this,SavesReadOnly), m_MMU_VM(this,SavesReadOnly),
m_TLB(this), m_TLB(this),
m_Reg(this,this),
m_FPS(g_Notify), m_FPS(g_Notify),
m_Plugins(Plugins),
m_Cheats(NULL),
m_SyncCPU(NULL),
m_Recomp(NULL), m_Recomp(NULL),
m_InReset(false), m_InReset(false),
m_EndEmulation(false),
m_bCleanFrameBox(true),
m_bInitialized(false),
m_NextTimer(0), m_NextTimer(0),
m_SystemTimer(m_NextTimer), m_SystemTimer(m_NextTimer),
m_bCleanFrameBox(true),
m_bInitialized(false),
m_RspBroke(true),
m_DMAUsed(false), m_DMAUsed(false),
m_CPU_Handle(NULL),
m_CPU_ThreadID(0),
m_TestTimer(false), m_TestTimer(false),
m_NextInstruction(0), m_NextInstruction(0),
m_JumpToLocation(0), m_JumpToLocation(0),
m_TLBLoadAddress(0), m_TLBLoadAddress(0),
m_TLBStoreAddress(0), m_TLBStoreAddress(0),
m_SaveUsing((SAVE_CHIP_TYPE)g_Settings->LoadDword(Game_SaveChip)), m_SyncCount(0),
m_RspBroke(true), m_CPU_Handle(NULL),
m_SyncCount(0) m_CPU_ThreadID(0)
{ {
DWORD gameHertz = g_Settings->LoadDword(Game_ScreenHertz); DWORD gameHertz = g_Settings->LoadDword(Game_ScreenHertz);
if (gameHertz == 0) if (gameHertz == 0)
@ -207,6 +208,9 @@ bool CN64System::RunFileImage ( const char * FileLoc )
g_Notify->AddRecentRom(FileLoc); g_Notify->AddRecentRom(FileLoc);
g_Notify->SetWindowCaption(g_Settings->LoadString(Game_GoodName).ToUTF16().c_str()); g_Notify->SetWindowCaption(g_Settings->LoadString(Game_GoodName).ToUTF16().c_str());
g_Settings->SaveBool(GameRunning_LoadingInProgress, false);
g_Notify->RefreshMenu();
if (g_Settings->LoadDword(Setting_AutoStart) != 0) if (g_Settings->LoadDword(Setting_AutoStart) != 0)
{ {
g_BaseSystem = new CN64System(g_Plugins,false); g_BaseSystem = new CN64System(g_Plugins,false);
@ -215,8 +219,6 @@ bool CN64System::RunFileImage ( const char * FileLoc )
g_BaseSystem->StartEmulation(true); g_BaseSystem->StartEmulation(true);
} }
} }
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
g_Notify->RefreshMenu();
} }
else else
{ {
@ -307,11 +309,15 @@ void CN64System::StartEmulation2 ( bool NewThread )
{ {
g_Notify->DisplayMessage(5,L"Copy Plugins"); g_Notify->DisplayMessage(5,L"Copy Plugins");
g_Plugins->CopyPlugins(g_Settings->LoadString(Directory_PluginSync)); g_Plugins->CopyPlugins(g_Settings->LoadString(Directory_PluginSync));
#if defined(WINDOWS_UI)
m_SyncWindow = new CMainGui(false); m_SyncWindow = new CMainGui(false);
m_SyncPlugins = new CPlugins( g_Settings->LoadString(Directory_PluginSync) ); m_SyncPlugins = new CPlugins( g_Settings->LoadString(Directory_PluginSync) );
m_SyncPlugins->SetRenderWindows(m_SyncWindow,m_SyncWindow); m_SyncPlugins->SetRenderWindows(m_SyncWindow,m_SyncWindow);
m_SyncCPU = new CN64System(m_SyncPlugins, true); m_SyncCPU = new CN64System(m_SyncPlugins, true);
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
} }
if (CpuType == CPU_Recompiler || CpuType == CPU_SyncCores) if (CpuType == CPU_Recompiler || CpuType == CPU_SyncCores)
@ -562,7 +568,11 @@ void CN64System::Reset (bool bInitReg, bool ClearMenory)
RefreshGameSettings(); RefreshGameSettings();
m_Audio.Reset(); m_Audio.Reset();
m_MMU_VM.Reset(ClearMenory); m_MMU_VM.Reset(ClearMenory);
#if defined(WINDOWS_UI)
Debug_Reset(); Debug_Reset();
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
Mempak::Close(); Mempak::Close();
m_CyclesToSkip = 0; m_CyclesToSkip = 0;
@ -810,8 +820,8 @@ void CN64System::InitRegisters( bool bPostPif, CMipsMemory & MMU )
case CIC_NUS_6101: case CIC_NUS_6101:
m_Reg.m_GPR[22].DW=0x000000000000003F; m_Reg.m_GPR[22].DW=0x000000000000003F;
break; break;
case CIC_NUS_DDIPL: //64DD IPL case CIC_NUS_8303: //64DD IPL CIC
case CIC_NUS_8303: //64DD CIC case CIC_NUS_5167: //64DD CONVERSION CIC
m_Reg.m_GPR[22].DW=0x00000000000000DD; m_Reg.m_GPR[22].DW=0x00000000000000DD;
break; break;
case CIC_UNKNOWN: case CIC_UNKNOWN:
@ -902,8 +912,11 @@ void CN64System::ExecuteCPU()
switch ((CPU_TYPE)g_Settings->LoadDword(Game_CpuType)) switch ((CPU_TYPE)g_Settings->LoadDword(Game_CpuType))
{ {
// Currently the compiler is 32-bit only. We might have to ignore that RDB setting for now.
#ifndef _WIN64
case CPU_Recompiler: ExecuteRecompiler(); break; case CPU_Recompiler: ExecuteRecompiler(); break;
case CPU_SyncCores: ExecuteSyncCPU(); break; case CPU_SyncCores: ExecuteSyncCPU(); break;
#endif
default: ExecuteInterpret(); break; default: ExecuteInterpret(); break;
} }
g_Settings->SaveBool(GameRunning_CPU_Running,(DWORD)false); g_Settings->SaveBool(GameRunning_CPU_Running,(DWORD)false);
@ -1377,7 +1390,6 @@ void CN64System::DumpSyncErrors (CN64System * SecondCPU)
g_Notify->DisplayError(L"Sync Error"); g_Notify->DisplayError(L"Sync Error");
g_Notify->BreakPoint(__FILEW__,__LINE__); g_Notify->BreakPoint(__FILEW__,__LINE__);
// AddEvent(CloseCPU);
} }
bool CN64System::SaveState() bool CN64System::SaveState()
@ -1575,8 +1587,11 @@ bool CN64System::LoadState()
bool CN64System::LoadState(LPCSTR FileName) bool CN64System::LoadState(LPCSTR FileName)
{ {
DWORD dwRead, Value,SaveRDRAMSize, NextVITimer = 0; DWORD dwRead, Value,SaveRDRAMSize, NextVITimer = 0, old_status, old_width, old_dacrate;
bool LoadedZipFile = false, AudioResetOnLoad; bool LoadedZipFile = false, AudioResetOnLoad;
old_status = g_Reg->VI_STATUS_REG;
old_width = g_Reg->VI_WIDTH_REG;
old_dacrate = g_Reg->AI_DACRATE_REG;
WriteTraceF((TraceType)(TraceDebug | TraceRecompiler),__FUNCTION__ "(%s): Start",FileName); WriteTraceF((TraceType)(TraceDebug | TraceRecompiler),__FUNCTION__ "(%s): Start",FileName);
@ -1752,6 +1767,21 @@ bool CN64System::LoadState(LPCSTR FileName)
m_Audio.SetFrequency(m_Reg.AI_DACRATE_REG, g_System->SystemType()); m_Audio.SetFrequency(m_Reg.AI_DACRATE_REG, g_System->SystemType());
} }
if (old_status != g_Reg->VI_STATUS_REG)
{
g_Plugins->Gfx()->ViStatusChanged();
}
if (old_width != g_Reg->VI_WIDTH_REG)
{
g_Plugins->Gfx()->ViWidthChanged();
}
if (old_dacrate != g_Reg->AI_DACRATE_REG)
{
g_Plugins->Audio()->DacrateChanged(g_System->SystemType());
}
//Fix Random Register //Fix Random Register
while ((int)m_Reg.RANDOM_REGISTER < (int)m_Reg.WIRED_REGISTER) while ((int)m_Reg.RANDOM_REGISTER < (int)m_Reg.WIRED_REGISTER)
{ {
@ -2047,5 +2077,9 @@ void CN64System::TLB_Unmaped ( DWORD VAddr, DWORD Len )
void CN64System::TLB_Changed() void CN64System::TLB_Changed()
{ {
#if defined(WINDOWS_UI)
Debug_RefreshTLBWindow(); Debug_RefreshTLBWindow();
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
} }

View File

@ -25,8 +25,12 @@ class CN64System :
private CSystemEvents, private CSystemEvents,
protected CN64SystemSettings, protected CN64SystemSettings,
public CGameSettings, public CGameSettings,
#if defined(WINDOWS_UI)
protected CDebugSettings, protected CDebugSettings,
public CDebugger public CDebugger
#else
protected CDebugSettings
#endif
{ {
public: public:
CN64System ( CPlugins * Plugins, bool SavesReadOnly ); CN64System ( CPlugins * Plugins, bool SavesReadOnly );
@ -96,7 +100,6 @@ private:
void ExecuteCPU (); void ExecuteCPU ();
void RefreshScreen (); void RefreshScreen ();
bool InternalEvent ();
void DumpSyncErrors ( CN64System * SecondCPU ); void DumpSyncErrors ( CN64System * SecondCPU );
void StartEmulation2 ( bool NewThread ); void StartEmulation2 ( bool NewThread );
bool SetActiveSystem ( bool bActive = true ); bool SetActiveSystem ( bool bActive = true );
@ -107,12 +110,6 @@ private:
void ExecuteInterpret(); void ExecuteInterpret();
void ExecuteSyncCPU(); void ExecuteSyncCPU();
void AddEvent(SystemEvent Event);
//Notification of changing conditions
void FunctionStarted(DWORD NewFuncAddress, DWORD OldFuncAddress, DWORD ReturnAddress);
void FunctionEnded(DWORD ReturnAddress, DWORD StackPos);
//Mark information saying that the CPU has stopped //Mark information saying that the CPU has stopped
void CpuStopped(); void CpuStopped();

View File

@ -246,8 +246,8 @@ void CN64Rom::CalculateCicChip()
case 0x000000D6497E414B: m_CicChip = CIC_NUS_6103; break; case 0x000000D6497E414B: m_CicChip = CIC_NUS_6103; break;
case 0x0000011A49F60E96: m_CicChip = CIC_NUS_6105; break; case 0x0000011A49F60E96: m_CicChip = CIC_NUS_6105; break;
case 0x000000D6D5BE5580: m_CicChip = CIC_NUS_6106; break; case 0x000000D6D5BE5580: m_CicChip = CIC_NUS_6106; break;
case 0x000001053BC19870: m_CicChip = CIC_NUS_8303; break; //64DD CONVERSION CIC case 0x000001053BC19870: m_CicChip = CIC_NUS_5167; break; //64DD CONVERSION CIC
case 0x000000D2E53EF008: m_CicChip = CIC_NUS_DDIPL; break; //64DD IPL case 0x000000D2E53EF008: m_CicChip = CIC_NUS_8303; break; //64DD IPL
default: default:
if (bHaveDebugger()) if (bHaveDebugger())
g_Notify->DisplayError(L"Unknown CIC checksum:\n%I64X.", CRC); g_Notify->DisplayError(L"Unknown CIC checksum:\n%I64X.", CRC);

View File

@ -51,8 +51,8 @@ enum SYSTEM_TYPE {
enum CICChip { enum CICChip {
CIC_UNKNOWN = -1, CIC_NUS_6101 = 1, CIC_NUS_6102 = 2, CIC_NUS_6103 = 3, CIC_UNKNOWN = -1, CIC_NUS_6101 = 1, CIC_NUS_6102 = 2, CIC_NUS_6103 = 3,
CIC_NUS_6104 = 4, CIC_NUS_6105 = 5, CIC_NUS_6106 = 6, CIC_NUS_8303 = 7, CIC_NUS_6104 = 4, CIC_NUS_6105 = 5, CIC_NUS_6106 = 6, CIC_NUS_5167 = 7,
CIC_NUS_DDIPL = 8 CIC_NUS_8303 = 8
}; };
enum Country { enum Country {

View File

@ -17,8 +17,8 @@ CCodeBlock::CCodeBlock(DWORD VAddrEnter, BYTE * RecompPos) :
m_VAddrFirst(VAddrEnter), m_VAddrFirst(VAddrEnter),
m_VAddrLast(VAddrEnter), m_VAddrLast(VAddrEnter),
m_CompiledLocation(RecompPos), m_CompiledLocation(RecompPos),
m_Test(1), m_EnterSection(NULL),
m_EnterSection(NULL) m_Test(1)
{ {
CCodeSection * baseSection = new CCodeSection(this, VAddrEnter, 0, false); CCodeSection * baseSection = new CCodeSection(this, VAddrEnter, 0, false);
if (baseSection == NULL) if (baseSection == NULL)

View File

@ -52,7 +52,6 @@ private:
void DetermineLoops (); void DetermineLoops ();
void LogSectionInfo (); void LogSectionInfo ();
bool SetSection ( CCodeSection * & Section, CCodeSection * CurrentSection, DWORD TargetPC, bool LinkAllowed, DWORD CurrentPC ); bool SetSection ( CCodeSection * & Section, CCodeSection * CurrentSection, DWORD TargetPC, bool LinkAllowed, DWORD CurrentPC );
bool SetJumpInfo ( CCodeSection * & Section, DWORD TargetPC, DWORD CurrentPC );
bool AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & ContinuePC, bool & LikelyBranch, bool & IncludeDelaySlot, bool AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & ContinuePC, bool & LikelyBranch, bool & IncludeDelaySlot,
bool & EndBlock, bool & PermLoop ); bool & EndBlock, bool & PermLoop );

View File

@ -88,17 +88,17 @@ static bool DelaySlotEffectsJump(DWORD JumpPC) {
CCodeSection::CCodeSection( CCodeBlock * CodeBlock, DWORD EnterPC, DWORD ID, bool LinkAllowed) : CCodeSection::CCodeSection( CCodeBlock * CodeBlock, DWORD EnterPC, DWORD ID, bool LinkAllowed) :
m_BlockInfo(CodeBlock), m_BlockInfo(CodeBlock),
m_SectionID(ID),
m_EnterPC(EnterPC), m_EnterPC(EnterPC),
m_EndPC((DWORD)-1), m_EndPC((DWORD)-1),
m_SectionID(ID),
m_ContinueSection(NULL), m_ContinueSection(NULL),
m_JumpSection(NULL), m_JumpSection(NULL),
m_EndSection(false),
m_LinkAllowed(LinkAllowed), m_LinkAllowed(LinkAllowed),
m_CompiledLocation(NULL),
m_Test(0), m_Test(0),
m_Test2(0), m_Test2(0),
m_CompiledLocation(NULL),
m_InLoop(false), m_InLoop(false),
m_EndSection(false),
m_DelaySlot(false) m_DelaySlot(false)
{ {
CPU_Message(__FUNCTION__ ": ID %d EnterPC 0x%08X",ID,EnterPC); CPU_Message(__FUNCTION__ ": ID %d EnterPC 0x%08X",ID,EnterPC);

View File

@ -25,7 +25,6 @@ public:
void SetJumpAddress ( DWORD JumpPC, DWORD TargetPC, bool PermLoop ); void SetJumpAddress ( DWORD JumpPC, DWORD TargetPC, bool PermLoop );
void SetContinueAddress ( DWORD JumpPC, DWORD TargetPC ); void SetContinueAddress ( DWORD JumpPC, DWORD TargetPC );
void CompileCop1Test (); void CompileCop1Test ();
bool CreateSectionLinkage ();
bool GenerateX86Code ( DWORD Test ); bool GenerateX86Code ( DWORD Test );
void GenerateSectionLinkage (); void GenerateSectionLinkage ();
void CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void (*x86Jmp)(const char * Label, DWORD Value)); void CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void (*x86Jmp)(const char * Label, DWORD Value));

View File

@ -14,8 +14,8 @@ CCompiledFunc::CCompiledFunc( const CCodeBlock & CodeBlock ) :
m_EnterPC(CodeBlock.VAddrEnter()), m_EnterPC(CodeBlock.VAddrEnter()),
m_MinPC(CodeBlock.VAddrFirst()), m_MinPC(CodeBlock.VAddrFirst()),
m_MaxPC(CodeBlock.VAddrLast()), m_MaxPC(CodeBlock.VAddrLast()),
m_Function((Func)CodeBlock.CompiledLocation()),
m_Hash(CodeBlock.Hash()), m_Hash(CodeBlock.Hash()),
m_Function((Func)CodeBlock.CompiledLocation()),
m_Next(NULL) m_Next(NULL)
{ {
m_MemContents[0] = CodeBlock.MemContents(0); m_MemContents[0] = CodeBlock.MemContents(0);

View File

@ -13,8 +13,8 @@
CRecompiler::CRecompiler(CRegisters & Registers, CProfiling & Profile, bool & EndEmulation ) : CRecompiler::CRecompiler(CRegisters & Registers, CProfiling & Profile, bool & EndEmulation ) :
m_Registers(Registers), m_Registers(Registers),
m_Profile(Profile), m_Profile(Profile),
PROGRAM_COUNTER(Registers.m_PROGRAM_COUNTER), m_EndEmulation(EndEmulation),
m_EndEmulation(EndEmulation) PROGRAM_COUNTER(Registers.m_PROGRAM_COUNTER)
{ {
if (g_MMU != NULL) if (g_MMU != NULL)
{ {

View File

@ -39,8 +39,6 @@ public:
void Reset(); void Reset();
void ResetRecompCode(bool bAllocate); void ResetRecompCode(bool bAllocate);
bool GenerateX86Code (CCodeBlock & BlockInfo, CCodeSection * Section, DWORD Test );
//Self modifying code methods //Self modifying code methods
void ClearRecompCode_Virt ( DWORD VirtualAddress, int length, REMOVE_REASON Reason ); void ClearRecompCode_Virt ( DWORD VirtualAddress, int length, REMOVE_REASON Reason );
void ClearRecompCode_Phys ( DWORD PhysicalAddress, int length, REMOVE_REASON Reason ); void ClearRecompCode_Phys ( DWORD PhysicalAddress, int length, REMOVE_REASON Reason );
@ -55,11 +53,6 @@ private:
CRecompiler& operator=(const CRecompiler&); // Disable assignment CRecompiler& operator=(const CRecompiler&); // Disable assignment
CCompiledFunc * CompilerCode(); CCompiledFunc * CompilerCode();
bool Compiler4300iBlock ( CCompiledFunc * info );
// Compiling code
bool CreateSectionLinkage ( CCodeSection * Section );
bool DisplaySectionInformation (CCodeSection * Section, DWORD ID, DWORD Test);
// Main loops for the different look up methods // Main loops for the different look up methods
void RecompilerMain_VirtualTable(); void RecompilerMain_VirtualTable();
@ -70,8 +63,6 @@ private:
void RecompilerMain_Lookup_validate(); void RecompilerMain_Lookup_validate();
void RecompilerMain_Lookup_validate_TLB(); void RecompilerMain_Lookup_validate_TLB();
void RemoveFunction (CCompiledFunc * FunInfo, bool DelaySlot, REMOVE_REASON Reason );
CCompiledFuncList m_Functions; CCompiledFuncList m_Functions;
CRegisters & m_Registers; CRegisters & m_Registers;
CProfiling & m_Profile; CProfiling & m_Profile;

View File

@ -3934,8 +3934,8 @@ void CRecompilerOps::SPECIAL_DSRL32() {
if (m_Opcode.rt != m_Opcode.rd) if (m_Opcode.rt != m_Opcode.rd)
UnMap_GPR(m_Opcode.rd, false); UnMap_GPR(m_Opcode.rd, false);
m_RegWorkingSet.SetMipsRegState(m_Opcode.rd,CRegInfo::STATE_CONST_32_ZERO); m_RegWorkingSet.SetMipsRegState(m_Opcode.rd, CRegInfo::STATE_CONST_64);
m_RegWorkingSet.SetMipsRegLo(m_Opcode.rd, (DWORD)(GetMipsReg(m_Opcode.rt) >> (m_Opcode.sa + 32))); m_RegWorkingSet.SetMipsReg(m_Opcode.rd, (DWORD)(GetMipsRegHi(m_Opcode.rt) >> m_Opcode.sa));
} else if (IsMapped(m_Opcode.rt)) { } else if (IsMapped(m_Opcode.rt)) {
ProtectGPR(m_Opcode.rt); ProtectGPR(m_Opcode.rt);
if (Is64Bit(m_Opcode.rt)) { if (Is64Bit(m_Opcode.rt)) {

View File

@ -203,7 +203,6 @@ protected:
static void ExitCodeBlock(); static void ExitCodeBlock();
static void CompileReadTLBMiss(DWORD VirtualAddress, x86Reg LookUpReg); static void CompileReadTLBMiss(DWORD VirtualAddress, x86Reg LookUpReg);
static void CompileReadTLBMiss(x86Reg AddressReg, x86Reg LookUpReg); static void CompileReadTLBMiss(x86Reg AddressReg, x86Reg LookUpReg);
static void CompileWriteTLBMiss(DWORD VirtualAddress, x86Reg LookUpReg);
static void CompileWriteTLBMiss(x86Reg AddressReg, x86Reg LookUpReg); static void CompileWriteTLBMiss(x86Reg AddressReg, x86Reg LookUpReg);
static void UpdateSyncCPU(CRegInfo & RegSet, DWORD Cycles); static void UpdateSyncCPU(CRegInfo & RegSet, DWORD Cycles);
static void UpdateCounters(CRegInfo & RegSet, bool CheckTimer, bool ClearValues = false); static void UpdateCounters(CRegInfo & RegSet, bool CheckTimer, bool ClearValues = false);

View File

@ -31,7 +31,7 @@ void Start_x86_Log (void) {
CPath LogFileName(CPath::MODULE_DIRECTORY); CPath LogFileName(CPath::MODULE_DIRECTORY);
LogFileName.AppendDirectory("Logs"); LogFileName.AppendDirectory("Logs");
LogFileName.SetNameExtension(_T("CPUoutput.log")); LogFileName.SetNameExtension("CPUoutput.log");
if (hCPULogFile) { Stop_x86_Log(); } if (hCPULogFile) { Stop_x86_Log(); }
hCPULogFile = CreateFile(LogFileName,GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE,NULL, hCPULogFile = CreateFile(LogFileName,GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,

View File

@ -126,12 +126,12 @@ DWORD CALLBACK RomInfoProc (HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam) {
if (_this->m_pRomInfo->CicChipID() == CIC_UNKNOWN) { if (_this->m_pRomInfo->CicChipID() == CIC_UNKNOWN) {
sprintf(&String[1],"Unknown"); sprintf(&String[1],"Unknown");
} }
else if (_this->m_pRomInfo->CicChipID() == CIC_NUS_DDIPL) {
sprintf(&String[1], "64DD IPL");
}
else if (_this->m_pRomInfo->CicChipID() == CIC_NUS_8303) { else if (_this->m_pRomInfo->CicChipID() == CIC_NUS_8303) {
sprintf(&String[1], "CIC-NUS-8303"); sprintf(&String[1], "CIC-NUS-8303");
} }
else if (_this->m_pRomInfo->CicChipID() == CIC_NUS_5167) {
sprintf(&String[1], "CIC-NUS-5167");
}
else { else {
sprintf(&String[1],"CIC-NUS-610%d",_this->m_pRomInfo->CicChipID()); sprintf(&String[1],"CIC-NUS-610%d",_this->m_pRomInfo->CicChipID());
} }

View File

@ -11,12 +11,12 @@
#include "stdafx.h" #include "stdafx.h"
CAudioPlugin::CAudioPlugin() : CAudioPlugin::CAudioPlugin() :
m_hAudioThread(NULL),
AiDacrateChanged(NULL),
AiLenChanged(NULL), AiLenChanged(NULL),
AiReadLength(NULL), AiReadLength(NULL),
ProcessAList(NULL), ProcessAList(NULL),
AiUpdate(NULL) m_hAudioThread(NULL),
AiUpdate(NULL),
AiDacrateChanged(NULL)
{ {
} }
@ -135,8 +135,13 @@ bool CAudioPlugin::Initiate(CN64System * System, CMainGui * RenderWindow)
if (System != NULL) if (System != NULL)
{ {
if (AiUpdate && !m_hAudioThread) if (AiUpdate)
{ {
if (m_hAudioThread)
{
WriteTraceF(TraceAudio, __FUNCTION__ ": Terminate Audio Thread");
TerminateThread(m_hAudioThread, 0);
}
m_hAudioThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AudioThread, (LPVOID)this, 0, &ThreadID); m_hAudioThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AudioThread, (LPVOID)this, 0, &ThreadID);
} }

View File

@ -11,13 +11,13 @@
#include "stdafx.h" #include "stdafx.h"
CControl_Plugin::CControl_Plugin(void) : CControl_Plugin::CControl_Plugin(void) :
m_AllocatedControllers(false),
WM_KeyDown(NULL), WM_KeyDown(NULL),
WM_KeyUp(NULL), WM_KeyUp(NULL),
RumbleCommand(NULL), RumbleCommand(NULL),
GetKeys(NULL), GetKeys(NULL),
ReadController(NULL), ReadController(NULL),
ControllerCommand(NULL) ControllerCommand(NULL),
m_AllocatedControllers(false)
{ {
memset(&m_PluginControllers, 0, sizeof(m_PluginControllers)); memset(&m_PluginControllers, 0, sizeof(m_PluginControllers));
memset(&m_Controllers, 0, sizeof(m_Controllers)); memset(&m_Controllers, 0, sizeof(m_Controllers));

View File

@ -11,18 +11,18 @@
#include "stdafx.h" #include "stdafx.h"
CPlugin::CPlugin() : CPlugin::CPlugin() :
m_hDll(NULL),
m_Initialized(false),
m_RomOpen(false),
RomOpen(NULL),
RomClosed(NULL),
CloseDLL(NULL),
PluginOpened(NULL),
DllAbout(NULL), DllAbout(NULL),
DllConfig(NULL), DllConfig(NULL),
CloseDLL(NULL),
RomOpen(NULL),
RomClosed(NULL),
PluginOpened(NULL),
SetSettingInfo(NULL), SetSettingInfo(NULL),
SetSettingInfo2(NULL), SetSettingInfo2(NULL),
SetSettingInfo3(NULL) SetSettingInfo3(NULL),
m_hDll(NULL),
m_Initialized(false),
m_RomOpen(false)
{ {
memset(&m_PluginInfo, 0, sizeof(m_PluginInfo)); memset(&m_PluginInfo, 0, sizeof(m_PluginInfo));
} }

View File

@ -11,9 +11,9 @@
#include "stdafx.h" #include "stdafx.h"
CPlugins::CPlugins (const stdstr & PluginDir): CPlugins::CPlugins (const stdstr & PluginDir):
m_PluginDir(PluginDir), m_RenderWindow(NULL), m_DummyWindow(NULL),
m_Gfx(NULL), m_Audio(NULL), m_RSP(NULL), m_Control(NULL), m_PluginDir(PluginDir), m_Gfx(NULL), m_Audio(NULL),
m_RenderWindow(NULL), m_DummyWindow(NULL) m_RSP(NULL), m_Control(NULL)
{ {
CreatePlugins(); CreatePlugins();
g_Settings->RegisterChangeCB(Plugin_RSP_Current,this,(CSettings::SettingChangedFunc)PluginChanged); g_Settings->RegisterChangeCB(Plugin_RSP_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
@ -261,7 +261,12 @@ bool CPlugins::Initiate ( CN64System * System )
bool CPlugins::ResetInUiThread ( CN64System * System ) bool CPlugins::ResetInUiThread ( CN64System * System )
{ {
#if defined(WINDOWS_UI)
return m_RenderWindow->ResetPlugins(this, System); return m_RenderWindow->ResetPlugins(this, System);
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
return false;
#endif
} }
bool CPlugins::Reset ( CN64System * System ) bool CPlugins::Reset ( CN64System * System )

View File

@ -15,9 +15,9 @@ void DummyFunc1(BOOL /*a*/) {}
CRSP_Plugin::CRSP_Plugin(void) : CRSP_Plugin::CRSP_Plugin(void) :
DoRspCycles(NULL), DoRspCycles(NULL),
EnableDebugging(NULL), EnableDebugging(NULL),
m_CycleCount(0),
GetDebugInfo(NULL), GetDebugInfo(NULL),
InitiateDebugger(NULL), InitiateDebugger(NULL)
m_CycleCount(0)
{ {
memset(&m_RSPDebug, 0, sizeof(m_RSPDebug)); memset(&m_RSPDebug, 0, sizeof(m_RSPDebug));
} }

View File

@ -66,7 +66,6 @@ private:
virtual int GetSettingStartRange() const { return FirstRSPSettings; } virtual int GetSettingStartRange() const { return FirstRSPSettings; }
bool LoadFunctions ( void ); bool LoadFunctions ( void );
bool Initiate_1_0 ( CPlugins * Plugins, CN64System * System );
void UnloadPluginDetails ( void ); void UnloadPluginDetails ( void );
RSPDEBUG_INFO m_RSPDebug; RSPDEBUG_INFO m_RSPDebug;

View File

@ -15,41 +15,41 @@ bool CSettingTypeApplication::m_UseRegistry = false;
CIniFile * CSettingTypeApplication::m_SettingsIniFile = NULL; CIniFile * CSettingTypeApplication::m_SettingsIniFile = NULL;
CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, DWORD DefaultValue ) : CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, DWORD DefaultValue ) :
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_DefaultStr(""), m_DefaultStr(""),
m_DefaultValue(DefaultValue), m_DefaultValue(DefaultValue),
m_DefaultSetting(Default_Constant), m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName) m_KeyNameIdex(m_KeyName)
{ {
} }
CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, bool DefaultValue ) : CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, bool DefaultValue ) :
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_DefaultStr(""), m_DefaultStr(""),
m_DefaultValue(DefaultValue), m_DefaultValue(DefaultValue),
m_DefaultSetting(Default_Constant), m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName) m_KeyNameIdex(m_KeyName)
{ {
} }
CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, LPCSTR DefaultValue ) : CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, LPCSTR DefaultValue ) :
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_DefaultStr(DefaultValue), m_DefaultStr(DefaultValue),
m_DefaultValue(0), m_DefaultValue(0),
m_DefaultSetting(Default_Constant), m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName) m_KeyNameIdex(m_KeyName)
{ {
} }
CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, SettingID DefaultSetting ) : CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, SettingID DefaultSetting ) :
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_DefaultStr(""), m_DefaultStr(""),
m_DefaultValue(0), m_DefaultValue(0),
m_DefaultSetting(DefaultSetting), m_DefaultSetting(DefaultSetting),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName) m_KeyNameIdex(m_KeyName)
{ {
} }

View File

@ -44,14 +44,21 @@ struct WINDOWS_PAINTSTRUCT {
class CN64System; class CN64System;
#define WINDOWS_UI
// Remove this to test compilation outside of the Windows ATL environment.
#ifdef WINDOWS_UI
#include <WTL App.h> #include <WTL App.h>
#endif
#include <User Interface/MenuShortCuts.h> #include <User Interface/MenuShortCuts.h>
#include ".\\User Interface\\Rom Browser.h" #include ".\\User Interface\\Rom Browser.h"
#include ".\\User Interface\\Gui Class.h" #include ".\\User Interface\\Gui Class.h"
#include ".\\User Interface\\Menu Class.h" #include ".\\User Interface\\Menu Class.h"
#include ".\\User Interface\\Menu Class.h"
#include ".\\User Interface\\Main Menu Class.h" #include ".\\User Interface\\Main Menu Class.h"
#include ".\\User Interface\\Notification Class.h" #include ".\\User Interface\\Notification Class.h"
#include ".\\User Interface\\Frame Per Second Class.h" #include ".\\User Interface\\Frame Per Second Class.h"
#include ".\\User Interface\\resource.h" #include ".\\User Interface\\resource.h"
#ifdef WINDOWS_UI
#include ".\\User Interface\\Settings Config.h" #include ".\\User Interface\\Settings Config.h"
#endif

View File

@ -9,6 +9,9 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include <commctrl.h>
#include "Settings/SettingType/SettingsType-Application.h" #include "Settings/SettingType/SettingsType-Application.h"
extern "C" extern "C"
@ -1057,7 +1060,7 @@ DWORD CALLBACK AboutBoxProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam)
CLIP_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
PROOF_QUALITY, PROOF_QUALITY,
DEFAULT_PITCH|FF_DONTCARE, DEFAULT_PITCH|FF_DONTCARE,
_T("Arial") "Arial"
); );
hAuthorFont = ::CreateFont hAuthorFont = ::CreateFont
@ -1075,7 +1078,7 @@ DWORD CALLBACK AboutBoxProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam)
CLIP_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
PROOF_QUALITY, PROOF_QUALITY,
DEFAULT_PITCH|FF_DONTCARE, DEFAULT_PITCH|FF_DONTCARE,
_T("Arial") "Arial"
); );
hPageHeadingFont = ::CreateFont hPageHeadingFont = ::CreateFont
@ -1093,7 +1096,7 @@ DWORD CALLBACK AboutBoxProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam)
CLIP_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
PROOF_QUALITY, PROOF_QUALITY,
DEFAULT_PITCH|FF_DONTCARE, DEFAULT_PITCH|FF_DONTCARE,
_T("Arial Bold") "Arial Bold"
); );
SendDlgItemMessage(hWnd,IDC_VERSION,WM_SETFONT,(WPARAM)hTextFont,TRUE); SendDlgItemMessage(hWnd,IDC_VERSION,WM_SETFONT,(WPARAM)hTextFont,TRUE);
@ -1251,3 +1254,4 @@ BOOL set_about_field(
temp_string temp_string
); );
} }
#endif

View File

@ -1,5 +1,9 @@
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include <windows.h>
#include <commdlg.h>
CMainMenu::CMainMenu ( CMainGui * hMainWindow ): CMainMenu::CMainMenu ( CMainGui * hMainWindow ):
CBaseMenu(), CBaseMenu(),
m_ResetAccelerators(true) m_ResetAccelerators(true)
@ -1237,3 +1241,4 @@ void CMainMenu::ResetMenu(void)
WriteTrace(TraceDebug,__FUNCTION__ ": Done"); WriteTrace(TraceDebug,__FUNCTION__ ": Done");
} }
#endif

View File

@ -7,10 +7,10 @@ CNotification & Notify ( void )
return g_Notify; return g_Notify;
} }
CNotification::CNotification ( ) : CNotification::CNotification() :
m_NextMsg(0), m_hWnd(NULL),
m_gfxPlugin(NULL), m_gfxPlugin(NULL),
m_hWnd(NULL) m_NextMsg(0)
{ {
_tzset(); _tzset();
} }
@ -118,7 +118,11 @@ void CNotification::DisplayMessage ( int DisplayTime, const wchar_t * Message,
} }
else else
{ {
#if defined(WINDOWS_UI)
m_hWnd->SetStatusText(0, Msg); m_hWnd->SetStatusText(0, Msg);
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
} }
} }
@ -137,7 +141,11 @@ void CNotification::DisplayMessage2 ( const wchar_t * Message, va_list ap ) con
_vsnwprintf( Msg,sizeof(Msg) - 1 ,Message, ap ); _vsnwprintf( Msg,sizeof(Msg) - 1 ,Message, ap );
va_end( ap ); va_end( ap );
#if defined(WINDOWS_UI)
m_hWnd->SetStatusText(1,Msg); m_hWnd->SetStatusText(1,Msg);
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
} }
void CNotification::SetGfxPlugin( CGfxPlugin * Plugin ) void CNotification::SetGfxPlugin( CGfxPlugin * Plugin )
@ -148,11 +156,15 @@ void CNotification::SetGfxPlugin( CGfxPlugin * Plugin )
void CNotification::SetWindowCaption (const wchar_t * Caption) void CNotification::SetWindowCaption (const wchar_t * Caption)
{ {
static const size_t TITLE_SIZE = 256; static const size_t TITLE_SIZE = 256;
wchar_t WinTitle[TITLE_SIZE]; wchar_t WinTitle[TITLE_SIZE];
_snwprintf(WinTitle, TITLE_SIZE, L"%s - %s", Caption, g_Settings->LoadString(Setting_ApplicationName).ToUTF16().c_str()); _snwprintf(WinTitle, TITLE_SIZE, L"%s - %s", Caption, g_Settings->LoadString(Setting_ApplicationName).ToUTF16().c_str());
WinTitle[TITLE_SIZE - 1] = 0; WinTitle[TITLE_SIZE - 1] = 0;
#if defined(WINDOWS_UI)
m_hWnd->Caption(WinTitle); m_hWnd->Caption(WinTitle);
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
} }
void CNotification::FatalError ( const wchar_t * Message, ... ) const void CNotification::FatalError ( const wchar_t * Message, ... ) const
@ -257,7 +269,12 @@ void CNotification::AddRecentRom ( const char * ImagePath )
void CNotification::RefreshMenu ( void ) void CNotification::RefreshMenu ( void )
{ {
if (m_hWnd == NULL) { return; } if (m_hWnd == NULL) { return; }
#if defined(WINDOWS_UI)
m_hWnd->RefreshMenu(); m_hWnd->RefreshMenu();
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
} }
void CNotification::HideRomBrowser ( void ) void CNotification::HideRomBrowser ( void )
@ -280,13 +297,23 @@ void CNotification::ShowRomBrowser ( void )
void CNotification::BringToTop ( void ) void CNotification::BringToTop ( void )
{ {
if (m_hWnd == NULL) { return; } if (m_hWnd == NULL) { return; }
#if defined(WINDOWS_UI)
m_hWnd->BringToTop(); m_hWnd->BringToTop();
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
} }
void CNotification::MakeWindowOnTop ( bool OnTop ) void CNotification::MakeWindowOnTop ( bool OnTop )
{ {
if (m_hWnd == NULL) { return; } if (m_hWnd == NULL) { return; }
#if defined(WINDOWS_UI)
m_hWnd->MakeWindowOnTop(OnTop); m_hWnd->MakeWindowOnTop(OnTop);
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
#endif
} }
void CNotification::ChangeFullScreen ( void ) const void CNotification::ChangeFullScreen ( void ) const
@ -298,7 +325,13 @@ void CNotification::ChangeFullScreen ( void ) const
bool CNotification::ProcessGuiMessages ( void ) const bool CNotification::ProcessGuiMessages ( void ) const
{ {
if (m_hWnd == NULL) { return false; } if (m_hWnd == NULL) { return false; }
#if defined(WINDOWS_UI)
return m_hWnd->ProcessGuiMessages(); return m_hWnd->ProcessGuiMessages();
#else
g_Notify -> BreakPoint(__FILEW__, __LINE__);
return false;
#endif
} }
void CNotification::BreakPoint ( const wchar_t * FileName, const int LineNumber ) void CNotification::BreakPoint ( const wchar_t * FileName, const int LineNumber )

View File

@ -1,16 +1,19 @@
#include "stdafx.h" #include "stdafx.h"
#include <commctrl.h>
#include <shlobj.h>
CRomBrowser::CRomBrowser (HWND & MainWindow, HWND & StatusWindow ) : CRomBrowser::CRomBrowser (HWND & MainWindow, HWND & StatusWindow ) :
m_MainWindow(MainWindow), m_MainWindow(MainWindow),
m_StatusWindow(StatusWindow), m_StatusWindow(StatusWindow),
m_ShowingRomBrowser(false),
m_RefreshThread(NULL), m_RefreshThread(NULL),
m_RomIniFile(NULL), m_RomIniFile(NULL),
m_NotesIniFile(NULL), m_NotesIniFile(NULL),
m_ExtIniFile(NULL), m_ExtIniFile(NULL),
m_ZipIniFile(NULL), m_ZipIniFile(NULL),
m_WatchThreadID(0), m_AllowSelectionLastRom(true),
m_ShowingRomBrowser(false), m_WatchThreadID(0)
m_AllowSelectionLastRom(true)
{ {
if (g_Settings) if (g_Settings)
{ {

View File

@ -208,7 +208,6 @@ public:
void ShowRomList ( void ); void ShowRomList ( void );
bool ShowingRomBrowser ( void ) { return m_ShowingRomBrowser; } bool ShowingRomBrowser ( void ) { return m_ShowingRomBrowser; }
LPCSTR CurrentedSelectedRom ( void ) { return m_SelectedRom.c_str(); } LPCSTR CurrentedSelectedRom ( void ) { return m_SelectedRom.c_str(); }
void Store7ZipInfo ( C7zip & ZipFile, int FileNo );
static void GetFieldInfo ( ROMBROWSER_FIELDS_LIST & Fields, bool UseDefault = false ); static void GetFieldInfo ( ROMBROWSER_FIELDS_LIST & Fields, bool UseDefault = false );
}; };

View File

@ -1,4 +1,6 @@
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Config.h" #include "Settings Config.h"
#include "Settings/Settings Page.h" #include "Settings/Settings Page.h"
#include "Settings/SettingType/SettingsType-Application.h" #include "Settings/SettingType/SettingsType-Application.h"
@ -339,4 +341,4 @@ void CSettingConfig::BoldChangedPages ( HTREEITEM hItem )
::EnableWindow(GetDlgItem(IDC_RESET_ALL), true); ::EnableWindow(GetDlgItem(IDC_RESET_ALL), true);
} }
} }
#endif

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <commctrl.h>
class CConfigSettingSection; class CConfigSettingSection;
class CSettingsPage; class CSettingsPage;

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
CAdvancedOptionsPage::CAdvancedOptionsPage (HWND hParent, const RECT & rcDispay ) CAdvancedOptionsPage::CAdvancedOptionsPage (HWND hParent, const RECT & rcDispay )
@ -70,3 +72,4 @@ void CAdvancedOptionsPage::ResetPage()
{ {
CSettingsPageImpl<CAdvancedOptionsPage>::ResetPage(); CSettingsPageImpl<CAdvancedOptionsPage>::ResetPage();
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
COptionsDirectoriesPage::COptionsDirectoriesPage (HWND hParent, const RECT & rcDispay ) : COptionsDirectoriesPage::COptionsDirectoriesPage (HWND hParent, const RECT & rcDispay ) :
@ -351,3 +353,4 @@ void COptionsDirectoriesPage::ResetPage()
SendMessage(GetParent(),PSM_CHANGED,(WPARAM)m_hWnd,0); SendMessage(GetParent(),PSM_CHANGED,(WPARAM)m_hWnd,0);
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
#include "Settings Page - Game - General.h" #include "Settings Page - Game - General.h"
@ -113,3 +115,4 @@ void CGameGeneralPage::ResetPage()
{ {
CSettingsPageImpl<CGameGeneralPage>::ResetPage(); CSettingsPageImpl<CGameGeneralPage>::ResetPage();
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
#include "Settings Page - Game - Plugin.h" #include "Settings Page - Game - Plugin.h"
@ -345,3 +347,4 @@ void CGamePluginPage::HleAudioChanged ( UINT /*Code*/, int id, HWND /*ctl*/ )
break; break;
} }
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
#include "Settings Page - Game - Recompiler.h" #include "Settings Page - Game - Recompiler.h"
@ -94,3 +96,4 @@ void CGameRecompilePage::ResetPage()
{ {
CSettingsPageImpl<CGameRecompilePage>::ResetPage(); CSettingsPageImpl<CGameRecompilePage>::ResetPage();
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
#include "Settings Page - Game - Status.h" #include "Settings Page - Game - Status.h"
@ -70,3 +72,4 @@ void CGameStatusPage::ResetPage()
{ {
CSettingsPageImpl<CGameStatusPage>::ResetPage(); CSettingsPageImpl<CGameStatusPage>::ResetPage();
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
COptionsGameBrowserPage::COptionsGameBrowserPage (HWND hParent, const RECT & rcDispay ) : COptionsGameBrowserPage::COptionsGameBrowserPage (HWND hParent, const RECT & rcDispay ) :
@ -253,3 +255,4 @@ void COptionsGameBrowserPage::ResetPage()
} }
CSettingsPageImpl<COptionsGameBrowserPage>::ResetPage(); CSettingsPageImpl<COptionsGameBrowserPage>::ResetPage();
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
COptionsShortCutsPage::COptionsShortCutsPage (HWND hParent, const RECT & rcDispay ) : COptionsShortCutsPage::COptionsShortCutsPage (HWND hParent, const RECT & rcDispay ) :
@ -378,3 +380,4 @@ void COptionsShortCutsPage::ResetPage()
m_CurrentKeys.ResetContent(); m_CurrentKeys.ResetContent();
CSettingsPageImpl<COptionsShortCutsPage>::ResetPage(); CSettingsPageImpl<COptionsShortCutsPage>::ResetPage();
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
CGeneralOptionsPage::CGeneralOptionsPage(CSettingConfig * SettingsConfig, HWND hParent, const RECT & rcDispay ) : CGeneralOptionsPage::CGeneralOptionsPage(CSettingConfig * SettingsConfig, HWND hParent, const RECT & rcDispay ) :
@ -75,3 +77,4 @@ void CGeneralOptionsPage::OnBasicMode ( UINT Code, int id, HWND ctl )
CheckBoxChanged(Code,id,ctl); CheckBoxChanged(Code,id,ctl);
m_SettingsConfig->UpdateAdvanced((int)::SendMessage(ctl, BM_GETCHECK, 0, 0) == 0); m_SettingsConfig->UpdateAdvanced((int)::SendMessage(ctl, BM_GETCHECK, 0, 0) == 0);
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
COptionPluginPage::COptionPluginPage (HWND hParent, const RECT & rcDispay ) COptionPluginPage::COptionPluginPage (HWND hParent, const RECT & rcDispay )
@ -331,3 +333,4 @@ void COptionPluginPage::HleAudioChanged ( UINT /*Code*/, int id, HWND /*ctl*/ )
break; break;
} }
} }
#endif

View File

@ -9,6 +9,8 @@
* * * *
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
CConfigSettingSection::CConfigSettingSection( LPCWSTR PageTitle ) : CConfigSettingSection::CConfigSettingSection( LPCWSTR PageTitle ) :
@ -39,3 +41,4 @@ CSettingsPage * CConfigSettingSection::GetPage ( int PageNo )
} }
return m_Pages[PageNo]; return m_Pages[PageNo];
} }
#endif

View File

@ -10,6 +10,8 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <prsht.h>
class CSettingsPage class CSettingsPage
{ {
public: public:

View File

@ -19,14 +19,14 @@ class CModifiedComboBoxT :
public: public:
// Constructors // Constructors
CModifiedComboBoxT(TParam defaultValue, HWND hWnd = NULL, bool AllwaysSelected = true) : CModifiedComboBoxT(TParam defaultValue, HWND hWnd = NULL, bool AllwaysSelected = true) :
CComboBox(hWnd), CComboBox(hWnd),
m_defaultValue(defaultValue),
m_AllwaysSelected(AllwaysSelected),
m_Changed(false), m_Changed(false),
m_Reset(false), m_Reset(false),
m_defaultValue(defaultValue),
m_BoldFont(NULL), m_BoldFont(NULL),
m_OriginalFont(NULL), m_OriginalFont(NULL),
m_TextField(NULL) m_TextField(NULL),
m_AllwaysSelected(AllwaysSelected)
{ {
} }

View File

@ -10,6 +10,7 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
CModifiedEditBox::CModifiedEditBox(bool bString /* = true */, HWND hWnd /* = NULL */) : CModifiedEditBox::CModifiedEditBox(bool bString /* = true */, HWND hWnd /* = NULL */) :
CEdit(hWnd), CEdit(hWnd),
m_Changed(false), m_Changed(false),
@ -103,3 +104,4 @@ void CModifiedEditBox::SetTextField (HWND hWnd)
::SendMessage(m_TextField,WM_SETFONT,(WPARAM)m_BoldFont,0); ::SendMessage(m_TextField,WM_SETFONT,(WPARAM)m_BoldFont,0);
} }
} }
#endif

View File

@ -10,6 +10,7 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
BOOL CPartialGroupBox::Attach(HWND hWnd) BOOL CPartialGroupBox::Attach(HWND hWnd)
{ {
ATLASSUME(m_hWnd == NULL); ATLASSUME(m_hWnd == NULL);
@ -118,5 +119,5 @@ void CPartialGroupBox::OnPaint(HDC /*hDC*/)
dc.DrawTextW(grptext,-1,fontrect,DT_SINGLELINE|DT_LEFT); dc.DrawTextW(grptext,-1,fontrect,DT_SINGLELINE|DT_LEFT);
} }
} }
#endif

View File

@ -14,7 +14,7 @@
#define VERSION_MAJOR 2 #define VERSION_MAJOR 2
#define VERSION_MINOR 2 #define VERSION_MINOR 2
#define VERSION_REVISION 0 #define VERSION_REVISION 0
#define VERSION_BUILD 3 #define VERSION_BUILD 9999
#define VER_FILE_DESCRIPTION_STR "Project 64" #define VER_FILE_DESCRIPTION_STR "Project 64"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD

View File

@ -22,7 +22,7 @@ void InitializeLog ( void)
{ {
LogFilePath.CreateDirectory(); LogFilePath.CreateDirectory();
} }
LogFilePath.SetNameExtension(_T("Project64.log")); LogFilePath.SetNameExtension("Project64.log");
LogFile = new CTraceFileLog(LogFilePath, g_Settings->LoadDword(Debugger_AppLogFlush) != 0, Log_New,500); LogFile = new CTraceFileLog(LogFilePath, g_Settings->LoadDword(Debugger_AppLogFlush) != 0, Log_New,500);
#ifdef VALIDATE_DEBUG #ifdef VALIDATE_DEBUG
@ -97,7 +97,7 @@ void InitializeLog ( void)
void FixDirectories ( void ) void FixDirectories ( void )
{ {
CPath Directory(CPath::MODULE_DIRECTORY); CPath Directory(CPath::MODULE_DIRECTORY);
Directory.AppendDirectory(_T("Config")); Directory.AppendDirectory("Config");
if (!Directory.DirectoryExists()) Directory.CreateDirectory(); if (!Directory.DirectoryExists()) Directory.CreateDirectory();
Directory.UpDirectory(); Directory.UpDirectory();
@ -178,6 +178,22 @@ const char * AppName ( void )
return Name.c_str(); return Name.c_str();
} }
#ifndef WINDOWS_UI
int main(int argc, char* argv[])
{
while (argc > 0)
{
puts(argv[--argc]);
}
putchar('\n');
fprintf(
stderr,
"Cross-platform (graphical/terminal?) UI not yet implemented.\n"
);
return 0;
}
#else
int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /*lpszArgs*/, int /*nWinMode*/) int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /*lpszArgs*/, int /*nWinMode*/)
{ {
FixDirectories(); FixDirectories();
@ -280,3 +296,4 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
CloseTrace(); CloseTrace();
return true; return true;
} }
#endif

View File

@ -923,7 +923,7 @@ void RSP_Vector_VABS (void) {
if (RSP_Vect[RSPOpC.rd].HW[el] > 0) { if (RSP_Vect[RSPOpC.rd].HW[el] > 0) {
result.HW[el] = RSP_Vect[RSPOpC.rt].UHW[del]; result.HW[el] = RSP_Vect[RSPOpC.rt].UHW[del];
} else if (RSP_Vect[RSPOpC.rd].HW[el] < 0) { } else if (RSP_Vect[RSPOpC.rd].HW[el] < 0) {
if (RSP_Vect[RSPOpC.rt].UHW[EleSpec[RSPOpC.rs].B[el]] == 0x8000) { if (RSP_Vect[RSPOpC.rt].UHW[del] == 0x8000) {
result.HW[el] = 0x7FFF; result.HW[el] = 0x7FFF;
} else { } else {
result.HW[el] = RSP_Vect[RSPOpC.rt].HW[del] * -1; result.HW[el] = RSP_Vect[RSPOpC.rt].HW[del] * -1;

View File

@ -26,6 +26,8 @@
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include "opcode.h" #include "opcode.h"
#include "RSP.h" #include "RSP.h"
#include "CPU.h" #include "CPU.h"
@ -194,9 +196,23 @@ void DumpRSPCode (void)
SetFilePointer(hLogFile,0,NULL,FILE_BEGIN); SetFilePointer(hLogFile,0,NULL,FILE_BEGIN);
for (location = 0; location < 0x1000; location += 4) { for (location = 0; location < 0x1000; location += 4) {
unsigned int characters_to_write;
int characters_converted;
RSP_LW_IMEM(location, &OpCode); RSP_LW_IMEM(location, &OpCode);
sprintf(string," 0x%03X\t%s\r\n",location, RSPOpcodeName ( OpCode, location )); characters_converted = sprintf(
WriteFile( hLogFile,string,strlen(string),&dwWritten,NULL ); &string[0],
" 0x%03X\t%s\r\n",
location,
RSPOpcodeName(OpCode, location)
);
if (characters_converted < 0) {
DisplayError("Failed to sprintf IMEM from 0x%03X.", location);
break;
}
characters_to_write = (unsigned)characters_converted;
WriteFile(hLogFile, string, characters_to_write, &dwWritten, NULL);
} }
CloseHandle(hLogFile); CloseHandle(hLogFile);
} }
@ -235,9 +251,23 @@ void DumpRSPData (void)
for (location = 0; location < 0x1000; location += 4) for (location = 0; location < 0x1000; location += 4)
{ {
unsigned int characters_to_write;
int characters_converted;
RSP_LW_DMEM(location, &value); RSP_LW_DMEM(location, &value);
sprintf(string," 0x%03X\t0x%08X\r\n", location, value); characters_converted = sprintf(
WriteFile( hLogFile,string,strlen(string),&dwWritten,NULL ); &string[0],
" 0x%03X\t0x%08X\r\n",
location,
value
);
if (characters_converted < 0) {
DisplayError("Failed to sprintf DMEM from 0x%03X.", location);
break;
}
characters_to_write = (unsigned)characters_converted;
WriteFile(hLogFile, string, characters_to_write, &dwWritten, NULL);
} }
CloseHandle(hLogFile); CloseHandle(hLogFile);
} }
@ -245,6 +275,7 @@ void DumpRSPData (void)
void DrawRSPCommand ( LPARAM lParam ) void DrawRSPCommand ( LPARAM lParam )
{ {
char Command[150], Offset[30], Instruction[30], Arguments[40]; char Command[150], Offset[30], Instruction[30], Arguments[40];
int printed_offset, printed_instruction, printed_arguments;
LPDRAWITEMSTRUCT ditem; LPDRAWITEMSTRUCT ditem;
COLORREF oldColor = {0}; COLORREF oldColor = {0};
int ResetColor; int ResetColor;
@ -258,26 +289,31 @@ void DrawRSPCommand ( LPARAM lParam )
if (strchr(Command,'\t')) if (strchr(Command,'\t'))
{ {
p1 = strchr(Command,'\t'); p1 = strchr(Command,'\t');
sprintf(Offset,"%.*s",p1 - Command, Command); printed_offset = sprintf(Offset, "%.*s", p1 - Command, Command);
p1++; p1++;
if (strchr(p1,'\t')) if (strchr(p1,'\t'))
{ {
p2 = strchr(p1,'\t'); p2 = strchr(p1,'\t');
sprintf(Instruction,"%.*s",p2 - p1, p1); printed_instruction = sprintf(Instruction, "%.*s", p2 - p1, p1);
sprintf(Arguments,"%s",p2 + 1); printed_arguments = sprintf(Arguments, "%s", p2 + 1);
} }
else else
{ {
sprintf(Instruction,"%s",p1); printed_instruction = sprintf(Instruction, "%s", p1);
sprintf(Arguments,"\0"); printed_arguments = sprintf(Arguments, "\0");
} }
sprintf(Command,"\0"); Command[0] = '\0';
} }
else else
{ {
sprintf(Offset,"\0"); printed_offset = sprintf(Offset, "\0");
sprintf(Instruction,"\0"); printed_instruction = sprintf(Instruction, "\0");
sprintf(Arguments,"\0"); printed_arguments = sprintf(Arguments, "\0");
}
if (printed_offset < 0 || printed_instruction < 0 || printed_arguments < 0)
{
DisplayError("Failed to sprintf from item %u.", ditem -> itemID);
} }
if (*PrgCount == RSPCommandLine[ditem->itemID].Location) if (*PrgCount == RSPCommandLine[ditem->itemID].Location)
@ -308,23 +344,43 @@ void DrawRSPCommand ( LPARAM lParam )
FillRect( ditem->hDC, &ditem->rcItem,hBrush); FillRect( ditem->hDC, &ditem->rcItem,hBrush);
SetBkMode( ditem->hDC, TRANSPARENT ); SetBkMode( ditem->hDC, TRANSPARENT );
if (strlen (Command) == 0 ) if (Command[0] == '\0')
{ {
SetRect(&TextRect,ditem->rcItem.left,ditem->rcItem.top, ditem->rcItem.left + 83, SetRect(&TextRect,ditem->rcItem.left,ditem->rcItem.top, ditem->rcItem.left + 83,
ditem->rcItem.bottom); ditem->rcItem.bottom);
DrawText(ditem->hDC,Offset,strlen(Offset), &TextRect,DT_SINGLELINE | DT_VCENTER); DrawText(
ditem->hDC,
&Offset[0], printed_offset,
&TextRect,
DT_SINGLELINE | DT_VCENTER
);
SetRect(&TextRect,ditem->rcItem.left + 83,ditem->rcItem.top, ditem->rcItem.left + 165, SetRect(&TextRect,ditem->rcItem.left + 83,ditem->rcItem.top, ditem->rcItem.left + 165,
ditem->rcItem.bottom); ditem->rcItem.bottom);
DrawText(ditem->hDC,Instruction,strlen(Instruction), &TextRect,DT_SINGLELINE | DT_VCENTER); DrawText(
ditem->hDC,
&Instruction[0], printed_instruction,
&TextRect,
DT_SINGLELINE | DT_VCENTER
);
SetRect(&TextRect,ditem->rcItem.left + 165,ditem->rcItem.top, ditem->rcItem.right, SetRect(&TextRect,ditem->rcItem.left + 165,ditem->rcItem.top, ditem->rcItem.right,
ditem->rcItem.bottom); ditem->rcItem.bottom);
DrawText(ditem->hDC,Arguments,strlen(Arguments), &TextRect,DT_SINGLELINE | DT_VCENTER); DrawText(
ditem->hDC,
&Arguments[0], printed_arguments,
&TextRect,
DT_SINGLELINE | DT_VCENTER
);
} }
else else
{ {
DrawText(ditem->hDC,Command,strlen(Command), &ditem->rcItem,DT_SINGLELINE | DT_VCENTER); DrawText(
ditem->hDC,
&Command[0], (signed int)strlen(Command),
&ditem->rcItem,
DT_SINGLELINE | DT_VCENTER
);
} }
if (ResetColor == TRUE) { if (ResetColor == TRUE) {
@ -468,8 +524,10 @@ LRESULT CALLBACK RSP_Commands_Proc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
case IDC_LIST: case IDC_LIST:
if (HIWORD(wParam) == LBN_DBLCLK ) if (HIWORD(wParam) == LBN_DBLCLK )
{ {
DWORD Location, Selected; LRESULT Selected;
Selected = SendMessage(hList,LB_GETCURSEL,(WPARAM)0, (LPARAM)0); DWORD Location;
Selected = SendMessage(hList, LB_GETCURSEL, 0, 0);
Location = RSPCommandLine[Selected].Location; Location = RSPCommandLine[Selected].Location;
if (Location != (DWORD)-1) if (Location != (DWORD)-1)
{ {
@ -1090,11 +1148,12 @@ char * RSPLc2Name ( DWORD OpCode, DWORD PC )
{ {
sprintf( sprintf(
CommandName, CommandName,
"%s\t$v%d[%d], 0x%04X(%s)", "%s\t$v%d[%d], %c0x%03X(%s)",
mnemonics_lwc2[command.rd], mnemonics_lwc2[command.rd],
command.rt, command.rt,
command.del, command.del,
command.voffset, (command.voffset < 0) ? '-' : '+',
abs(command.voffset),
GPR_Name(command.base) GPR_Name(command.base)
); );
} }
@ -1123,11 +1182,12 @@ char * RSPSc2Name ( DWORD OpCode, DWORD PC )
{ {
sprintf( sprintf(
CommandName, CommandName,
"%s\t$v%d[%d], 0x%04X(%s)", "%s\t$v%d[%d], %c0x%03X(%s)",
mnemonics_swc2[command.rd], mnemonics_swc2[command.rd],
command.rt, command.rt,
command.del, command.del,
command.voffset, (command.voffset < 0) ? '-' : '+',
abs(command.voffset),
GPR_Name(command.base) GPR_Name(command.base)
); );
} }
@ -1224,10 +1284,11 @@ char * RSPOpcodeName ( DWORD OpCode, DWORD PC )
case RSP_SB: case RSP_SB:
case RSP_SH: case RSP_SH:
case RSP_SW: case RSP_SW:
sprintf(CommandName, "%s\t%s, 0x%04X(%s)", sprintf(CommandName, "%s\t%s, %c0x%04X(%s)",
mnemonics_primary[command.op], mnemonics_primary[command.op],
GPR_Name(command.rt), GPR_Name(command.rt),
command.offset, ((int16_t)command.offset < 0) ? '-' : '+',
abs((int16_t)command.offset),
GPR_Name(command.base) GPR_Name(command.base)
); );
break; break;

View File

@ -41,6 +41,7 @@
#pragma warning(disable : 4152) // nonstandard extension, function/data pointer conversion in expression #pragma warning(disable : 4152) // nonstandard extension, function/data pointer conversion in expression
extern BOOL AudioHle, GraphicsHle;
UWORD32 Recp, RecpResult, SQroot, SQrootResult; UWORD32 Recp, RecpResult, SQroot, SQrootResult;
DWORD ESP_RegSave = 0, EBP_RegSave = 0; DWORD ESP_RegSave = 0, EBP_RegSave = 0;
DWORD BranchCompare = 0; DWORD BranchCompare = 0;
@ -133,13 +134,17 @@ void Cheat_r4300iOpcodeNoMessage(p_func FunctAddress, char * FunctName) {
void x86_SetBranch8b(void * JumpByte, void * Destination) { void x86_SetBranch8b(void * JumpByte, void * Destination) {
/* calculate 32-bit relative offset */ /* calculate 32-bit relative offset */
signed int n = (BYTE*)Destination - ((BYTE*)JumpByte + 1); size_t n = (BYTE*)Destination - ((BYTE*)JumpByte + 1);
SSIZE_T signed_n = (SSIZE_T)n;
/* check limits, no pun intended */ /* check limits, no pun intended */
if (n > 0x80 || n < -0x7F) { if (signed_n > +128 || signed_n < -127) {
CompilerWarning("FATAL: Jump out of 8b range %i (PC = %04X)", n, CompilePC); CompilerWarning(
} else "FATAL: Jump out of 8b range %i (PC = %04X)", n, CompilePC
*(BYTE*)(JumpByte) = (BYTE)n; );
} else {
*(uint8_t *)(JumpByte) = (uint8_t)(n & 0xFF);
}
} }
void x86_SetBranch32b(void * JumpByte, void * Destination) { void x86_SetBranch32b(void * JumpByte, void * Destination) {
@ -444,7 +449,9 @@ void Compile_ADDI ( void ) {
if (RSPOpC.rt == 0) return; if (RSPOpC.rt == 0) return;
if (RSPOpC.rt == RSPOpC.rs) { if (RSPOpC.rt == RSPOpC.rs) {
AddConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); if(Immediate != 0) {
AddConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
}
} else if (RSPOpC.rs == 0) { } else if (RSPOpC.rs == 0) {
MoveConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); MoveConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
} else if ((IsRegConst(RSPOpC.rs) & 1) != 0) { } else if ((IsRegConst(RSPOpC.rs) & 1) != 0) {
@ -470,24 +477,52 @@ void Compile_ADDIU ( void ) {
if (RSPOpC.rt == 0) return; if (RSPOpC.rt == 0) return;
if (RSPOpC.rt == RSPOpC.rs) { if (RSPOpC.rt == RSPOpC.rs) {
AddConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); if(Immediate != 0) {
AddConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
}
} else if (RSPOpC.rs == 0) { } else if (RSPOpC.rs == 0) {
MoveConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); MoveConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
} else { } else {
MoveVariableToX86reg(&RSP_GPR[RSPOpC.rs].UW, GPR_Name(RSPOpC.rs), x86_EAX); MoveVariableToX86reg(&RSP_GPR[RSPOpC.rs].UW, GPR_Name(RSPOpC.rs), x86_EAX);
AddConstToX86Reg(x86_EAX, Immediate); if(Immediate != 0) {
AddConstToX86Reg(x86_EAX, Immediate);
}
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
} }
} }
void Compile_SLTI ( void ) { void Compile_SLTI ( void ) {
#ifndef Compile_Immediates
Cheat_r4300iOpcode(RSP_Opcode_SLTI,"RSP_Opcode_SLTI"); Cheat_r4300iOpcode(RSP_Opcode_SLTI,"RSP_Opcode_SLTI");
#endif
int Immediate;
CPU_Message(" %X %s", CompilePC, RSPOpcodeName(RSPOpC.Hex, CompilePC));
if (RSPOpC.rt == 0) return;
Immediate = (short)RSPOpC.immediate;
XorX86RegToX86Reg(x86_ECX, x86_ECX);
CompConstToVariable(Immediate, &RSP_GPR[RSPOpC.rs].UW, GPR_Name(RSPOpC.rs));
Setl(x86_ECX);
MoveX86regToVariable(x86_ECX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
} }
void Compile_SLTIU ( void ) { void Compile_SLTIU ( void ) {
#ifndef Compile_Immediates
Cheat_r4300iOpcode(RSP_Opcode_SLTIU,"RSP_Opcode_SLTIU"); Cheat_r4300iOpcode(RSP_Opcode_SLTIU,"RSP_Opcode_SLTIU");
#endif
int Immediate;
CPU_Message(" %X %s", CompilePC, RSPOpcodeName(RSPOpC.Hex, CompilePC));
if (RSPOpC.rt == 0) return;
Immediate = (short)RSPOpC.immediate;
XorX86RegToX86Reg(x86_ECX, x86_ECX);
CompConstToVariable(Immediate, &RSP_GPR[RSPOpC.rs].UW, GPR_Name(RSPOpC.rs));
Setb(x86_ECX);
MoveX86regToVariable(x86_ECX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
} }
void Compile_ANDI ( void ) { void Compile_ANDI ( void ) {
@ -590,6 +625,17 @@ void Compile_LB ( void ) {
CPU_Message(" %X %s",CompilePC,RSPOpcodeName(RSPOpC.Hex,CompilePC)); CPU_Message(" %X %s",CompilePC,RSPOpcodeName(RSPOpC.Hex,CompilePC));
if (IsRegConst(RSPOpC.base) == TRUE) {
char Address[32];
DWORD Addr = (MipsRegConst(RSPOpC.base) + Offset) ^ 3;
Addr &= 0xfff;
sprintf(Address, "Dmem + %Xh", Addr);
MoveSxVariableToX86regByte(RSPInfo.DMEM + Addr, Address, x86_EAX);
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
return;
}
MoveVariableToX86reg(&RSP_GPR[RSPOpC.base].UW, GPR_Name(RSPOpC.base), x86_EBX); MoveVariableToX86reg(&RSP_GPR[RSPOpC.base].UW, GPR_Name(RSPOpC.base), x86_EBX);
if (Offset != 0) AddConstToX86Reg(x86_EBX, Offset); if (Offset != 0) AddConstToX86Reg(x86_EBX, Offset);
XorConstToX86Reg(x86_EBX, 3); XorConstToX86Reg(x86_EBX, 3);
@ -614,8 +660,15 @@ void Compile_LH ( void ) {
Addr &= 0xfff; Addr &= 0xfff;
if ((Addr & 1) != 0) { if ((Addr & 1) != 0) {
CompilerWarning("Unaligned LH at constant address PC = %04X", CompilePC); if ((Addr & 2) == 0) {
Cheat_r4300iOpcodeNoMessage(RSP_Opcode_LH,"RSP_Opcode_LH"); CompilerWarning("Unaligned LH at constant address PC = %04X", CompilePC);
Cheat_r4300iOpcodeNoMessage(RSP_Opcode_LH,"RSP_Opcode_LH");
} else {
char Address[32];
sprintf(Address, "Dmem + %Xh", Addr);
MoveSxVariableToX86regHalf(RSPInfo.DMEM + (Addr ^ 2), Address, x86_EAX);
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
}
} else { } else {
char Address[32]; char Address[32];
sprintf(Address, "Dmem + %Xh", Addr); sprintf(Address, "Dmem + %Xh", Addr);
@ -667,9 +720,18 @@ void Compile_LW ( void ) {
if (IsRegConst(RSPOpC.base) == TRUE) { if (IsRegConst(RSPOpC.base) == TRUE) {
DWORD Addr = (MipsRegConst(RSPOpC.base) + Offset) & 0xfff; DWORD Addr = (MipsRegConst(RSPOpC.base) + Offset) & 0xfff;
if ((Addr & 3) != 0) { if ((Addr & 1) != 0) {
CompilerWarning("Unaligned LW at constant address PC = %04X", CompilePC); CompilerWarning("Unaligned LW at constant address PC = %04X", CompilePC);
Cheat_r4300iOpcodeNoMessage(RSP_Opcode_LW,"RSP_Opcode_LW"); Cheat_r4300iOpcodeNoMessage(RSP_Opcode_LW,"RSP_Opcode_LW");
} else if ((Addr & 2) != 0) {
char Address[32];
sprintf(Address, "Dmem + %Xh", Addr - 2);
MoveVariableToX86regHalf(RSPInfo.DMEM + Addr - 2, Address, x86_EAX);
sprintf(Address, "Dmem + %Xh", Addr);
MoveVariableToX86regHalf(RSPInfo.DMEM + Addr + 4, Address, x86_ECX);
MoveX86regHalfToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UHW[1], GPR_Name(RSPOpC.rt));
MoveX86regHalfToVariable(x86_ECX, &RSP_GPR[RSPOpC.rt].UHW[0], GPR_Name(RSPOpC.rt));
} else { } else {
char Address[32]; char Address[32];
sprintf(Address, "Dmem + %Xh", Addr); sprintf(Address, "Dmem + %Xh", Addr);
@ -730,6 +792,17 @@ void Compile_LBU ( void ) {
CPU_Message(" %X %s",CompilePC,RSPOpcodeName(RSPOpC.Hex,CompilePC)); CPU_Message(" %X %s",CompilePC,RSPOpcodeName(RSPOpC.Hex,CompilePC));
if (IsRegConst(RSPOpC.base) == TRUE) {
char Address[32];
DWORD Addr = (MipsRegConst(RSPOpC.base) + Offset) ^ 3;
Addr &= 0xfff;
sprintf(Address, "Dmem + %Xh", Addr);
MoveZxVariableToX86regByte(RSPInfo.DMEM + Addr, Address, x86_EAX);
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
return;
}
MoveVariableToX86reg(&RSP_GPR[RSPOpC.base].UW, GPR_Name(RSPOpC.base), x86_EBX); MoveVariableToX86reg(&RSP_GPR[RSPOpC.base].UW, GPR_Name(RSPOpC.base), x86_EBX);
XorX86RegToX86Reg(x86_EAX, x86_EAX); XorX86RegToX86Reg(x86_EAX, x86_EAX);
@ -756,8 +829,15 @@ void Compile_LHU ( void ) {
Addr &= 0xfff; Addr &= 0xfff;
if ((Addr & 1) != 0) { if ((Addr & 1) != 0) {
CompilerWarning("Unaligned LHU at constant address PC = %04X", CompilePC); if ((Addr & 2) == 0) {
Cheat_r4300iOpcodeNoMessage(RSP_Opcode_LHU,"RSP_Opcode_LHU"); CompilerWarning("Unaligned LHU at constant address PC = %04X", CompilePC);
Cheat_r4300iOpcodeNoMessage(RSP_Opcode_LHU, "RSP_Opcode_LHU");
} else {
char Address[32];
sprintf(Address, "Dmem + %Xh", Addr);
MoveZxVariableToX86regHalf(RSPInfo.DMEM + (Addr ^ 2), Address, x86_ECX);
MoveX86regToVariable(x86_ECX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
}
return; return;
} else { } else {
char Address[32]; char Address[32];
@ -1571,9 +1651,14 @@ void Compile_Cop0_MF ( void ) {
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
break; break;
case 4: case 4:
case 7: MoveVariableToX86reg(&RSP_MfStatusCount, "RSP_MfStatusCount", x86_ECX);
MoveConstToVariable(RSPOpC.Hex, &RSPOpC.Hex, "RSPOpC.Hex" ); MoveVariableToX86reg(RSPInfo.SP_STATUS_REG, "SP_STATUS_REG", x86_EAX);
Call_Direct(RSP_Cop0_MF,"RSP_Cop0_MF"); CompConstToX86reg(x86_ECX, 10);
JbLabel8("label", 10);
MoveConstToVariable(0, &RSP_Running, "RSP_Running");
IncX86reg(x86_ECX);
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
MoveX86regToVariable(x86_ECX, &RSP_MfStatusCount, "RSP_MfStatusCount");
if (NextInstruction == NORMAL) if (NextInstruction == NORMAL)
{ {
MoveConstToVariable(CompilePC + 4,PrgCount,"RSP PC"); MoveConstToVariable(CompilePC + 4,PrgCount,"RSP PC");
@ -1586,6 +1671,28 @@ void Compile_Cop0_MF ( void ) {
BreakPoint(); BreakPoint();
} }
break; break;
case 7:
if (AudioHle || GraphicsHle)
{
MoveConstToVariable(0, &RSP_GPR[RSPOpC.rt].W, GPR_Name(RSPOpC.rt));
} else {
MoveVariableToX86reg(RSPInfo.SP_SEMAPHORE_REG, "SP_SEMAPHORE_REG", x86_EAX);
MoveConstToVariable(0, &RSP_Running, "RSP_Running");
MoveConstToVariable(1, RSPInfo.SP_SEMAPHORE_REG, "SP_SEMAPHORE_REG");
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].W, GPR_Name(RSPOpC.rt));
if (NextInstruction == NORMAL)
{
MoveConstToVariable(CompilePC + 4, PrgCount, "RSP PC");
Ret();
NextInstruction = FINISH_SUB_BLOCK;
} else if (NextInstruction == DELAY_SLOT) {
NextInstruction = DELAY_SLOT_EXIT;
} else {
CompilerWarning("MF error\nWeird Delay Slot.\n\nNextInstruction = %X\nEmulation will now stop", NextInstruction);
BreakPoint();
}
}
break;
case 8: case 8:
MoveVariableToX86reg(RSPInfo.DPC_START_REG, "DPC_START_REG", x86_EAX); MoveVariableToX86reg(RSPInfo.DPC_START_REG, "DPC_START_REG", x86_EAX);
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));

View File

@ -30,7 +30,7 @@
#define VERSION_MAJOR 1 #define VERSION_MAJOR 1
#define VERSION_MINOR 7 #define VERSION_MINOR 7
#define VERSION_REVISION 0 #define VERSION_REVISION 0
#define VERSION_BUILD 13 #define VERSION_BUILD 9999
#define VER_FILE_DESCRIPTION_STR "RSP emulation Plugin" #define VER_FILE_DESCRIPTION_STR "RSP emulation Plugin"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD

View File

@ -1824,6 +1824,25 @@ void MoveSxX86RegPtrDispToX86RegHalf(int AddrReg, BYTE Disp, int Destination) {
PUTDST8(RecompPos, Disp); PUTDST8(RecompPos, Disp);
} }
void MoveSxVariableToX86regByte(void *Variable, char *VariableName, int x86reg) {
CPU_Message(" movsx %s, byte ptr [%s]",x86_Name(x86reg),VariableName);
PUTDST16(RecompPos, 0xbe0f);
switch (x86reg) {
case x86_EAX: PUTDST8(RecompPos,0x05); break;
case x86_EBX: PUTDST8(RecompPos,0x1D); break;
case x86_ECX: PUTDST8(RecompPos,0x0D); break;
case x86_EDX: PUTDST8(RecompPos,0x15); break;
case x86_ESI: PUTDST8(RecompPos,0x35); break;
case x86_EDI: PUTDST8(RecompPos,0x3D); break;
case x86_ESP: PUTDST8(RecompPos,0x25); break;
case x86_EBP: PUTDST8(RecompPos,0x2D); break;
default: DisplayError("MoveSxVariableToX86regByte\nUnknown x86 Register");
}
PUTDST32(RecompPos,Variable);
}
void MoveSxVariableToX86regHalf(void *Variable, char *VariableName, int x86reg) { void MoveSxVariableToX86regHalf(void *Variable, char *VariableName, int x86reg) {
CPU_Message(" movsx %s, word ptr [%s]",x86_Name(x86reg),VariableName); CPU_Message(" movsx %s, word ptr [%s]",x86_Name(x86reg),VariableName);
@ -1963,6 +1982,25 @@ void MoveZxX86RegPtrDispToX86RegHalf(int AddrReg, BYTE Disp, int Destination) {
PUTDST8(RecompPos, Disp); PUTDST8(RecompPos, Disp);
} }
void MoveZxVariableToX86regByte(void *Variable, char *VariableName, int x86reg) {
CPU_Message(" movzx %s, byte ptr [%s]",x86_Name(x86reg),VariableName);
PUTDST16(RecompPos, 0xb60f);
switch (x86reg) {
case x86_EAX: PUTDST8(RecompPos,0x05); break;
case x86_EBX: PUTDST8(RecompPos,0x1D); break;
case x86_ECX: PUTDST8(RecompPos,0x0D); break;
case x86_EDX: PUTDST8(RecompPos,0x15); break;
case x86_ESI: PUTDST8(RecompPos,0x35); break;
case x86_EDI: PUTDST8(RecompPos,0x3D); break;
case x86_ESP: PUTDST8(RecompPos,0x25); break;
case x86_EBP: PUTDST8(RecompPos,0x2D); break;
default: DisplayError("MoveZxVariableToX86regByte\nUnknown x86 Register");
}
PUTDST32(RecompPos,Variable);
}
void MoveZxVariableToX86regHalf(void *Variable, char *VariableName, int x86reg) { void MoveZxVariableToX86regHalf(void *Variable, char *VariableName, int x86reg) {
CPU_Message(" movzx %s, word ptr [%s]",x86_Name(x86reg),VariableName); CPU_Message(" movzx %s, word ptr [%s]",x86_Name(x86reg),VariableName);

View File

@ -141,11 +141,13 @@ void MoveSxX86RegHalfToX86Reg ( int Source, int Destination );
void MoveSxX86RegPtrDispToX86RegHalf( int AddrReg, BYTE Disp, int Destination ); void MoveSxX86RegPtrDispToX86RegHalf( int AddrReg, BYTE Disp, int Destination );
void MoveSxN64MemToX86regByte ( int x86reg, int AddrReg ); void MoveSxN64MemToX86regByte ( int x86reg, int AddrReg );
void MoveSxN64MemToX86regHalf ( int x86reg, int AddrReg ); void MoveSxN64MemToX86regHalf ( int x86reg, int AddrReg );
void MoveSxVariableToX86regByte ( void *Variable, char *VariableName, int x86reg );
void MoveSxVariableToX86regHalf ( void *Variable, char *VariableName, int x86reg ); void MoveSxVariableToX86regHalf ( void *Variable, char *VariableName, int x86reg );
void MoveZxX86RegHalfToX86Reg ( int Source, int Destination ); void MoveZxX86RegHalfToX86Reg ( int Source, int Destination );
void MoveZxX86RegPtrDispToX86RegHalf( int AddrReg, BYTE Disp, int Destination ); void MoveZxX86RegPtrDispToX86RegHalf( int AddrReg, BYTE Disp, int Destination );
void MoveZxN64MemToX86regByte ( int x86reg, int AddrReg ); void MoveZxN64MemToX86regByte ( int x86reg, int AddrReg );
void MoveZxN64MemToX86regHalf ( int x86reg, int AddrReg ); void MoveZxN64MemToX86regHalf ( int x86reg, int AddrReg );
void MoveZxVariableToX86regByte ( void *Variable, char *VariableName, int x86reg );
void MoveZxVariableToX86regHalf ( void *Variable, char *VariableName, int x86reg ); void MoveZxVariableToX86regHalf ( void *Variable, char *VariableName, int x86reg );
void MulX86reg ( int x86reg ); void MulX86reg ( int x86reg );
void NegateX86reg ( int x86reg ); void NegateX86reg ( int x86reg );

View File

@ -138,12 +138,18 @@ void ShowBPPanel ( void )
void RefreshBpoints ( HWND hList ) void RefreshBpoints ( HWND hList )
{ {
char Message[100]; char Message[100];
int count, location; LRESULT location;
int count;
for (count = 0; count < NoOfBpoints; count ++ ) { for (count = 0; count < NoOfBpoints; count ++ ) {
sprintf(Message," at 0x%03X (RSP)", BPoint[count].Location); sprintf(Message," at 0x%03X (RSP)", BPoint[count].Location);
location = SendMessage(hList,LB_ADDSTRING,0,(LPARAM)Message); location = SendMessage(hList, LB_ADDSTRING, 0, (LPARAM)Message);
SendMessage(hList,LB_SETITEMDATA,(WPARAM)location,(LPARAM)BPoint[count].Location); SendMessage(
hList,
LB_SETITEMDATA,
(WPARAM)location,
(LPARAM)BPoint[count].Location
);
} }
} }
@ -154,9 +160,18 @@ void RemoveAllBpoint ( void )
void RemoveBpoint ( HWND hList, int index ) void RemoveBpoint ( HWND hList, int index )
{ {
DWORD location; LRESULT response;
uint32_t location;
location = SendMessage(hList,LB_GETITEMDATA,(WPARAM)index,0); response = SendMessage(hList, LB_GETITEMDATA, (WPARAM)index, 0);
if (response < 0 || response > 0x7FFFFFFFL)
{
DisplayError(
"LB_GETITEMDATA response for %i out of DWORD range.",
index
);
}
location = (uint32_t)response;
RemoveRSPBreakPoint(location); RemoveRSPBreakPoint(location);
} }

View File

@ -0,0 +1,56 @@
@echo off
SETLOCAL
set origdir=%cd%
cd /d %~dp0..\..
set base_dir=%cd%
cd /d %origdir%
if exist "C:\Program Files\Git\usr\bin\sed.exe" ( set SED="C:\Program Files\Git\usr\bin\sed.exe")
if exist "C:\Program Files (x86)\Git\bin\sed.exe" ( set SED="C:\Program Files (x86)\Git\bin\sed.exe")
if %SED% == "" (
echo can not find sed.exe
goto :end
)
SETLOCAL EnableDelayedExpansion
FOR /F "tokens=1 delims=" %%A in ('git describe --tags --long') do SET current_tag=%%A
FOR /F "tokens=1 delims=" %%A in ('echo !current_tag! ^| !sed! "s/v[0-9]*\.[0-9]*-\([0-9]*\).*/\1/"') do SET commits_since_tag=%%A
call :setVersion %base_dir%\Source\Project64\version.h !commits_since_tag!
call :setVersion %base_dir%\Source\nragev20\version.h !commits_since_tag!
call :setVersion %base_dir%\Source\RSP\version.h !commits_since_tag!
call :setVersion %base_dir%\Source\Glide64\version.h !commits_since_tag!
ENDLOCAL
goto :eof
:setVersion
set version_file=%~1
set out_file=%~1.out
set build_no=%~2
if exist "%out_file%" del "%out_file%"
SETLOCAL DisableDelayedExpansion
FOR /F "usebackq delims=" %%a in (`"findstr /n ^^ %version_file%"`) do (
set "line=%%a"
SETLOCAL EnableDelayedExpansion
set "line=!line:9999=%build_no%!"
set "line=!line:*:=!"
echo(!line!>>!out_file!
ENDLOCAL
)
ENDLOCAL
if exist "%out_file%" (
if exist "%version_file%" (
del "%version_file%"
move "%out_file%" "%version_file%"
)
)
goto :eof

41
Source/Script/build.cmd Normal file
View File

@ -0,0 +1,41 @@
@ECHO OFF
SETLOCAL
set BuildMode=Release
if not "%1" == "" set BuildMode=%1
if "%1" == "debug" set BuildMode=Debug
if "%1" == "release" set BuildMode=Release
set MSVC-BUILDER=
set origdir=%cd%
cd /d %~dp0..\..\
set base_dir=%cd%
cd /d %origdir%
if exist "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" ( set MSVC-BUILDER="C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe")
if exist "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" ( set MSVC-BUILDER="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe")
if %MSVC-BUILDER% == "" (
echo can not find visual studio 2008
goto :end
)
:: Build Win32 version of the software
IF EXIST "%base_dir%\output.txt" del "%base_dir%\output.txt"
%MSVC-BUILDER% "%base_dir%\Project64.vs2008.sln" /build "%BuildMode%|Win32" /out "%base_dir%\output.txt"
set Result=%ERRORLEVEL%
type "%base_dir%\output.txt"
echo Done - ERRORLEVEL: %Result%
IF %Result% NEQ 0 goto :EndErr
echo Build ok
goto :end
:EndErr
ENDLOCAL
echo Build failed
exit /B 1
:End
ENDLOCAL
exit /B 0

View File

@ -1,5 +1,13 @@
@echo off @echo off
if exist "C:\Program Files\7-Zip\7z.exe" ( set zip="C:\Program Files\7-Zip\7z.exe")
if %zip% == "" (
echo can not find 7z.exe
goto :end
)
SET current_dir=%cd% SET current_dir=%cd%
cd /d %~dp0..\..\ cd /d %~dp0..\..\
SET base_dir=%cd% SET base_dir=%cd%
@ -26,3 +34,7 @@ copy "%base_dir%\Plugin\GFX\Jabo_Direct3D8.dll" "%base_dir%\Bin\Package\Plugin\G
copy "%base_dir%\Plugin\GFX\PJ64Glide64.dll" "%base_dir%\Bin\Package\Plugin\GFX" copy "%base_dir%\Plugin\GFX\PJ64Glide64.dll" "%base_dir%\Bin\Package\Plugin\GFX"
copy "%base_dir%\Plugin\Input\PJ64_NRage.dll" "%base_dir%\Bin\Package\Plugin\Input" copy "%base_dir%\Plugin\Input\PJ64_NRage.dll" "%base_dir%\Bin\Package\Plugin\Input"
copy "%base_dir%\Plugin\RSP\RSP 1.7.dll" "%base_dir%\Bin\Package\Plugin\RSP" copy "%base_dir%\Plugin\RSP\RSP 1.7.dll" "%base_dir%\Bin\Package\Plugin\RSP"
cd %base_dir%\Bin\Package
%zip% a -tzip -r ../project64 *
cd /d %current_dir%

View File

@ -0,0 +1,352 @@
' On Error Resume Next
if WScript.Arguments.Count < 3 then
WScript.StdOut.WriteLine "Missing parameters"
WScript.StdOut.WriteLine "[password] [file to upload] [BuildUrl]"
WScript.Quit
end if
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
Login IE
PostThread IE
Sub Wait(IE)
Dim complete
complete = False
For count = 0 to 1000
WScript.Sleep 100
WScript.StdOut.WriteLine count & ": IE.ReadyState: " & IE.ReadyState
if IE.ReadyState >= 4 then
WScript.StdOut.WriteLine count & ": IE.Busy: " & IE.Busy
if not IE.Busy then
WScript.StdOut.WriteLine count & ": IE.document.readyState: " & IE.document.readyState
if StrComp(IE.document.readyState, "complete", vbTextCompare) = 0 then
complete = true
exit for
end if
end if
end if
Next
if not complete then
WScript.StdOut.WriteLine "Failed to wait for IE"
WScript.Quit
end if
End Sub
Sub Navigate(IE, url)
WScript.StdOut.WriteLine "Navigating to: " & url
IE.Navigate url
Wait IE
End Sub
Sub ValidateLoggedIn(IE)
WScript.StdOut.WriteLine "validate login success"
Navigate IE, "http://forum.pj64-emu.com/"
Wait IE
Dim LoggedIn
LoggedIn = False
Set NodeList = IE.document.getElementsByTagName("a")
For Each Elem In NodeList
if lcase(Mid(Elem.href,1,39)) = "http://forum.pj64-emu.com/member.php?u=" then
if lcase(Mid(Elem.parentElement.innerHTML,1,11)) = "welcome, <a" then
if lcase(Elem.innerHTML) = "buildbot" then
WScript.StdOut.WriteLine "Found welcome message"
LoggedIn = true
exit for
end if
end if
end if
Next
if LoggedIn = false then
WScript.StdOut.WriteLine "Failed to login"
WScript.Quit
end if
End Sub
Sub Login(IE)
Set IE2 = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE2.Visible = True
WScript.StdOut.WriteLine "Login start"
Navigate IE2, "http://forum.pj64-emu.com/"
set navbar_username = IE2.document.getelementbyid("navbar_username")
set navbar_password = IE2.document.getelementbyid("navbar_password")
if navbar_username is nothing then
ValidateLoggedIn IE
exit sub
end if
navbar_username.value = "buildbot"
navbar_password.value = WScript.Arguments(0)
navbar_username.form.submit
Wait IE2
Dim FoundIt
FoundIt = False
For count = 0 to 100
WScript.StdOut.WriteLine count
Set NodeList = IE2.document.getElementsByTagName("a")
For Each Elem In NodeList
if StrComp(Elem.href, "http://forum.pj64-emu.com/", vbTextCompare) = 0 then
if StrComp(Elem.innerHTML, "Click here if your browser does not automatically redirect you.", vbTextCompare) = 0 then
FoundIt = True
Exit For
End if
end if
Next
if FoundIt = True then
Exit For
end if
Next
if FoundIt = false then
WScript.StdOut.WriteLine "Failed to find redirect"
WScript.Quit
end if
WScript.StdOut.WriteLine "found redirect"
Navigate IE, "http://forum.pj64-emu.com/"
Wait IE
WScript.StdOut.WriteLine "Quitting IE2"
IE2.Quit
ValidateLoggedIn IE
WScript.StdOut.WriteLine "Login Done"
End Sub
Sub PostThread(IE)
WScript.StdOut.WriteLine "PostThread start"
Navigate IE, "http://forum.pj64-emu.com/newthread.php?do=newthread&f=8"
Wait IE
Set NodeList = IE.document.getElementsByTagName("input")
Dim submitButton
For Each Elem In NodeList
if lcase(Elem.className) = "button" and lcase(Elem.value) = "submit new thread" then
WScript.StdOut.WriteLine "found submit button"
set submitButton = Elem
exit for
end if
Next
if submitButton is nothing then
WScript.StdOut.WriteLine "failed to find submit button"
WScript.Quit
end if
SetPostDetails IE, WScript.Arguments(2)
set manage_attachments_button = ie.document.getelementbyid("manage_attachments_button")
if not manage_attachments_button is nothing then
manage_attachments_button.click
Wait IE
WScript.Sleep 2000
UploadFile WScript.Arguments(1)
end if
submitButton.click
Wait IE
End Sub
Sub SetPostDetails(IE, BuildUrl)
WScript.StdOut.WriteLine "Posting Details"
Dim oReq
Set oReq = CreateObject("MSXML2.XMLHTTP")
oReq.open "GET", BuildUrl & "api/xml?wrapper=changes", False
oReq.send
if (oReq.status <> 200) then
WScript.StdOut.WriteLine "failed to get job details (" & BuildUrl & "api/xml?wrapper=changes)"
WScript.Quit
end if
Dim xmlDoc
Set xmlDoc = oReq.responseXML
Set objLst = xmlDoc.getElementsByTagName("freeStyleBuild")
Dim PostTitle, PostContent
For each elem in objLst
set childNodes = elem.childNodes
for each node in childNodes
if lcase(node.nodeName)="fulldisplayname" then
PostTitle = node.text
end if
if lcase(node.nodeName)="changeset" then
for each item in node.childNodes
dim commitId, comment
commitId = ""
comment = ""
for each itemDetail in item.childNodes
if lcase(itemDetail.nodeName)="commitid" then
commitId = itemDetail.text
end if
if lcase(itemDetail.nodeName)="comment" then
comment = Replace(Replace(itemDetail.text, vbLf, " "), vbCr, " ")
end if
next
if (Len(comment) > 0 and Len(commitId) > 0) then
PostContent = PostContent & "[*]" & comment & " (commit: [URL=""https://github.com/project64/project64/commit/" & commitId & """]"& commitId & "[/URL])" & vbCr
end if
next
end if
next
Next
if (Len(PostContent) > 0) then
PostContent = "Changes:"&vbCr&"[LIST=1]" & vbCr & PostContent & "[/LIST]"
else
PostContent = "No code changes"
end if
WScript.StdOut.WriteLine "PostTitle = """ & PostTitle & """"
WScript.StdOut.WriteLine "PostContent = """ & PostContent & """"
Dim SetTitle
SetTitle = False
Set NodeList = IE.document.getElementsByTagName("input")
For Each Elem In NodeList
if lcase(Elem.name) = "subject" then
Elem.value = PostTitle
SetTitle = true
exit for
end if
Next
if not SetTitle then
WScript.StdOut.WriteLine "failed to set post title"
WScript.Quit
end if
Dim SetMessage
SetMessage = False
Set NodeList = IE.document.getElementsByTagName("textarea")
For Each Elem In NodeList
WScript.StdOut.WriteLine Elem.name
if lcase(Elem.name) = "message" then
Elem.value = PostContent
SetMessage = true
exit for
end if
Next
if not SetMessage then
WScript.StdOut.WriteLine "failed to set post message"
WScript.Quit
end if
end sub
sub UploadFile(FileToUpload)
WScript.StdOut.WriteLine "UploadFile start"
On Error resume next
set IE = Nothing
Set Shell = CreateObject("Shell.Application")
For i = 0 to Shell.Windows.Count -1
set Win = Shell.Windows.Item(i)
If TypeName(win.Document) = "HTMLDocument" Then
if StrComp(win.Document.title, "Manage Attachments - Project64 Forums", vbTextCompare) = 0 then
set IE = win
end if
End If
if not IE is nothing then
exit for
end if
Next
if IE is nothing then
WScript.StdOut.WriteLine "Failed to find upload window"
exit sub
end if
WScript.StdOut.WriteLine "Found window"
Set objShell = CreateObject("Wscript.Shell")
WScript.StdOut.WriteLine "activate: " & win.Document.title & " - " & IE.name
Dim activated
For count = 0 to 100
activated = objShell.AppActivate(win.Document.title & " - " & IE.name, True)
if activated then
exit for
end if
WScript.StdOut.WriteLine count & ": " & activated
WScript.Sleep 100
Next
if not activated then
WScript.StdOut.WriteLine "Failed to activate window"
WScript.Quit
end if
Set NodeList = IE.document.getElementsByTagName("input")
For Each Elem In NodeList
if StrComp(Elem.name, "attachment[]", vbTextCompare) = 0 then
Elem.focus()
objShell.SendKeys " "
WScript.StdOut.WriteLine "Uploading: " & FileToUpload
Wscript.Sleep 1000
a=Split(FileToUpload,"\")
b=ubound(a)
For i=0 to b
objShell.SendKeys a(i)
if i < b then
objShell.SendKeys "\"
else
objShell.SendKeys "{ENTER}"
end if
Wscript.Sleep 100
Next
exit for
end if
Next
For Each Elem In NodeList
if StrComp(Elem.name, "upload", vbTextCompare) = 0 then
Elem.click
Wait IE
exit for
end if
Next
Dim UploadDone
UploadDone = False
For count = 0 to 1000
WScript.StdOut.WriteLine count & ": Waiting for upload done"
Set NodeList = ie.document.getElementsByTagName("legend")
For Each Elem In NodeList
if (len(Elem.innerHTML) > 19) and lcase(Mid(Elem.innerHTML, 1, 19)) = "current attachments" then
UploadDone = true
WScript.StdOut.WriteLine "Upload done"
exit for
end if
Next
if UploadDone then
exit for
end if
Next
if not UploadDone then
WScript.StdOut.WriteLine "Failed to upload file"
WScript.Quit
end if
Set NodeList = IE.document.getElementsByTagName("input")
For Each Elem In NodeList
if lcase(Elem.value) = "close this window" then
Elem.click
exit for
end if
Next
end sub

View File

@ -26,7 +26,7 @@
#define VERSION_MAJOR 2 #define VERSION_MAJOR 2
#define VERSION_MINOR 4 #define VERSION_MINOR 4
#define VERSION_REVISION 0 #define VERSION_REVISION 0
#define VERSION_BUILD 4 #define VERSION_BUILD 9999
#define VER_FILE_DESCRIPTION_STR "N-Rage for Project64" #define VER_FILE_DESCRIPTION_STR "N-Rage for Project64"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD

View File

@ -1,5 +1,5 @@
Plugged=1 Plugged=1
RawData=1 RawData=0
PakType=1 PakType=1
RealN64Range=1 RealN64Range=1
RapidFireEnabled=0 RapidFireEnabled=0