diff --git a/Config/Cheats/Conker's Bad Fur Day (E).cht b/Config/Cheats/Conker's Bad Fur Day (E).cht index 8c53d13ec..a27865a97 100644 --- a/Config/Cheats/Conker's Bad Fur Day (E).cht +++ b/Config/Cheats/Conker's Bad Fur Day (E).cht @@ -5,8 +5,8 @@ Cheat1="Infinite\Oxygen",800CC7A2 0001 Cheat2="Infinite\Pots of cash",810D256A FFFF Cheat3="Access All\Chapters, Scenes,& Multi-Player Characters",50002401 0000,800EA120 00FF Cheat4="Play as",800D255F 00?? -Cheat4_N=Here you can Choose Options who you want to play as,But only one Option at a time. -Cheat4_O=$01 Wessle,$03 Tedi,$04 Combat Squirrel,$05 Conker,$0B Uga,$0C Bald Caveman,$0D Caveman,$0E Mohican Caveman,$10 Neo Conker,$1B Villager,$21 Zombie,$23 Enemy Bat,$24 Conkers Bat,$25 Army Captain,$26 Tedi Boss,$27 Gregg,$28 Gregg skeleton +Cheat4_N=Here you can choose who you want to play as, but only one option at a time. Shadow will not be visible, except when playing as Conker. +Cheat4_O=$01 Wessle,$02 Wessle (Black outfit),$03 Tedi,$04 Combat Squirrel,$05 Conker,$08 Tank Vehicle (Cannot move),$09 Dinosaur (Cannot move),$0B Uga,$0C Bald Caveman,$0D Caveman,$0E Mohican Caveman,$0F Spikey Caveman,$10 Neo Conker,$11 Male Villager,$12 Male Villager (with glasses),$13 Male Villager (with moustache),$14 Male Villager (with glasses and moustache),$15 Male Villager (with hat),$16 Male Villager (with hat and glasses),$17 Male Villager (with hat and moustache),$18 Male Villager (with hat and glasses and moustache),$19 Male Villager (with cap),$1A Male Villager (with cap and glasses),$1B Male Villager (with cap and moustache),$1C Male Villager (with cap and glasses and moustache),$1D Female Villager,$1F Female Villager (with hood and glasses),$21 Male Zombie,$22 Female Zombie,$23 Enemy Bat,$24 Conker the Bat,$25 Army Captain,$26 Tedi Boss,$27 Gregg,$28 Skeleton Gregg Cheat5="Infinite\Lives Player 1",800D2564 0063 Cheat6="Infinite\Health\Player 2",800CCBE6 270F Cheat7="Infinite\Health\Player 3",800CCF12 270F @@ -33,3 +33,5 @@ Cheat19_N=Press L Button to Levitate & Let go to come back down Cheat20="Weapon Select In Multi (On Pick Up)",80180C4B 00?? Cheat20_N=Select what Weapon you would like in Multi Player and then on a Weapon Pickup you will have the weapon of your choice.to change for another just Enable the one of your choice to have that instead.(you must have a weapon already to change for the next. Cheat20_O=$01 Sword,$02 Nothing,$03 Yellow Chain-Ssaw,$04 Throwing Knives,$05 Riffle,$06 Long Pistol with Sight,$07 Rocket Launcher,$08 Buck Shot,$0A High Powred Riffle With Scope,$0C Two Automatic Machine Guns,$13 Gas Mask +Cheat21="Wait Animation Trigger",800CC9E8 00?? +Cheat21_O=$00 Default at most,$02 Wait animations disabled diff --git a/Config/Cheats/Conker's Bad Fur Day (U).cht b/Config/Cheats/Conker's Bad Fur Day (U).cht index d6970ddb4..b8ae3768a 100644 --- a/Config/Cheats/Conker's Bad Fur Day (U).cht +++ b/Config/Cheats/Conker's Bad Fur Day (U).cht @@ -5,8 +5,8 @@ Cheat1="Infinite\Oxygen",800CC382 0001 Cheat2="Infinite\Pots of cash",810D214A FFFF Cheat3="Access All\Chapters, Scenes,& Multi-Player Characters",50000401 0000,800E9D01 00FF Cheat4="Play as Option 1",800D213F 00?? -Cheat4_N=Here you can Choose Options who you want to play as,But only one Option at a time. -Cheat4_O=$01 Wessle,$03 Tedi,$04 Combat Squirrel,$05 Conker,$0B Uga,$0C Bald Caveman,$0D Caveman,$0E Mohican Caveman,$10 Neo Conker,$1B Villager,$21 Zombie,$23 Enemy Bat,$24 Conkers Bat,$25 Army Captain,$26 Tedi Boss,$27 Gregg,$28 Gregg skeleton +Cheat4_N=Here you can choose who you want to play as, but only one option at a time. Shadow will not be visible, except when playing as Conker. +Cheat4_O=$01 Wessle,$02 Wessle (Black outfit),$03 Tedi,$04 Combat Squirrel,$05 Conker,$08 Tank Vehicle (Cannot move),$09 Dinosaur (Cannot move),$0B Uga,$0C Bald Caveman,$0D Caveman,$0E Mohican Caveman,$0F Spikey Caveman,$10 Neo Conker,$11 Male Villager,$12 Male Villager (with glasses),$13 Male Villager (with moustache),$14 Male Villager (with glasses and moustache),$15 Male Villager (with hat),$16 Male Villager (with hat and glasses),$17 Male Villager (with hat and moustache),$18 Male Villager (with hat and glasses and moustache),$19 Male Villager (with cap),$1A Male Villager (with cap and glasses),$1B Male Villager (with cap and moustache),$1C Male Villager (with cap and glasses and moustache),$1D Female Villager,$1F Female Villager (with hood and glasses),$21 Male Zombie,$22 Female Zombie,$23 Enemy Bat,$24 Conker the Bat,$25 Army Captain,$26 Tedi Boss,$27 Gregg,$28 Skeleton Gregg Cheat5="Infinite\Lives Player 1",800D2144 0064 Cheat6="Infinite\Health\Player 2",800CC7C6 270F Cheat7="Infinite\Health\Player 3",800CCAF2 270F @@ -36,3 +36,5 @@ Cheat21_O=$3F00 Slow Conker,$3F80 Normal Conker,$3FF0 Fast Conker,$4030 Super Fa Cheat22="Weapon Select In Multi (On Pick Up)",80180873 00?? Cheat22_N=Select what Weapon you would like in Multi Player and then on a Weapon Pickup you will have the weapon of your choice.to change for another just Enable the one of your choice to have that instead.(you must have a weapon already to change for the next. Cheat22_O=$01 Sword,$02 Nothing,$03 Yellow Chain-Ssaw,$04 Throwing Knives,$05 Riffle,$06 Long Pistol with Sight,$07 Rocket Launcher,$08 Buck Shot,$0A High Powred Riffle With Scope,$0C Two Automatic Machine Guns,$13 Gas Mask +Cheat23="Wait Animation Trigger",800CC5C8 00?? +Cheat23_O=$00 Default at most,$02 Wait animations disabled diff --git a/Lang/Chinese (Simplified).pj.Lang b/Lang/Chinese (Simplified).pj.Lang index e59a0c3ab..4a31480d3 100644 --- a/Lang/Chinese (Simplified).pj.Lang +++ b/Lang/Chinese (Simplified).pj.Lang @@ -1,11 +1,11 @@ -/********************************************************************************* +/********************************************************************************* * Meta Information * *********************************************************************************/ //About DLL #1 # "简体中文" // LANGUAGE ID #2 # "山姆、EmpyreusX" // Author -#3 # "2.2" // Version -#4 # "2019 年 9 月" // Date +#3 # "3.0" // Version +#4 # "2020 年 11 月" // Date //About DLL Dialog #5 # "当前语言" @@ -31,10 +31,10 @@ #104# "停止模拟(&E)" #105# "选择 ROM 目录..." #106# "刷新 ROM 列表" -#107# "最近的 ROM" -#108# "最近的 ROM 目录" +#107# "最近使用的 ROM" +#108# "最近使用的 ROM 目录" #109# "退出(&X)" -#110# "混合打开(&C)" +#110# "同时打开(&C)" //System Menu #120# "系统(&S)" @@ -73,24 +73,25 @@ //Help Menu #180# "帮助(&H)" -#181# "关于配置文件(&I)" #182# "关于 Project64(&A)" #183# "支持论坛(&F)" -#184# "首页(&H)" +#184# "网站(&H)" +#185# "支持 Project64(&S)" +#186# "Discord(&D)" //Current Save Slot menu #190# "默认" -#191# "插槽 1" -#192# "插槽 2" -#193# "插槽 3" -#194# "插槽 4" -#195# "插槽 5" -#196# "插槽 6" -#197# "插槽 7" -#198# "插槽 8" -#199# "插槽 9" -#200# "插槽 10" -#201# "已选中插槽 (%ws)" +#191# "槽 1" +#192# "槽 2" +#193# "槽 3" +#194# "槽 4" +#195# "槽 5" +#196# "槽 6" +#197# "槽 7" +#198# "槽 8" +#199# "槽 9" +#200# "槽 10" +#201# "已选中槽 (%ws)" //Pop up Menu #210# "运行游戏" @@ -102,55 +103,55 @@ //Alternate Name to save Slot #220# "默认" -#221# "保存槽 - 1" -#222# "保存槽 - 2" -#223# "保存槽 - 3" -#224# "保存槽 - 4" -#225# "保存槽 - 5" -#226# "保存槽 - 6" -#227# "保存槽 - 7" -#228# "保存槽 - 8" -#229# "保存槽 - 9" -#230# "保存槽 - 10" +#221# "存档槽 - 1" +#222# "存档槽 - 2" +#223# "存档槽 - 3" +#224# "存档槽 - 4" +#225# "存档槽 - 5" +#226# "存档槽 - 6" +#227# "存档槽 - 7" +#228# "存档槽 - 8" +#229# "存档槽 - 9" +#230# "存档槽 - 10" // Menu Descriptions #250# "打开 N64 ROM 镜像" -#251# "显示已载入的镜像的信息" +#251# "显示已载入镜像的信息" #252# "开始模拟已载入的 ROM 镜像" #253# "停止模拟已载入的 ROM 镜像" #254# "选择 ROM 目录" #255# "在 ROM 浏览器中刷新当前 ROM 列表" #256# "退出此应用程序" #257# "重新引导当前 ROM 镜像 (重新载入已更改的设置)" -#258# "暂停/继续模拟当前运行的 ROM" +#258# "暂停或继续模拟当前运行的 ROM" #259# "为当前的屏幕创建一个位图文件" -#260# "将帧率限制为 N64 的正常速度" -#261# "保存存档" -#262# "保存存档到指定文件位置" +#260# "将 FPS 限制为 N64 的正常速度" +#261# "保存当前存档" +#262# "保存当前存档到指定文件位置" #263# "载入已保存的存档" #264# "选择要载入的存档" -#265# "启用/禁用 Gameshark 作弊码" -#266# "Gameshark 按钮已被特定的作弊码所使用" +#265# "启用或禁用 GameShark 作弊码" +#266# "GameShark 按钮已被特定的作弊码所使用。" #267# "将模拟器从窗口模式切换到全屏模式" #268# "将窗口置于最顶层" #269# "更改图形插件的设置" #270# "更改音频插件的设置" #271# "更改控制器插件的设置 (如设置键位)" #272# "更改 RSP 插件的设置" -#273# "显示模拟器在不同资源上的 CPU 占用情况" +#273# "显示模拟器在不同资源上的 CPU 占用率" #274# "显示或更改此应用程序的设置" -#275# "查看程序的用户手册" -#276# "查看程序的 FAQ" +#275# "查看应用程序的手册" +#276# "查看应用程序的 FAQ" #277# "关于支持文件的作者" -#278# "关于程序和作者" +#278# "关于应用程序和作者" #279# "打开以前打开过的 ROM 镜像" #280# "将此目录作为您的 ROM 目录" #281# "让应用程序使用该语言" -#282# "选择这个即时存档位置" -#283# "运行所选择的游戏" -#284# "关于所选择游戏的信息" -#285# "编辑所选择游戏的设置" -#286# "编辑所选择游戏的作弊码" +#282# "选择该即时存档的保存位置" +#283# "运行所选游戏" +#284# "关于所选游戏的信息" +#285# "编辑所选游戏的设置" +#286# "编辑所选游戏的作弊码" /********************************************************************************* * ROM Browser * @@ -161,9 +162,9 @@ #302# "正确的名称" #303# "状态" #304# "ROM 容量" -#305# "说明 (核心)" -#306# "说明 (默认插件)" -#307# "说明 (用户)" +#305# "注释 (核心)" +#306# "注释 (默认插件)" +#307# "注释 (用户)" #308# "卡带 ID" #309# "厂商" #310# "国家" @@ -171,7 +172,7 @@ #312# "CRC1" #313# "CRC2" #314# "CIC 芯片" -#315# "发售日期" +#315# "发行日期" #316# "流派" #317# "游戏人数" #318# "强制力回馈" @@ -194,11 +195,11 @@ #401# "插件" #402# "目录" #403# "选项" -#404# "ROM 状态显示" +#404# "ROM 选择" #405# "高级" #406# "常规设置" -#407# "文件关联" -#408# "ROM 说明" +#407# "外壳集成" +#408# "注释" #409# "键盘快捷键" #410# "状态" #411# "重编译器" @@ -207,10 +208,10 @@ //Plugin Dialog #420# "关于" -#421# " RSP (实时信号处理器) 插件: " -#422# " 视频 (图形) 插件: " -#423# " 音频 (声音) 插件: " -#424# " 输入 (控制器) 插件: " +#421# "RSP (实时信号处理器) 插件: " +#422# "视频 (图形) 插件: " +#423# "音频 (声音) 插件: " +#424# "输入 (控制器) 插件: " #425# "图形 HLE" #426# "音频 HLE" #427# "** 使用系统插件 **" @@ -236,8 +237,8 @@ #462# "隐藏高级设置" #463# "记住已选择的作弊码" #464# "在 ROM 运行时关闭屏幕保护程序" -#465# "显示帧速率" -#466# "帧速率回显: " +#465# "显示速度" +#466# "速度回显: " #467# "检查 Project64 是否已经运行" #468# "独立游戏存档目录" #469# "日版零售 64DD IPL ROM 路径: " @@ -261,11 +262,11 @@ #492# "自动刷新浏览器" //Advanced Options -#500# "大部分选项在打开新 ROM 或重置当前 ROM 之前不会生效。" +#500# "大部分选项在打开新 ROM 或重置当前 ROM 后才会生效。" #501# "默认内核" #502# "CPU 内核类型: " -#503# "自我修改方式: " -#504# "默认存档容量: " +#503# "自修改方式: " +#504# "默认内存容量: " #505# "高级块连接" #506# "打开 ROM 后开始模拟" #507# "总是从 RDB 中覆盖默认设置" @@ -293,7 +294,7 @@ #532# "RSP 音频信号" #533# "固定音频计时" #534# "函数查询方式: " -#535# "自定义自我修改方式" +#535# "自定义自修改方式" #536# "使用同步音频" #537# "每字节 AI 计数" #538# "32 位引擎" @@ -338,8 +339,8 @@ //ROM Notes #660# "ROM 状态: " -#661# "内核说明: " -#662# "插件说明: " +#661# "内核注释: " +#662# "插件注释: " // Accelerator Selector #680# "CPU 状态: " @@ -400,7 +401,7 @@ //Cheat List #1000# "作弊码" #1001# "作弊码: " -#1002# "说明: " +#1002# "注释: " #1003# "全部标记" #1004# "取消全部标记" @@ -410,11 +411,11 @@ #1007# "代码: " #1008# "插入" #1009# "清除" -#1010# "作弊码说明: " +#1010# "作弊码注释: " #1011# "添加到数据库" //Code extension -#1012# "代码范围" +#1012# "代码扩展" #1013# "请选择一个要使用的值: " #1014# "确定" #1015# "取消" @@ -422,10 +423,10 @@ //Digital Value #1016# "数量" #1017# "请选择一个值: " -#1018# "数值(&V)" +#1018# "值(&V)" #1019# "从" #1020# "到" -#1021# "说明(&N): " +#1021# "注释(&N): " #1022# "添加作弊码" #1023# "新建作弊码" #1024# "<地址> <值>" @@ -449,29 +450,32 @@ #1102# "文件菜单" #1103# "系统菜单" #1104# "选项" -#1105# "保存位置" +#1105# "存档槽" /********************************************************************************* * Support Window * *********************************************************************************/ #1200# "支持 Project64" -#1201# "Project64 是基于 Microsoft Windows 的 PC 下的一个用于模拟 Nintendo64 视频游戏系统的软件包。本软件可以让您像使用原始硬件系统一样运行真实的 N64 软件。\n\n如果您喜欢 Project64 并从中获益,请支持 Project64 作为感谢,或者您对本软件能够持续完善的期望。\n\如果您已经支持 Project64: " -#1202# "输入通知代码" +#1201# "Project64 是一个免费的开源 Nintendo64 模拟器。本软件可以让您如使用原始硬件系统一般运行真实的 N64 软件。\n\n很抱歉此提示给您带来不便,但系统要求您等待几秒钟来享受这数百小时的工作结果。\n\n如果您能够并愿意支持 Project64,或者您已从中获益,又或者您希望删除此提示,那么请支持 Project64 以表示感谢。\n\n如果您已经支持 Project64: " +#1202# "输入/请求通知代码" #1203# "支持 Project64" #1204# "继续" #1205# "请输入支持代码" -#1206# "支持代码不正确" +#1206# "验证代码失败。\n\n请确认代码与电子邮件中对应本计算机的代码相匹配。" #1207# "感谢" -#1208# "输入代码" -#1209# "请输入电子邮件中的代码" +#1208# "请输入支持代码" +#1209# "请输入在电子邮件中收到的代码。\n\n此电子邮件将被发送到用于支持 project64 的电子邮件地址。\n\n请注意,此代码仅适用于独立一台计算机。该计算机 ID 为: " #1210# "确定" #1211# "取消" +#1212# "请求代码" +#1213# "代码已发送到您的电子邮件" +#1214# "发送代码失败,请确认它是您所支持的电子邮件。" /********************************************************************************* * Messages * *********************************************************************************/ #2000# "*** CPU 已暂停 ***" -#2001# "CPU 继续运行" +#2001# "CPU 已恢复运行" #2002# "进入了一个死循环无法停止。\n模拟器将停止运行。\n\n请检查 ROM 及其设置。" #2003# "内存分配失败" #2004# "默认或所选择的视频插件不存在或无效。\n\n您需要打开设置并选择一个视频(图形)插件。\n请确认在您的插件目录内至少有一个兼容的插件文件。" @@ -505,9 +509,9 @@ #2032# "无法读档" #2033# "已读档" #2034# "已存档到" -#2035# "即时存档" +#2035# "存档槽" #2036# "字节交换镜像" -#2037# "关闭 N64 镜像" +#2037# "正在选择 N64 镜像" #2038# "已载入" #2039# "正在载入镜像" #2040# "无法打开 ROM ,因为插件没有被正确初始化。" @@ -523,7 +527,7 @@ #2050# "ROM 已载入。正在等待模拟启动。" #2051# "Project64 测试版仅向会员提供。\n\n如果您在 www.pj64-emu.com 上拥有账户, 您不应该看到此错误!!\n请在网站上与我们联系。" #2052# "程序错误" -#2053# "无法在 7z 文件中查询文件名" +#2053# "无法在 7z 文件中查找文件名" #2054# "图形 LLE 模拟" #2055# "图形 LLE 并非用于一般用途!!!\n我们建议您仅将此用于测试而不是用于运行游戏。\n\n确定更改为图形 LLE 吗?" #2056# "音频 HLE 模拟" @@ -569,7 +573,7 @@ #3106# "游戏速度" #3107# "当前存档..." #3108# "自动" -#3109# "插槽" +#3109# "槽" #3110# "重置" #3111# "调试选项" #3112# "重置运作计时" diff --git a/Lang/Turkish.pj.Lang b/Lang/Turkish.pj.Lang index 6df54487b..db021282d 100644 --- a/Lang/Turkish.pj.Lang +++ b/Lang/Turkish.pj.Lang @@ -27,8 +27,8 @@ #100# "&Dosya" #101# "&ROM Aç" #102# "ROM &Bilgisi...." -#103# "Emülasyonu Başlat" -#104# "&Emülasyonu Sonlandır" +#103# "Emülatörü Başlat" +#104# "&Emülatörü Sonlandır" #105# "ROM Dizinini Seç..." #106# "ROM Listesini Yenile" #107# "Son kullanılan ROM" @@ -116,13 +116,13 @@ // Menu Descriptions #250# "Bir N64 ROM imajı aç" #251# "Yüklenen imaj hakkındaki bilgileri görüntüle" -#252# "Yüklenen ROM imajının emülasyonunu başlat" -#253# "Yüklenen ROM imajının emülasyonunu durdur" +#252# "Yüklenen ROM imajının emülatörünü başlat" +#253# "Yüklenen ROM imajının emülatörünü durdur" #254# "ROM dizinini seç" #255# "ROM listesindeki mevcut ROM'ları yenile" #256# "Bu uygulamadan çık" #257# "Geçerli ROM imajını yeniden başlat (herhangi bir ayar değişikliğini yeniden yükle)" -#258# "Şu anda çalışan ROM emülasyonunu durdur/başlat" +#258# "Şu anda çalışan ROM emülatörünü durdur/başlat" #259# "Şu anki ekranın bitmap görüntüsünü oluştur" #260# "FPS'yi N64'ün doğru hızıyla sınırlandır" #261# "Mevcut sistem durumunu kaydet" @@ -131,7 +131,7 @@ #264# "Yüklemek için kayıtlı olan bir sistem durum dosyası seç" #265# "GameShark hilelerini etkinleştir/devre dışı bırak" #266# "GameShark tuşu belirli hilelerle kullanılır." -#267# "Emülasyonu pencere modundan tam ekran moduna değiştir." +#267# "Emülatörü pencere modundan tam ekran moduna değiştir." #268# "Pencereyi diğer tüm pencerelerin üstünde tut" #269# "Grafik eklentisinin içindeki ayarları değiştir" #270# "Ses eklentisinin içindeki ayarları değiştir" @@ -231,14 +231,14 @@ #452# "Doku paketi dizini seç" //Options (general) Tab -#460# "Pencere etkin değilken emülasyonu durdur" +#460# "Pencere etkin değilken emülatörü durdur" #461# "ROM yüklenirken tam ekran moduna gir" #462# "Gelişmiş ayarları gizle" #463# "Seçilmiş hileleri hatırla" #464# "ROM çalışırken ekran koruyucuyu devre dışı bırak" #465# "Ekran hızı" #466# "Hız göstergesi:" -#467# "Project64'ün zaten çalışıyor olup olmadığını kontrol et" +#467# "Project64'ün zaten çalışır durumda olup olmadığını kontrol et" #468# "Benzersiz Oyun Kayıt Dizini" #469# "Japon 64DD IPL ROM Yolu:" #470# "Amerikan 64DD IPL ROM Yolu:" @@ -261,13 +261,13 @@ #492# "Listeleyiciyi otomatik olarak yenile" //Advanced Options -#500# "Bu değişikliklerin çoğu, yeni bir ROM açılana veya mevcut ROM yeniden başlatılıncaya kadar etkili olmaz." +#500# "Bu değişikliklerin çoğu yeni bir ROM açılana veya mevcut ROM yeniden başlatılıncaya kadar etkili olmaz." #501# "Çekirdek Varsayılanları" #502# "CPU çekirdeği stili:" #503# "Kod işleme yöntemi" #504# "Varsayılan bellek boyutu:" #505# "Gelişmiş blok bağlantısı" -#506# "ROM açıldığında emülasyonu başlat" +#506# "ROM açıldığında emülatörü başlat" #507# "RDB ayarlarıyla daima varsayılan ayarları geçersiz kıl" #508# "Kayıtlı durumları otomatik olarak sıkıştır" #509# "Hata Ayıklayıcıyı etkinleştir" @@ -455,7 +455,7 @@ * Support Window * *********************************************************************************/ #1200# "Project64'ü Destekle" -#1201# "Project64, Microsoft Windows tabanlı bir bilgisayarda Nintendo64 video oyun sistemini emüle etmek için tasarlanmış bir yazılım paketidir. Bu, gerçek N64 yazılımını, orijinal donanım sistemindeki gibi oynatmanızı sağlar.\n\nProject64'ten hoşlanıyorsanız ve onu kullanmaktan zevk alıyorsanız, lütfen project64'ü teşekkür olarak veya sürekli olarak iyileştirilme arzusuyla destekleyin.\n\nProject64'ü desteklediyseniz:" +#1201# "Project64, Microsoft Windows tabanlı bir bilgisayarda Nintendo64 video oyun sistemini emüle etmek için tasarlanmış bir yazılım paketidir. Bu, gerçek N64 yazılımını, orijinal donanım sistemindeki gibi oynatmanızı sağlar.\n\nProject64'ten hoşlanıyorsanız ve onu kullanmaktan zevk alıyorsanız, lütfen project64'ü bir teşekkür olarak veya sürekli olarak iyileştirilme arzusuyla destekleyin.\n\nProject64'ü desteklediyseniz:" #1202# "Bildirim kodunu giriniz" #1203# "Project64'ü Destekle" #1204# "Devam et" @@ -472,7 +472,7 @@ *********************************************************************************/ #2000# "*** CPU DURAKLATILDI ***" #2001# "CPU Başlatıldı" -#2002# "Program çıkış yapılamayan kalıcı bir döngüye girdi.\nEmülasyon şimdi duracak.\n\nROM'u ve ayarlarını doğrulayın." +#2002# "Program çıkış yapılamayan kalıcı bir döngüye girdi.\nEmülatör şimdi duracak.\n\nROM'u ve ayarlarını doğrulayın." #2003# "Bellek ayrılamadı" #2004# "Varsayılan veya seçilen video eklentisi eksik veya geçersiz.\n\nAyarlar'a girmeniz ve bir video (grafik) eklentisi seçmeniz gerekiyor.\nEklenti klasörünüzde en az bir tane uyumlu eklenti dosyanızın olup olmadığını kontrol edin." #2005# "Varsayılan veya seçilen ses eklentisi eksik veya geçersiz.\n\nAyarlar'a girmeniz ve bir ses eklentisi seçmeniz gerekiyor.\nEklenti klasörünüzde en az bir tane uyumlu eklenti dosyanızın olup olmadığını kontrol edin." @@ -491,7 +491,7 @@ #2018# "Bilinmeyen ülke" #2019# "Bilinmeyen CIC yongası" #2020# "Bilinmeyen dosya formatı" -#2021# "Bilinmeyen bellek işlemi\n\nEmülasyon durdu." +#2021# "Bilinmeyen bellek işlemi\n\nEmülatör durdu." #2022# "İşlenmemiş R4300i işlem kodu(opcode)" #2023# "Eşlenmemiş alandan yürütme.\n\nROM'u ve ayarlarını doğrulayın." #2024# "Bu kayıtlı durum, çalışan ROM ile eşleşmiyor gibi görünüyor.\n\nDurumlar %100 aynı ROM'lar arasında kaydedilmeli ve yüklenmelidir.\nÖzellikle BÖLGE ve SÜRÜM aynı olmalıdır.\nBu durumu yüklemek, oyunun ve/veya emülatörün çökmesine neden olabilir.\n\nYüklemeye devam etmek istediğinize emin misiniz?" @@ -500,8 +500,8 @@ #2027# "Kopya Koruma Hatası" #2028# "Bir eklentiyi değiştirmek için Project64'ün çalışan bir ROM'u yeniden başlatması gerekiyor.\nEğer oyundaki yerinizi kaybetmek istemiyorsanız Hayır cevabını verin ve öncelikle mevcut durumu kaydedin.\n\nEklentiler değiştirilip ROM yeniden başlatılsın mı?" #2029# "Eklentileri Değiştir" -#2030# "Emülasyon sona erdi" -#2031# "Emülasyon başladı" +#2030# "Emülatör sona erdi" +#2031# "Emülatör başladı" #2032# "Durum yüklenemedi" #2033# "Yüklü durum" #2034# "Kaydedilen mevcut durum" @@ -520,14 +520,14 @@ #2047# "Bu anahtarı atamak için bir menü öğesi seçmeniz gerekiyor." #2048# "Kısayol zaten başka bir menü öğesine atanmış." #2049# "Kaldırılacak kısayol seçilmedi." -#2050# "ROM yüklendi. Emülasyonun başlaması bekleniyor." -#2051# "Project64'ün beta sürümleri sadece üyeler içindir.\n\nEğer www.pj64-emu.com adresinde bir hesabınız varsa, bu hatayı görmemelisiniz!!\nLütfen siteden bize ulaşın." +#2050# "ROM yüklendi. Emülatörün başlaması bekleniyor." +#2051# "Project64'ün beta sürümleri sadece üyeler içindir.\n\nEğer www.pj64-emu.com adresinde bir hesabınız varsa bu hatayı görmemelisiniz!!\nLütfen siteden bize ulaşın." #2052# "Program Hatası" #2053# "7z dosyasında dosya adı bulunamadı" -#2054# "Grafik Düşük Seviye Emülasyon" +#2054# "Grafik Düşük Seviye Emülatör" #2055# "Grafik DSE genel kullanım için değildir!!!\nBunu sadece test yapmak için kullanmanız ve oyun oynamak için kullanmamanız önerilir.\n\nGrafik DSE'ye değiştirilsin mi?" -#2056# "Ses Yüksek Seviye Emülasyon" -#2057# "Ses YSE üçüncü taraf bir eklenti gerektirir !!!\nEğer YSE'yi destekleyen bir üçüncü taraf ses eklentisi kullanmazsanız, ses duyamazsınız.\n\nSes YSE'ye değiştirilsin mi?" +#2056# "Ses Yüksek Seviye Emülatör" +#2057# "Ses YSE üçüncü taraf bir eklenti gerektirir !!!\nEğer YSE'yi destekleyen bir üçüncü taraf ses eklentisi kullanmazsanız ses duyamazsınız.\n\nSes YSE'ye değiştirilsin mi?" #2058# "Yüklenen dosya geçerli bir 64DD IPL ROM'u gibi görünmüyor.\n\nROM'larınızı GoodN64 ile doğrulayın." #2059# "Nintendo 64DD Japon IPL ROM'u bulunamadı.\nBu, Japon 64DD imaj görüntülerini oynatmak için gerekir.\n\nLütfen Ayarlar'dan istediğiniz ROM'u seçin." #2061# "Nintendo 64DD Amerikan IPL ROM'u bulunamadı.\nBu, Amerikan 64DD imaj görüntülerini oynatmak için gerekir.\n\nLütfen Ayarlar'dan istediğiniz ROM'u seçin." @@ -563,7 +563,7 @@ #3100# "Ayarlar" #3101# "Durumu Kaydet" #3102# "Durumu Yükle" -#3103# "Emülasyonu Sonlandır" +#3103# "Emülatörü Sonlandır" #3104# "Duraklat" #3105# "Devam et" #3106# "Oyun Hızı" diff --git a/Source/Project64-core/N64System/Mips/TLBclass.cpp b/Source/Project64-core/N64System/Mips/TLBclass.cpp index 780ab9ead..763d75936 100644 --- a/Source/Project64-core/N64System/Mips/TLBclass.cpp +++ b/Source/Project64-core/N64System/Mips/TLBclass.cpp @@ -243,7 +243,7 @@ void CTLB::SetupTLB_Entry(int index, bool Random) { continue; } - if (m_FastTlb[FastIndx].PHYSSTART > 0x1FFFFFFF) + if (m_FastTlb[FastIndx].PHYSEND > 0x1FFFFFFF) { continue; } diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp b/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp index 9673c4370..60fc8dcf9 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp @@ -255,43 +255,6 @@ LRESULT CALLBACK CDebugCommandsView::HookProc(int nCode, WPARAM wParam, LPARAM l return 0; } -LRESULT CDebugCommandsView::OnOpKeyDown(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled) -{ - if (wParam == VK_UP) - { - m_SelectedAddress -= 4; - BeginOpEdit(m_SelectedAddress); - bHandled = TRUE; - } - else if (wParam == VK_DOWN) - { - m_SelectedAddress += 4; - BeginOpEdit(m_SelectedAddress); - bHandled = TRUE; - } - else if (wParam == VK_RETURN) - { - wchar_t text[256] = { 0 }; - m_OpEdit.GetWindowText(text, (sizeof(text) / sizeof(text[0])) - 1); - uint32_t op; - bool bValid = CAssembler::AssembleLine(stdstr().FromUTF16(text).c_str(), &op, m_SelectedAddress); - if (bValid) - { - m_OpEdit.SetWindowText(L""); - EditOp(m_SelectedAddress, op); - m_SelectedAddress += 4; - BeginOpEdit(m_SelectedAddress); - } - bHandled = TRUE; - } - else if (wParam == VK_ESCAPE) - { - EndOpEdit(); - bHandled = TRUE; - } - return 1; -} - void CDebugCommandsView::ClearBranchArrows() { m_BranchArrows.clear(); @@ -1286,7 +1249,14 @@ LRESULT CDebugCommandsView::OnPopupmenuViewMemory(WORD /*wNotifyCode*/, WORD /*w LRESULT CDebugCommandsView::OnPopupmenuToggleBP(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hwnd*/, BOOL& /*bHandled*/) { - m_Breakpoints->EBPToggle(m_SelectedAddress); + if (m_Breakpoints->ExecutionBPExists(m_SelectedAddress)) + { + m_Breakpoints->RemoveExecution(m_SelectedAddress); + } + else + { + m_Breakpoints->AddExecution(m_SelectedAddress); + } ShowAddress(m_StartAddress, TRUE); return FALSE; } @@ -1621,7 +1591,7 @@ BOOL CDebugCommandsView::IsOpEdited(uint32_t address) return FALSE; } -void CDebugCommandsView::EditOp(uint32_t address, uint32_t op) +void CDebugCommandsView::EditOp(uint32_t address, uint32_t op, bool bRefresh) { uint32_t currentOp; if (!m_Debugger->DebugLoad_VAddr(address, currentOp)) @@ -1641,7 +1611,10 @@ void CDebugCommandsView::EditOp(uint32_t address, uint32_t op) m_EditedOps.push_back({ address, currentOp }); } - ShowAddress(m_StartAddress, TRUE); + if (bRefresh) + { + ShowAddress(m_StartAddress, TRUE); + } } void CDebugCommandsView::RestoreOp(uint32_t address) @@ -1697,13 +1670,107 @@ void CDebugCommandsView::ToggleHistoryButtons() // Opcode editor +LRESULT CDebugCommandsView::OnOpEditKeyDown(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled) +{ + if (wParam == VK_UP) + { + m_SelectedAddress -= 4; + BeginOpEdit(m_SelectedAddress); + bHandled = TRUE; + } + else if (wParam == VK_DOWN) + { + m_SelectedAddress += 4; + BeginOpEdit(m_SelectedAddress); + bHandled = TRUE; + } + else if (wParam == VK_RETURN) + { + wchar_t text[256] = { 0 }; + m_OpEdit.GetWindowText(text, (sizeof(text) / sizeof(text[0])) - 1); + uint32_t op; + bool bValid = CAssembler::AssembleLine(stdstr().FromUTF16(text).c_str(), &op, m_SelectedAddress); + if (bValid) + { + m_OpEdit.SetWindowText(L""); + EditOp(m_SelectedAddress, op); + m_SelectedAddress += 4; + BeginOpEdit(m_SelectedAddress); + } + bHandled = TRUE; + } + else if (wParam == VK_ESCAPE) + { + EndOpEdit(); + bHandled = TRUE; + } + return 1; +} + +LRESULT CDebugCommandsView::OnOpEditChanged(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hwnd*/, BOOL& /*bHandled*/) +{ + // handle multiline input + size_t length = m_OpEdit.GetWindowTextLength(); + wchar_t* text = new wchar_t[length + 1]; + m_OpEdit.GetWindowText(text, length + 1); + + if (wcschr(text, L'\n') == NULL) + { + delete[] text; + return FALSE; + } + + EndOpEdit(); + + for (size_t i = 0; i < length; i++) + { + if (text[i] == '\r') + { + text[i] = '\n'; + } + } + + wchar_t *tokctx; + wchar_t *line = wcstok_s(text, L"\n", &tokctx); + + while (line != NULL) + { + if (wcslen(line) != 0) + { + uint32_t op; + bool bValid = CAssembler::AssembleLine(stdstr().FromUTF16(line).c_str(), &op, m_SelectedAddress); + + if (bValid) + { + EditOp(m_SelectedAddress, op, false); + m_SelectedAddress += 4; + } + else + { + ShowAddress(m_StartAddress, TRUE); + BeginOpEdit(m_SelectedAddress); + m_OpEdit.SetWindowText(line); + delete[] text; + return FALSE; + } + } + + line = wcstok_s(NULL, L"\n", &tokctx); + } + + ShowAddress(m_StartAddress, TRUE); + BeginOpEdit(m_SelectedAddress); + delete[] text; + return FALSE; +} + LRESULT CEditOp::OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { if (m_CommandsWindow == NULL) { return FALSE; } - return m_CommandsWindow->OnOpKeyDown(uMsg, wParam, lParam, bHandled); + return m_CommandsWindow->OnOpEditKeyDown(uMsg, wParam, lParam, bHandled); } void CEditOp::SetCommandsWindow(CDebugCommandsView* commandsWindow) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Commands.h b/Source/Project64/UserInterface/Debugger/Debugger-Commands.h index 756122547..a8d500d2e 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Commands.h +++ b/Source/Project64/UserInterface/Debugger/Debugger-Commands.h @@ -60,7 +60,7 @@ private: MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown) MESSAGE_HANDLER(WM_KEYUP, OnKeyUp) MESSAGE_HANDLER(WM_CHAR, OnKeyUp) - END_MSG_MAP() + END_MSG_MAP() public: void SetCommandsWindow(CDebugCommandsView* commandsWindow); @@ -120,12 +120,15 @@ private: COMMAND_HANDLER(ID_POPUPMENU_FOLLOWJUMP, BN_CLICKED, OnPopupmenuFollowJump) COMMAND_HANDLER(ID_POPUPMENU_VIEWMEMORY, BN_CLICKED, OnPopupmenuViewMemory) COMMAND_HANDLER(ID_POPUPMENU_TOGGLEBP, BN_CLICKED, OnPopupmenuToggleBP) - COMMAND_HANDLER(ID_POPUPMENU_CLEARBPS, BN_CLICKED, OnPopupmenuClearBP ) + COMMAND_HANDLER(ID_POPUPMENU_CLEARBPS, BN_CLICKED, OnPopupmenuClearBP) + COMMAND_HANDLER(IDC_OP_EDIT, EN_CHANGE, OnOpEditChanged) + NOTIFY_HANDLER_EX(IDC_CMD_LIST, NM_CLICK, OnCommandListClicked) NOTIFY_HANDLER_EX(IDC_CMD_LIST, NM_DBLCLK, OnCommandListDblClicked) NOTIFY_HANDLER_EX(IDC_CMD_LIST, NM_RCLICK, OnCommandListRightClicked) NOTIFY_HANDLER_EX(IDC_REG_TABS, TCN_SELCHANGE, OnRegisterTabChange) NOTIFY_HANDLER_EX(IDC_CMD_LIST, NM_CUSTOMDRAW, OnCustomDrawList) + MSG_WM_DESTROY(OnDestroy) CHAIN_MSG_MAP(CDialogResize) MSG_WM_EXITSIZEMOVE(OnExitSizeMove) @@ -207,8 +210,8 @@ private: LRESULT OnPopupmenuToggleBP(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); LRESULT OnPopupmenuClearBP(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); LRESULT OnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); - - LRESULT OnOpKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnOpEditChanged(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); + LRESULT OnOpEditKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnCommandListClicked(NMHDR* pNMHDR); LRESULT OnCommandListDblClicked(NMHDR* pNMHDR); @@ -219,7 +222,7 @@ private: void OnExitSizeMove(void); void ClearEditedOps(); - void EditOp(uint32_t address, uint32_t op); + void EditOp(uint32_t address, uint32_t op, bool bRefresh = true); void RestoreOp(uint32_t address); void RestoreAllOps(); BOOL IsOpEdited(uint32_t address); diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp index 6b6980bd4..677ca4d9f 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp @@ -13,24 +13,28 @@ #include "DebuggerUI.h" -//char* CEditEval::m_EvalString; - CDebugScripts::CDebugScripts(CDebuggerUI* debugger) : - CDebugDialog(debugger) + CDebugDialog(debugger), + CToolTipDialog(), + m_SelectedScriptName(NULL), + m_hQuitScriptDirWatchEvent(NULL), + m_hScriptDirWatchThread(NULL) { - m_SelectedScriptName = (char*)malloc(MAX_PATH); - //CScriptSystem::SetScriptsWindow(this); } CDebugScripts::~CDebugScripts(void) { - free(m_SelectedScriptName); + if (m_SelectedScriptName != NULL) + { + free(m_SelectedScriptName); + } } LRESULT CDebugScripts::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { DlgResize_Init(false, true); DlgSavePos_Init(DebuggerUI_ScriptsPos); + DlgToolTip_Init(); HFONT monoFont = CreateFont(-11, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET, @@ -38,11 +42,11 @@ LRESULT CDebugScripts::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*l CLEARTYPE_QUALITY, FF_DONTCARE, L"Consolas" ); - m_InstanceInfoEdit.Attach(GetDlgItem(IDC_CTX_INFO_EDIT)); - m_ScriptList.Attach(GetDlgItem(IDC_SCRIPT_LIST)); - m_ScriptList.AddColumn(L"Script", 0, 0); - m_ScriptList.SetColumnWidth(0, 100); + m_ScriptList.AddColumn(L"Status", 0); + m_ScriptList.AddColumn(L"Script", 1); + m_ScriptList.SetColumnWidth(0, 16); + m_ScriptList.SetColumnWidth(1, LVSCW_AUTOSIZE_USEHEADER); m_ScriptList.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER); m_ScriptList.ModifyStyle(LVS_OWNERDRAWFIXED, 0, 0); @@ -55,61 +59,86 @@ LRESULT CDebugScripts::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*l m_ConsoleEdit.SetLimitText(0); m_ConsoleEdit.SetFont(monoFont); + int statusPaneWidths[] = { -1 }; + m_StatusBar.Attach(GetDlgItem(IDC_STATUSBAR)); + m_StatusBar.SetParts(1, statusPaneWidths); + RefreshList(); LoadWindowPos(); WindowCreated(); + + m_hQuitScriptDirWatchEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + m_hScriptDirWatchThread = CreateThread(NULL, 0, ScriptDirWatchProc, (void*)this, 0, NULL); return 0; } +LRESULT CDebugScripts::OnDestroy(void) +{ + SetEvent(m_hQuitScriptDirWatchEvent); + WaitForSingleObject(m_hScriptDirWatchThread, INFINITE); + CloseHandle(m_hQuitScriptDirWatchEvent); + CloseHandle(m_hScriptDirWatchThread); + return 0; +} + +LRESULT CDebugScripts::OnCtlColorStatic(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) +{ + HDC hDC = (HDC)wParam; + HWND hCtrl = (HWND)lParam; + WORD ctrlId = (WORD) ::GetWindowLong(hCtrl, GWL_ID); + + if (ctrlId == IDC_CONSOLE_EDIT) + { + SetBkColor(hDC, RGB(255, 255, 255)); + SetDCBrushColor(hDC, RGB(255, 255, 255)); + return (LRESULT)GetStockObject(DC_BRUSH); + } + + return FALSE; +} + +DWORD WINAPI CDebugScripts::ScriptDirWatchProc(void* ctx) +{ + CDebugScripts* _this = (CDebugScripts*)ctx; + + HANDLE hEvents[2]; + + hEvents[0] = FindFirstChangeNotification(L"Scripts", FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); + + if (hEvents[0] == INVALID_HANDLE_VALUE) + { + return 0; + } + + hEvents[1] = _this->m_hQuitScriptDirWatchEvent; + + while (true) + { + DWORD status = WaitForMultipleObjects(2, hEvents, FALSE, INFINITE); + + switch (status) + { + case WAIT_OBJECT_0: + if (FindNextChangeNotification(hEvents[0]) == FALSE) + { + return 0; + } + _this->PostMessage(WM_REFRESH_LIST, 0, 0); + break; + case WAIT_OBJECT_0 + 1: + return 0; + default: + return 0; + } + } +} + void CDebugScripts::OnExitSizeMove(void) { SaveWindowPos(true); } -void CDebugScripts::ConsolePrint(const char* text) -{ - ::ShowWindow(*this, SW_SHOWNOACTIVATE); - - // Get scrollbar state - SCROLLINFO scroll; - scroll.cbSize = sizeof(SCROLLINFO); - scroll.fMask = SIF_ALL; - m_ConsoleEdit.GetScrollInfo(SB_VERT, &scroll); - - m_ConsoleEdit.SetRedraw(FALSE); - - m_ConsoleEdit.AppendText(stdstr(text).ToUTF16().c_str()); - - m_ConsoleEdit.SetRedraw(TRUE); - - if ((scroll.nPage + scroll.nPos) - 1 == (uint32_t)scroll.nMax) - { - m_ConsoleEdit.ScrollCaret(); - } -} - -void CDebugScripts::RefreshConsole() -{ - CGuard guard(m_CS); - - m_Debugger->OpenScriptsWindow(); - CScriptSystem* scriptSystem = m_Debugger->ScriptSystem(); - vector* logData = scriptSystem->LogData(); - - while (logData->size() != 0) - { - ConsolePrint((*logData)[0]); - free((*logData)[0]); - logData->erase(logData->begin() + 0); - } -} - -void CDebugScripts::ConsoleClear() -{ - m_ConsoleEdit.SetWindowText(L""); -} - void CDebugScripts::ConsoleCopy() { if (!OpenClipboard()) @@ -127,41 +156,33 @@ void CDebugScripts::ConsoleCopy() m_ConsoleEdit.GetWindowText(memBuf, nChars); GlobalUnlock(hMem); - SetClipboardData(CF_TEXT, hMem); + SetClipboardData(CF_UNICODETEXT, hMem); GlobalFree(hMem); CloseClipboard(); } +void CDebugScripts::ConsolePrint(const char* text) +{ + if (m_hWnd != NULL) + { + SendMessage(WM_CONSOLE_PRINT, (WPARAM)text); + } +} + +void CDebugScripts::ConsoleClear() +{ + if (m_hWnd != NULL) + { + SendMessage(WM_CONSOLE_CLEAR); + } +} + void CDebugScripts::RefreshList() { - CGuard guard(m_CS); - - int nIndex = m_ScriptList.GetSelectedIndex(); - - CPath SearchPath("Scripts", "*"); - - if (!SearchPath.FindFirst(CPath::FIND_ATTRIBUTE_ALLFILES)) + if (m_hWnd != NULL) { - return; - } - - m_ScriptList.SetRedraw(false); - m_ScriptList.DeleteAllItems(); - - do - { - stdstr scriptFileName = SearchPath.GetNameExtension(); - m_ScriptList.AddItem(0, 0, scriptFileName.ToUTF16().c_str()); - } while (SearchPath.FindNext()); - - m_ScriptList.SetRedraw(true); - m_ScriptList.Invalidate(); - - if (nIndex >= 0) - { - m_ScriptList.SelectItem(nIndex); - RefreshStatus(); + PostMessage(WM_REFRESH_LIST); } } @@ -173,9 +194,11 @@ LRESULT CDebugScripts::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl* EndDialog(0); break; case ID_POPUP_RUN: + case IDC_RUN_BTN: RunSelected(); break; case ID_POPUP_STOP: + case IDC_STOP_BTN: StopSelected(); break; case ID_POPUP_SCRIPT_EDIT: @@ -187,6 +210,9 @@ LRESULT CDebugScripts::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl* case IDC_COPY_BTN: ConsoleCopy(); break; + case IDC_SCRIPTDIR_BTN: + ShellExecute(NULL, L"open", L"Scripts", NULL, NULL, SW_SHOW); + break; } return FALSE; } @@ -197,7 +223,10 @@ LRESULT CDebugScripts::OnScriptListDblClicked(NMHDR* pNMHDR) NMITEMACTIVATE* pIA = reinterpret_cast(pNMHDR); int nItem = pIA->iItem; - m_ScriptList.SelectItem(nItem); + if (nItem == -1) + { + return 0; + } ToggleSelected(); @@ -206,66 +235,55 @@ LRESULT CDebugScripts::OnScriptListDblClicked(NMHDR* pNMHDR) void CDebugScripts::RefreshStatus() { - CGuard guard(m_CS); INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName); - char* szState = ""; - switch (state) - { - case STATE_RUNNING: szState = "Running"; break; - case STATE_STARTED: szState = "Started"; break; - case STATE_STOPPED: szState = "Stopped"; break; - case STATE_INVALID: szState = "Not running"; break; - } - - stdstr instanceInfo = stdstr_f("%s (%s)", m_SelectedScriptName, szState); - - m_InstanceInfoEdit.SetWindowText(instanceInfo.ToUTF16().c_str()); - + stdstr statusText; + CPath(stdstr_f("Scripts\\%s", m_SelectedScriptName)).GetFullyQualified(statusText); + if (state == STATE_RUNNING) { + statusText += " (Running)"; m_EvalEdit.EnableWindow(TRUE); } else { + if (state == STATE_STARTED) + { + statusText += " (Started)"; + } m_EvalEdit.EnableWindow(FALSE); } -} -LRESULT CDebugScripts::OnScriptListClicked(NMHDR* pNMHDR) -{ - // Select instance for console input - NMITEMACTIVATE* pIA = reinterpret_cast(pNMHDR); - int nItem = pIA->iItem; - - wchar_t ScriptName[MAX_PATH]; - m_ScriptList.GetItemText(nItem, 0, ScriptName, MAX_PATH); - strcpy(m_SelectedScriptName, stdstr().FromUTF16(ScriptName).c_str()); - - RefreshStatus(); - - return 0; + m_StatusBar.SetText(0, statusText.ToUTF16().c_str()); } LRESULT CDebugScripts::OnScriptListRClicked(NMHDR* pNMHDR) { - OnScriptListClicked(pNMHDR); + NMITEMACTIVATE* pIA = reinterpret_cast(pNMHDR); + int nItem = pIA->iItem; + + if (nItem == -1) + { + return 0; + } + + INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName); HMENU hMenu = LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_SCRIPT_POPUP)); HMENU hPopupMenu = GetSubMenu(hMenu, 0); - /* - if (m_Breakpoints->m_RBP.size() == 0 && m_Breakpoints->m_WBP.size() == 0) + if (state == STATE_STARTED || state == STATE_RUNNING) { - EnableMenuItem(hPopupMenu, ID_POPUPMENU_CLEARALLBPS, MF_DISABLED | MF_GRAYED); + EnableMenuItem(hPopupMenu, ID_POPUP_RUN, MF_DISABLED | MF_GRAYED); } - */ - + else + { + EnableMenuItem(hPopupMenu, ID_POPUP_STOP, MF_DISABLED | MF_GRAYED); + } + POINT mouse; GetCursorPos(&mouse); - TrackPopupMenu(hPopupMenu, TPM_LEFTALIGN, mouse.x, mouse.y, 0, m_hWnd, NULL); - DestroyMenu(hMenu); return 0; @@ -291,7 +309,7 @@ LRESULT CDebugScripts::OnScriptListCustomDraw(NMHDR* pNMHDR) DWORD nItem = pLVCD->nmcd.dwItemSpec; wchar_t scriptName[MAX_PATH]; - m_ScriptList.GetItemText(nItem, 0, scriptName, MAX_PATH); + m_ScriptList.GetItemText(nItem, 1, scriptName, MAX_PATH); INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(stdstr("").FromUTF16(scriptName).c_str()); @@ -307,6 +325,116 @@ LRESULT CDebugScripts::OnScriptListCustomDraw(NMHDR* pNMHDR) return CDRF_DODEFAULT; } +LRESULT CDebugScripts::OnScriptListItemChanged(NMHDR* pNMHDR) +{ + NMLISTVIEW* lpStateChange = reinterpret_cast(pNMHDR); + if ((lpStateChange->uNewState ^ lpStateChange->uOldState) & LVIS_SELECTED) + { + if (lpStateChange->iItem == -1) + { + return FALSE; + } + + wchar_t ScriptName[MAX_PATH]; + + m_ScriptList.GetItemText(lpStateChange->iItem, 1, ScriptName, MAX_PATH); + + if (m_SelectedScriptName != NULL) + { + free(m_SelectedScriptName); + } + + m_SelectedScriptName = strdup(stdstr().FromUTF16(ScriptName).c_str()); + + INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName); + + ::EnableWindow(GetDlgItem(IDC_STOP_BTN), state == STATE_RUNNING || state == STATE_STARTED); + ::EnableWindow(GetDlgItem(IDC_RUN_BTN), state == STATE_STOPPED || state == STATE_INVALID); + + RefreshStatus(); + } + return FALSE; +} + +LRESULT CDebugScripts::OnConsoleLog(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/) +{ + const char *text = (const char*)wParam; + + ::ShowWindow(*this, SW_SHOWNOACTIVATE); + + SCROLLINFO scroll; + scroll.cbSize = sizeof(SCROLLINFO); + scroll.fMask = SIF_ALL; + m_ConsoleEdit.GetScrollInfo(SB_VERT, &scroll); + + m_ConsoleEdit.SetRedraw(FALSE); + m_ConsoleEdit.AppendText(stdstr(text).ToUTF16().c_str()); + m_ConsoleEdit.SetRedraw(TRUE); + + if ((scroll.nPage + scroll.nPos) - 1 == (uint32_t)scroll.nMax) + { + m_ConsoleEdit.ScrollCaret(); + } + return FALSE; +} + +LRESULT CDebugScripts::OnConsoleClear(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) +{ + m_ConsoleEdit.SetWindowText(L""); + return FALSE; +} + +LRESULT CDebugScripts::OnRefreshList(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) +{ + int nIndex = m_ScriptList.GetSelectedIndex(); + + CPath SearchPath("Scripts", "*"); + + if (!SearchPath.FindFirst(CPath::FIND_ATTRIBUTE_ALLFILES)) + { + return FALSE; + } + + m_ScriptList.SetRedraw(false); + m_ScriptList.DeleteAllItems(); + + size_t nItem = 0; + + do + { + stdstr scriptFileName = SearchPath.GetNameExtension(); + INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(scriptFileName.c_str()); + const wchar_t *statusIcon = L""; + + switch (state) + { + case STATE_STARTED: + statusIcon = L"*"; + break; + case STATE_RUNNING: + statusIcon = L">"; + break; + default: + statusIcon = L"-"; + break; + } + + m_ScriptList.AddItem(nItem, 0, statusIcon); + m_ScriptList.SetItemText(nItem, 1, scriptFileName.ToUTF16().c_str()); + nItem++; + } while (SearchPath.FindNext()); + + m_ScriptList.SetRedraw(true); + m_ScriptList.Invalidate(); + + if (nIndex >= 0) + { + m_ScriptList.SelectItem(nIndex); + RefreshStatus(); + } + return FALSE; +} + void CDebugScripts::EvaluateInSelectedInstance(const char* code) { INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName); @@ -314,11 +442,53 @@ void CDebugScripts::EvaluateInSelectedInstance(const char* code) if (state == STATE_RUNNING || state == STATE_STARTED) { CScriptInstance* instance = m_Debugger->ScriptSystem()->GetInstance(m_SelectedScriptName); - //instance->EvalAsync(code); instance->Eval(code); } } +void CDebugScripts::RunSelected() +{ + if (m_SelectedScriptName == NULL) + { + return; + } + + INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName); + + if (state == STATE_INVALID || state == STATE_STOPPED) + { + m_Debugger->ScriptSystem()->RunScript(m_SelectedScriptName); + } + else + { + m_Debugger->Debug_LogScriptsWindow("[Error: Script is already running]\n"); + } +} + +void CDebugScripts::StopSelected() +{ + m_Debugger->ScriptSystem()->StopScript(m_SelectedScriptName); +} + +void CDebugScripts::ToggleSelected() +{ + INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName); + + if (state == STATE_INVALID || state == STATE_STOPPED) + { + RunSelected(); + } + else + { + StopSelected(); + } +} + +void CDebugScripts::EditSelected() +{ + ShellExecute(NULL, L"edit", stdstr(m_SelectedScriptName).ToUTF16().c_str(), NULL, L"Scripts", SW_SHOWNORMAL); +} + // Console input LRESULT CEditEval::OnKeyDown(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled) { @@ -390,43 +560,3 @@ LRESULT CEditEval::OnKeyDown(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BO bHandled = FALSE; return 0; } - -void CDebugScripts::RunSelected() -{ - INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName); - - if (state == STATE_INVALID || state == STATE_STOPPED) - { - m_Debugger->ScriptSystem()->RunScript(m_SelectedScriptName); - } - else - { - m_Debugger->Debug_LogScriptsWindow("[Error: Script is already running]\n"); - } -} - -void CDebugScripts::StopSelected() -{ - m_Debugger->ScriptSystem()->StopScript(m_SelectedScriptName); - - //m_Debugger->Debug_RefreshScriptsWindow(); -} - -void CDebugScripts::ToggleSelected() -{ - INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName); - - if (state == STATE_INVALID || state == STATE_STOPPED) - { - RunSelected(); - } - else - { - StopSelected(); - } -} - -void CDebugScripts::EditSelected() -{ - ShellExecute(NULL, L"edit", stdstr(m_SelectedScriptName).ToUTF16().c_str(), NULL, L"Scripts", SW_SHOWNORMAL); -} diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.h b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.h index 4f41708ac..29b9d262a 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.h +++ b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.h @@ -12,6 +12,7 @@ #pragma once #include "DebuggerUI.h" #include "ScriptSystem.h" +#include class CScriptList : public CListViewCtrl { @@ -49,7 +50,7 @@ public: BEGIN_MSG_MAP_EX(CEditEval) MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown) - END_MSG_MAP() + END_MSG_MAP() }; class CEditConsole : public CWindowImpl @@ -74,22 +75,37 @@ public: BEGIN_MSG_MAP_EX(CEditEval) MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown) - END_MSG_MAP() + END_MSG_MAP() }; class CDebugScripts : - public CDebugDialog < CDebugScripts >, - public CDialogResize + public CDebugDialog, + public CDialogResize, + public CToolTipDialog { private: - CEdit m_InstanceInfoEdit; + enum { + WM_REFRESH_LIST = WM_USER + 1, + WM_CONSOLE_PRINT = WM_USER + 2, + WM_CONSOLE_CLEAR = WM_USER + 3 + }; + CEditEval m_EvalEdit; CEditConsole m_ConsoleEdit; CScriptList m_ScriptList; + CStatusBarCtrl m_StatusBar; char* m_SelectedScriptName; + HANDLE m_hQuitScriptDirWatchEvent; + HANDLE m_hScriptDirWatchThread; + static DWORD WINAPI ScriptDirWatchProc(void *ctx); + + void RunSelected(); + void StopSelected(); + void ToggleSelected(); + void EditSelected(); void RefreshStatus(); - CriticalSection m_CS; + void ConsoleCopy(); public: enum { IDD = IDD_Debugger_Scripts }; @@ -97,51 +113,62 @@ public: CDebugScripts(CDebuggerUI * debugger); virtual ~CDebugScripts(void); + void EvaluateInSelectedInstance(const char* code); void ConsolePrint(const char* text); void ConsoleClear(); - void ConsoleCopy(); - void RefreshList(); - void RefreshConsole(); - - void EvaluateInSelectedInstance(const char* code); - void RunSelected(); - void StopSelected(); - void ToggleSelected(); - void EditSelected(); LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); - LRESULT OnDestroy(void) - { - return 0; - } - + LRESULT OnCtlColorStatic(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(void); LRESULT OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/); LRESULT OnScriptListDblClicked(NMHDR* pNMHDR); - LRESULT OnScriptListClicked(NMHDR* pNMHDR); LRESULT OnScriptListRClicked(NMHDR* pNMHDR); LRESULT OnScriptListCustomDraw(NMHDR* pNMHDR); + LRESULT OnScriptListItemChanged(NMHDR* pNMHDR); void OnExitSizeMove(void); + LRESULT OnConsoleLog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnConsoleClear(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnRefreshList(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + BEGIN_MSG_MAP_EX(CDebugScripts) COMMAND_CODE_HANDLER(BN_CLICKED, OnClicked) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_CTLCOLORSTATIC, OnCtlColorStatic) NOTIFY_HANDLER_EX(IDC_SCRIPT_LIST, NM_DBLCLK, OnScriptListDblClicked) - NOTIFY_HANDLER_EX(IDC_SCRIPT_LIST, NM_CLICK, OnScriptListClicked) NOTIFY_HANDLER_EX(IDC_SCRIPT_LIST, NM_RCLICK, OnScriptListRClicked) NOTIFY_HANDLER_EX(IDC_SCRIPT_LIST, NM_CUSTOMDRAW, OnScriptListCustomDraw) - CHAIN_MSG_MAP_MEMBER(m_ScriptList) + NOTIFY_HANDLER_EX(IDC_SCRIPT_LIST, LVN_ITEMCHANGED, OnScriptListItemChanged) MSG_WM_DESTROY(OnDestroy) - CHAIN_MSG_MAP(CDialogResize) MSG_WM_EXITSIZEMOVE(OnExitSizeMove); - END_MSG_MAP() + MESSAGE_HANDLER(WM_CONSOLE_PRINT, OnConsoleLog) + MESSAGE_HANDLER(WM_CONSOLE_CLEAR, OnConsoleClear) + MESSAGE_HANDLER(WM_REFRESH_LIST, OnRefreshList) + CHAIN_MSG_MAP(CDialogResize) + CHAIN_MSG_MAP_MEMBER(m_ScriptList) + END_MSG_MAP() BEGIN_DLGRESIZE_MAP(CDebugScripts) - DLGRESIZE_CONTROL(IDC_CTX_INFO_EDIT, DLSZ_SIZE_X) - DLGRESIZE_CONTROL(IDC_EVAL_EDIT, DLSZ_SIZE_X | DLSZ_MOVE_Y) DLGRESIZE_CONTROL(IDC_CONSOLE_EDIT, DLSZ_SIZE_X | DLSZ_SIZE_Y) DLGRESIZE_CONTROL(IDC_SCRIPT_LIST, DLSZ_SIZE_Y) - DLGRESIZE_CONTROL(IDC_CLEAR_BTN, DLSZ_MOVE_X) - DLGRESIZE_CONTROL(IDC_COPY_BTN, DLSZ_MOVE_X) + DLGRESIZE_CONTROL(IDC_CLEAR_BTN, DLSZ_MOVE_X | DLSZ_MOVE_Y) + DLGRESIZE_CONTROL(IDC_COPY_BTN, DLSZ_MOVE_X | DLSZ_MOVE_Y) + DLGRESIZE_CONTROL(IDC_SCRIPTS_GRP, DLSZ_SIZE_Y) + DLGRESIZE_CONTROL(IDC_OUTPUT_GRP, DLSZ_SIZE_X | DLSZ_SIZE_Y) + DLGRESIZE_CONTROL(IDC_EVAL_LBL, DLSZ_MOVE_Y) + DLGRESIZE_CONTROL(IDC_EVAL_EDIT, DLSZ_SIZE_X | DLSZ_MOVE_Y) + DLGRESIZE_CONTROL(IDC_RUN_BTN, DLSZ_MOVE_Y) + DLGRESIZE_CONTROL(IDC_STOP_BTN, DLSZ_MOVE_Y) + DLGRESIZE_CONTROL(IDC_SCRIPTDIR_BTN, DLSZ_MOVE_Y) + DLGRESIZE_CONTROL(IDC_STATUSBAR, DLSZ_SIZE_X | DLSZ_MOVE_Y) END_DLGRESIZE_MAP() -}; \ No newline at end of file + + BEGIN_TOOLTIP_MAP() + TOOLTIP(IDC_CLEAR_BTN, "Clear console output") + TOOLTIP(IDC_COPY_BTN, "Copy console output to the clipboard") + TOOLTIP(IDC_RUN_BTN, "Run selected script") + TOOLTIP(IDC_STOP_BTN, "Stop selected script") + TOOLTIP(IDC_SCRIPTDIR_BTN, "Open scripts directory in file explorer") + END_TOOLTIP_MAP() +}; diff --git a/Source/Project64/UserInterface/Debugger/ScriptInstance.cpp b/Source/Project64/UserInterface/Debugger/ScriptInstance.cpp index 6bc9c174b..849e45bec 100644 --- a/Source/Project64/UserInterface/Debugger/ScriptInstance.cpp +++ b/Source/Project64/UserInterface/Debugger/ScriptInstance.cpp @@ -132,15 +132,6 @@ void CScriptInstance::StartScriptProc() DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &m_hThread, 0, FALSE, DUPLICATE_SAME_ACCESS); SetState(STATE_STARTED); - bool bWasUnpaused = false; - - if (!g_Settings->LoadBool(GameRunning_CPU_Paused) && g_MMU) - { - // Pause CPU during startup phase - bWasUnpaused = true; - g_System->ExternalEvent(SysEvent_PauseCPU_AppLostFocus); - } - duk_context* ctx = m_Ctx; duk_push_object(ctx); @@ -176,11 +167,6 @@ void CScriptInstance::StartScriptProc() } } - if (bWasUnpaused) - { - g_System->ExternalEvent(SysEvent_ResumeCPU_AppGainedFocus); - } - if (HaveEvents()) { StartEventLoop(); diff --git a/Source/Project64/UserInterface/UIResources.rc b/Source/Project64/UserInterface/UIResources.rc index d3aab566c..e02470170 100644 --- a/Source/Project64/UserInterface/UIResources.rc +++ b/Source/Project64/UserInterface/UIResources.rc @@ -652,7 +652,7 @@ BEGIN CONTROL "",IDC_CMD_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_OWNERDRAWFIXED | LVS_NOSCROLL | LVS_NOSORTHEADER | WS_TABSTOP,0,0,284,327 LISTBOX IDC_BP_LIST,422,17,88,42,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP GROUPBOX "",IDC_OPCODE_BOX,298,14,119,45,0,WS_EX_TRANSPARENT - EDITTEXT IDC_OP_EDIT,458,51,59,12,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_VISIBLE | NOT WS_BORDER + EDITTEXT IDC_OP_EDIT,458,51,59,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_VISIBLE | NOT WS_BORDER SCROLLBAR IDC_SCRL_BAR,284,0,12,327,SBS_VERT PUSHBUTTON "Copy Tab Registers",IDC_COPYTABREGISTERS_BTN,298,313,70,13 PUSHBUTTON "Copy All Registers",IDC_COPYALLREGISTERS_BTN,370,313,70,13 @@ -821,17 +821,23 @@ BEGIN LTEXT "CPU Floating Point Registers (COP1)",IDC_STATIC,3,4,119,8 END -IDD_Debugger_Scripts DIALOGEX 0, 0, 337, 170 +IDD_Debugger_Scripts DIALOGEX 0, 0, 421, 216 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "Scripts" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - EDITTEXT IDC_CONSOLE_EDIT,101,17,231,133,ES_MULTILINE | ES_AUTOHSCROLL | WS_VSCROLL - EDITTEXT IDC_EVAL_EDIT,5,153,327,12,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN - CONTROL "",IDC_SCRIPT_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_OWNERDRAWFIXED | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,5,4,94,146 - EDITTEXT IDC_CTX_INFO_EDIT,101,4,172,12,ES_AUTOHSCROLL | ES_READONLY - PUSHBUTTON "Clear",IDC_CLEAR_BTN,304,4,29,12 - PUSHBUTTON "Copy",IDC_COPY_BTN,274,4,29,12 + EDITTEXT IDC_CONSOLE_EDIT,136,15,274,147,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL + EDITTEXT IDC_EVAL_EDIT,28,186,386,12,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN + CONTROL "",IDC_SCRIPT_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_OWNERDRAWFIXED | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,13,15,106,147 + PUSHBUTTON "Clear",IDC_CLEAR_BTN,373,165,37,13 + PUSHBUTTON "Copy",IDC_COPY_BTN,333,165,37,13 + LTEXT "Eval:",IDC_EVAL_LBL,7,187,18,8 + GROUPBOX "Scripts",IDC_SCRIPTS_GRP,7,5,118,177,0,WS_EX_TRANSPARENT + GROUPBOX "Output",IDC_OUTPUT_GRP,129,5,285,177,0,WS_EX_TRANSPARENT + CONTROL "",IDC_STATUSBAR,"msctls_statusbar32",WS_TABSTOP,0,205,420,11 + PUSHBUTTON "...",IDC_SCRIPTDIR_BTN,13,165,21,13 + PUSHBUTTON "Run",IDC_RUN_BTN,43,165,37,13,WS_DISABLED + PUSHBUTTON "Stop",IDC_STOP_BTN,83,165,37,13,WS_DISABLED END IDD_Debugger_RegPI DIALOGEX 0, 0, 190, 210 @@ -1648,10 +1654,8 @@ BEGIN IDD_Debugger_Scripts, DIALOG BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 330 - TOPMARGIN, 7 - BOTTOMMARGIN, 163 + RIGHTMARGIN, 379 + BOTTOMMARGIN, 214 END IDD_Debugger_RegPI, DIALOG diff --git a/Source/Project64/UserInterface/resource.h b/Source/Project64/UserInterface/resource.h index 04e80f8ce..cb9f141c7 100644 --- a/Source/Project64/UserInterface/resource.h +++ b/Source/Project64/UserInterface/resource.h @@ -362,7 +362,6 @@ #define IDC_HI_EDIT 1183 #define IDC_LO_EDIT 1184 #define IDC_BP_LIST 1185 -#define IDC_CTX_INFO_EDIT 1185 #define IDC_ADDBP_BTN 1186 #define IDC_REMOVESYMBOL_BTN 1186 #define IDC_RMBP_BTN 1187 @@ -453,8 +452,11 @@ #define IDC_CLEAR_BTN 1302 #define IDC_DMA_RAM_EDIT 1303 #define IDC_COPY_BTN 1303 +#define IDC_SCRIPTDIR_BTN 1304 #define IDC_EXPORT_BTN 1305 +#define IDC_RUN_BTN 1305 #define IDC_DMA_ROM_EDIT 1306 +#define IDC_STOP_BTN 1306 #define IDC_TRACE_STATIC 1307 #define IDC_RAM_STATIC 1308 #define IDC_ROM_STATIC 1309 @@ -701,8 +703,11 @@ #define IDC_F2_LBL 1577 #define IDC_EMAIL 1577 #define IDC_F3_LBL 1578 +#define IDC_SCRIPTS_GRP 1578 #define IDC_F4_LBL 1579 +#define IDC_OUTPUT_GRP 1579 #define IDC_F5_LBL 1580 +#define IDC_EVAL_LBL 1580 #define IDC_F6_LBL 1581 #define IDC_F7_LBL 1582 #define IDC_F8_LBL 1583 diff --git a/apidoc.htm b/apidoc.htm index fe51e4481..9bfab52c7 100644 --- a/apidoc.htm +++ b/apidoc.htm @@ -121,8 +121,8 @@ span.tag2 {
mem.u8|u16|u32|s8|s16|s32|float|double
- Arrays for reading and modifying values in virtual memory. - Virtual addresses are always used for indeces regardless of type size. + Arrays for reading and writing values in virtual memory. + Virtual addresses are always used for indices regardless of type size.
 var addr_power = 0x8033B21E
 
@@ -281,7 +281,7 @@ events.onexec(0x802CB1C0, function()
 })
 
-events.onexec(ADDR_ANY, function(pc))
+events.onexec(ADDR_ANY, function(pc)
 {
     // Log every step!
     console.log('CPU is executing 0x' + pc.hex())
@@ -843,6 +843,12 @@ server.on('connection', function(socket)
 			Writes data to the socket.
 		
+
+
socket.close()
+
+ Closes the socket. +
+
socket.on('data', callback)
@@ -868,9 +874,9 @@ server.on('connection', function(socket)
 ADDR_ANY              0x00000000 : 0xFFFFFFFF Any 32-bit address
 
-ADDR_ANY_KUSEG        0x00000000 : 0x7FFFFFFF  MIPS user mode TLB mapped segment
-ADDR_ANY_KSEG0        0x80000000 : 0x9FFFFFFF  MIPS cached unmapped segment
-ADDR_ANY_KSEG1        0xA0000000 : 0xBFFFFFFF  MIPS uncached unmapped segment
+ADDR_ANY_KUSEG        0x00000000 : 0x7FFFFFFF MIPS user mode TLB mapped segment
+ADDR_ANY_KSEG0        0x80000000 : 0x9FFFFFFF MIPS cached unmapped segment
+ADDR_ANY_KSEG1        0xA0000000 : 0xBFFFFFFF MIPS uncached unmapped segment
 ADDR_ANY_KSEG2        0xC0000000 : 0xFFFFFFFF MIPS kernel mode TLB mapped segment
 
 ADDR_ANY_RDRAM        0x80000000 : 0x807FFFFF Cached RDRAM