From a422d1dcda810b2f129a9a5213f3f4b440be4bbc Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 3 Jan 2004 15:04:46 +0000 Subject: Highly started work on mips disassembler + various little fixes. --- PE/compil.lex | 1 + PE/pe-hack.lua | 73 +++++++++++++++++++++++++++++++++++++++++++--------------- PE/table.h | 4 ++-- 3 files changed, 57 insertions(+), 21 deletions(-) (limited to 'PE') diff --git a/PE/compil.lex b/PE/compil.lex index 8d15631..f4e05b4 100644 --- a/PE/compil.lex +++ b/PE/compil.lex @@ -89,6 +89,7 @@ if (table[i] == *yytext) { trouve = 1; yputc(i); + break; } } diff --git a/PE/pe-hack.lua b/PE/pe-hack.lua index 6e5965a..0937a70 100644 --- a/PE/pe-hack.lua +++ b/PE/pe-hack.lua @@ -1,5 +1,5 @@ -- Parasite Eve's french patch --- $Id: pe-hack.lua,v 1.8 2003-12-28 13:07:52 pixel Exp $ +-- $Id: pe-hack.lua,v 1.9 2004-01-03 15:04:47 pixel Exp $ function mainpatch() local dirent, slusdirent, pvd, root, is_cd1, is_cd2, slusname, fmvdir, systemcnfstring, inslus, slus, peimg, pesect, tim, startsect, slussect, fmvdirtree, xadirtree, falsesect, i, picts, pict @@ -14,7 +14,6 @@ function mainpatch() print "CD is Parasite Eve CD1" pvd.volid = "PE-FR-CD1" slusname = "PE-FR.CD1" --- slusname = "SLUS_006.62" fmvdir = "FMV1" is_cd1 = true is_cd2 = false @@ -22,7 +21,6 @@ function mainpatch() print "CD is Parasite Eve CD2" pvd.volid = "PE-FR-CD2" slusname = "PE-FR.CD2" --- slusname = "SLUS_006.68" fmvdir = "FMV2" is_cd1 = false is_cd2 = true @@ -34,7 +32,6 @@ function mainpatch() systemcnf = Buffer() systemcnf:write(systemcnfstring) dirent = cdutil:findpath("/SYSTEM.CNF;1") --- iso:createfile(root, "SYSTEM.CNF", cdfile(cdutil, dirent), dirent) iso:createfile(root, "SYSTEM.CNF", systemcnf, slusdirent) print "Reading CD's slus file" @@ -62,7 +59,6 @@ function mainpatch() startsect = iso:createfile(root, "PE.TIM", tim, dirent).sector print "Compiling IMG file" do_img_file(slus, startsect, pesect) --- iso:createfile(root, "PE.IMG", peimg, dirent) print "Writing final main file" slus:seek(0) @@ -227,6 +223,28 @@ function do_img_file(slus, startsect, pesect) end end +function patch_menu(sector, size) + local menu, bmenu, i, v, o + menu = Input("menus.bin") + bmenu = Buffer(true) + bmenu:copyfrom(menu) + + bmenu:seek(0x28) + o = bmenu:readU32() + bmenu:seek(0) + bmenu:wseek(0) + + for i = 78, 144 do + v = slus_hacks[0x81ea1][i] + if (v == 0) then + break + end + bmenu[o + i - 1] = (v - 1) * 16 + end + + return bmenu +end + function patch_map(sector, size) local map, font, names, buff @@ -375,7 +393,7 @@ end files = { [1] = "various.bin", - [2] = "menus.bin", + [2] = patch_menu, [10] = "font.tim", [70] = "mainmenu.bin", [72] = patch_map, @@ -442,19 +460,36 @@ slus_hacks = { -- Font width table - [0x81ea1] = { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, - 6, 8, 11, 14, 9, 8, 7, 8, 7, 7, 8, 9, - 6, 7, 9, 8, 11, 9, 7, 8, 7, 9, 7, 7, - 9, 9, 11, 7, 9, 7, 9, 4, 7, 6, 4, 4, - 8, 8, 7, 7, 7, 7, 8, 9, 5, 4, 8, 5, - 11, 9, 7, 8, 8, 7, 6, 5, 9, 9, 11, 7, - 9, 6, 4, 4, 7, 7, 7, 7, 7, 7, 7, 7, - 5, 5, 7, 7, 9, 9, 9, 7, 11, 11, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + [0x81ea1] = { 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 6, 6, 8, + 11, 14, 9, 8, 7, 8, 7, + + 7, 8, 9, 6, 7, 9, 8, + 11, 9, 7, 8, 7, 9, 7, + 7, 9, 9, 11, 7, 9, 7, + + 9, 4, 7, 6, 4, 4, 8, + 8, 7, 7, 7, 7, 8, 9, + 5, 4, 8, 5, 11, 9, 7, + + 8, 8, 7, 6, 5, 9, 9, + 11, 7, 9, 6, 4, 4, 7, +-- new chars here + 7, 7, 7, 7, 7, 7, 7, + + 5, 5, 7, 7, 9, 9, 9, + 7, 11, 11, 5, 5, 11, 0, + 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0 }, -- PE.BIN filename extension [0x01b4c] = { 0x54, 0x49, 0x4d }, diff --git a/PE/table.h b/PE/table.h index 5643681..a2551fa 100644 --- a/PE/table.h +++ b/PE/table.h @@ -1,6 +1,6 @@ -char table[256] = "0123456789+-=*% ABCDEFGHIJKLMNOPQRSTUVWXYZ&!?\"'.abcdefghijklmnopqrstuvwxyz:,/éèêëàâäîïôöùûüç"; +char table[256] = "0123456789+-=*% ABCDEFGHIJKLMNOPQRSTUVWXYZ&!?\"'.abcdefghijklmnopqrstuvwxyz:,/éèêëàâäîïôöùûüç..()#"; -#define MAXCHAR 0x5b +#define MAXCHAR 0x60 #ifdef __HANDLE_H__ void extracttext(Handle * f, Handle * t, int size) { -- cgit v1.2.3