» 您尚未登录:请 登录 | 注册 | 标签 | 帮助 | 小黑屋 |


发新话题
打印

[专题讨论] 你不知道的奇葩乌龙事:某PS1游戏光盘自带游戏源代码,可编译...

引用:
On Beatmania Best Hits (a Japanese game), there is a file named DUMMY. Copy
it to your hard drive and name it as an LZH file. Inside this LZH is the
source code to Beatmania 5th Mix (a different Japanese game).

If you compile the source, the game WILL run with the 5th Mix CD in the
drive, but getting it to compile and run is a pain. The makefile has all
sorts of hardcoded directories. Since 5th Mix is an "append" disk, it
relies on data passed to it from 2nd Mix. So it takes a few tricks to get
it to run, too. The source is not the final version of 5th Mix, but it's
close.

-- Barubary
MAKEFILE
引用:
    #---------------------- Makefile for BeatMania
    #      ( ref. Makefile for MetalGearSolid )

    MAKEFLAGS = --no-print-directory

    #---------------------- Rules and defines

    export IMAGEDIR = ../cdrom.img

    STAGELIST = $(addsuffix .bin, $(basename $(STAGE)))

    MAINDIR = Main

    TRGPSX   = bm.cpe
    OBJPSX   = $(MAINDIR)/bm.obj
    MAPPSX   = bm.map
    SYMPSX  =
    #SYMPSX  = bm.sym

    PS_LIB_PATH = c:\psx\lib
    BM_LIBS_SYSTEM = libfs libmc libbm libsrn
    BM_LIBS_GAME   =
    BM_LIBS_USER   = tan
    BM_LIBS_DBGSTR  = dbgstr
    BM_LIBS_DBGSTR_CD  = dbgstr_m

    BM_LIBS = $(BM_LIBS_SYSTEM) $(BM_LIBS_GAME) $(BM_LIBS_USER) $(BM_LIBS_DBGSTR)

    OPTIONS = -c -O2 -Wall -kanji -Wno-format -comments-c++ -Wa,0 -G 0
    DEFINES = -DDEBUG -DDEBUG_MODE -DPSX -DNTSC -DLOCAL_SETUP -DAUTO_PLAY_ON
    INCPATH1 = include libfs libmc libsio libbm libsrn dbgstr

    CONFIGBM = bm.lnk
    CONFIGCD = cd.lnk
    CONFIGTMP = lnktmp.tmp

    CONFIGFILES   = $(CONFIGHD) $(CONFIGCD) $(CONFIGDB)

    OPTFILE = options
    PATCHX   = patchj.bat

    CCPSX   = ccpsx
    LINKPSX = psylink
    LINKOPT = /o$$80010000 /c /n512 /llib /m /l$(LIBRARY_PATH)
    GAWK = gawk

    LFGPSX0 = -o $(TRGPSX),$(SYMPSX),$(MAPPSX)
    LFGPSX1   = -Xo$$80010000 -Llib -Xn512 -nostdlib
    LFGPSX2 = $(addprefix -l, $(BM_LIBS_SYSTEM))
    LFGPSX3   = $(addprefix -l, $(BM_LIBS_GAME))
    LFGPSX4   = $(addprefix -l, $(BM_LIBS_USER))
    LFGPSX5   = -lsound
    LFGPSXHD = -lmts -lsio $(addprefix -l, $(BM_LIBS_DBGSTR))
    ## •’Ê
    LFGPSXCD = -lmtscd  -lsio $(addprefix -l, $(BM_LIBS_DBGSTR))
    ## ƒ}ƒXƒ^[
    #LFGPSXCD = -lmtsmcd  -lnolibsio $(addprefix -l, $(BM_LIBS_DBGSTR_M))
    LFGPSXSYS1 = -llibcd -llibsnd -llibc2 -llibgpu -llibgte -llibspu -llibpress
    LFGPSXSYS2 = -llibmcrd -llibpad -llibetc -llibsn -llibcard -llibapi

    #---------------------- Suffixes

    .SUFFIXES: .obj .c .s

    #---------------------- How to make

    all : psx

    FORCE :

    $(BM_LIBS) : FORCE
       @command.com /C echo Compile $@
       @cd $@
       @make psx
       @cd ..

    link : FORCE
       @command /C echo Link
       ${LINKPSX} /q $(LINKOPT) @${CONFIGBM},$(TRGPSX),$(SYMPSX),$(MAPPSX)

    psx : $(OPTFILE) $(OBJPSX) $(CONFIGBM) $(BM_LIBS) link

    linkcd: FORCE
       ${LINKPSX} /q $(LINKOPT) @${CONFIGCD},$(TRGPSX),$(SYMPSX),$(MAPPSX)
       cpe2x $(TRGPSX)
    cd : $(OPTFILE) $(OBJPSX) $(CONFIGCD) $(BM_LIBS) linkcd

    $(CONFIGBM) : Makefile
       echo ${LFGPSX0} > $(CONFIGTMP)
       echo ${OBJPSX} >> $(CONFIGTMP)
       echo ${LFGPSX1} >> $(CONFIGTMP)
       echo ${LFGPSX2} >> $(CONFIGTMP)
    #   echo ${LFGPSX3} >> $(CONFIGTMP)
       echo ${LFGPSX4} >> $(CONFIGTMP)
       echo ${LFGPSX5} >> $(CONFIGTMP)
       echo ${LFGPSXHD} >> $(CONFIGTMP)
       echo ${LFGPSXSYS1} >> $(CONFIGTMP)
       echo ${LFGPSXSYS2} >> $(CONFIGTMP)
       echo ${PS_LIB_PATH}\noheap.obj >> $(CONFIGTMP)
       $(GAWK) -f awk/mklnk.awk $(CONFIGTMP) > $@
       rm $(CONFIGTMP)

    $(CONFIGCD) : Makefile
       echo ${LFGPSX0} > $(CONFIGTMP)
       echo ${OBJPSX} >> $(CONFIGTMP)
       echo ${LFGPSX1} >> $(CONFIGTMP)
       echo ${LFGPSX2} >> $(CONFIGTMP)
    #   echo ${LFGPSX3} >> $(CONFIGTMP)
       echo ${LFGPSX4} >> $(CONFIGTMP)
       echo ${LFGPSX5} >> $(CONFIGTMP)
       echo ${LFGPSXCD} >> $(CONFIGTMP)
       echo ${LFGPSXSYS1} >> $(CONFIGTMP)
       echo ${LFGPSXSYS2} >> $(CONFIGTMP)
       echo ${PS_LIB_PATH}\noheap.obj >> $(CONFIGTMP)
       $(GAWK) -f awk/mklnk.awk $(CONFIGTMP) > $@
       rm $(CONFIGTMP)

    $(OPTFILE) : Makefile
       echo $(OPTIONS) > $(OPTFILE)
       echo $(DEFINES) >> $(OPTFILE)
       echo $(addprefix -I../,$(INCPATH1)) >> $(OPTFILE)
    #   echo $(addprefix -I../,$(INCPATH2)) >> $(OPTFILE)

    map:
       ${CCPSX} @${CONFIGHD} -Xm

    #---------------------- Dependencies

    $(MAINDIR)/bm.obj: $(MAINDIR)/bm.c
       @cd Main
       ${CCPSX} @../$(OPTFILE) $(<F)
       @cd ..

    #---------------------- Operations

    config: ${CONFIG} $(OPTFILE)

    clean:
       -rm */*.obj
       -rm dbgstr/*.o
       -rm */*/*.obj
       -rm e.txt
       -rm */e.txt
       -rm ${TRGPSX} $(MAPPSX) $(CONFIG) $(OPTFILE) $(CONFIGFILES) psx.exe

    go:
       resetps 1
       delay
       ${PATCHX}
       delay
       run ${TRGPSX}
Beatmania APPEND 5thMIX - 1999.11.25 Psy-Q Source Code

我正好有这张光盘,把DUMMY文件拷出来共享给大家研究
h t t p://pan.baidu.com/s/1dDfCjwl
password: fllq


本帖最近评分记录
  • FireLiu 激骚 +1 版务处理 2014-12-11 17:29

TOP

引用:
原帖由 hkt3010 于 2014-12-11 15:37 发表
posted by wap, platform: GALAXY S IV
说不定人家本来就准备开源让所有人参加二次开发。反正主机是有保护的,不怕你刻盘。
是乌龙,因为很快就发售了第二批光盘,将那个dummy文件置换了。
引用:
Actually what I don't understand is why did they put that 31mb dummy file. In a following re-release of the game the source code was replaced with a garbled binary file.



TOP

引用:
原帖由 yksoft1 于 2014-12-18 23:18 发表
posted by wap, platform: Firefox
有人有完整的ps1 psyq环境么。没有就没用
另外 大家应该都知道ps妇科版时空之轮里那个rom.bin
ps1 psyq并不难搭建环境:
http://www.psxdev.net/downloads.html
http://sebastianmihai.com/main.p ... ment-The-11th-Power

ps1 ct并非简单的sfc模拟器+rom

http://forums.qhimm.com/index.php?topic=3376.0


    The rom in the PSX cd is just a very unique way to hold game data, it's *NEVER* executed.
    The Chono Trigger CD does not not contain an emulator, nor is the rom emulated.
    Square write a whole new kernel for CT and simply opens the rom to grab the game data, like maps, enemy data, and scripts  but doen't execute the rom itself.
    If you look in the FF6 PSX CD and do a compare with the SNES rom you will find that that CD contains the rom too, but in FF6's case, the rom has been "shattered" and split up into individual data sets. The executable data has been stripped.
    The CT rom was actually there as a "secret bonus"  for the Japanese market. It was put there on puropse.
    However, the US version of Chono Trigger has an exclusive distribution contract with Nintendo. If you run US CT ROM in an SNES emulator it says "Licenced to Nintendo" in the US version. Because Nintendo has the rights, Square coudn't release the english version of the rom in the US.
    Well, why a ROM as a data set?
    Well, The sound chip in the PSX is actully *COMAPATIBLE* with the SNES one. Sony made them both and one is just a big brother of the other, so the sound data can be directly "ripped" from the rom. (That's why the PSX and SNES version sound exactly the same) Not only that, Minoru Akao, the sound designer, was one of the original R&D guys who came up with Sony's sound system for the SNES. He was then hired by Square and not only did the original sound design for the Chono Trigger ROM, but also did the remake. He knows the system foreward and backwards. Not only that he's the sound designer for 98% of all Squaresoft games.
    The PSX also uses the same high color colordepth format for displaying game sprites. That doesn't hurt either. However the display code is *WAY* different.
    Swapping the rom will break the game. It won't work. It's not an emulator.
    The ROM.BIN *IS* used in the US version. It still "ripps" the grapahics, sound, enemy data, and such in real time. They are exactly the same.
    However the US version ROM is different than the Japanese one.
    Due to the changes in the dialog script, the english dialog script is external to the rom now. (Actually is just a chunk of the US SNES ROM, and the location exacpes me for the moment) The kenerl calls that as opposed to the original data inside the whole Japanese rom.

大意说:
PS版Chrono Trigger里放置原始SFC ROM的作用并非是“模拟器执行ROM”,而是新编写的内核程序+抓取ROM内资源集(地图、敌人数据、音乐等)的方式来实现移植
PS版FF6(4/5)里虽然没有原始SFC ROM,但将ROM里的资源“打散”出来,和CT一样的方式移植


TOP

发新话题
     
官方公众号及微博