PDA

View Full Version : Pj's rom browser



Doomulation
February 13th, 2002, 15:00
Can anyone help me with this?
I've tried to figure out how Zilmar knows if the zipped games are supported. I have looked at the pj source, but I still can't figure it out.
By what I've found -- I've found some very instresting things -- Pj does _NOT_ read the CRC from roms which are zipped. It only reads the size of it unzipped.
But in order to know if it's supported or not, it must know CRC1 & 2 and the region of the rom.
However, how does it do so? I also know that it does not look in the filename, since I tried to rename it.
Do any of you know? Or could anyone of you look at the source to know? I know it's in RomBrowser.c.

Also, I seem to have problems to compile the code. First off, I'm missing "Reverse code.h" I think. And then there's a standard-library which I'm missing. I'm using c++ 5.0. It also complains of an undeclared type. ???

Hacktarux
February 13th, 2002, 16:49
I think you need visual C++ 6 to compile this.
And comment the line that include "reverse code.h", i think this is an old file that is not used now.

linker
February 14th, 2002, 02:34
You need the VC6++ Professional or the Enterprise edition (it doesn't compile with the Standard edition for some reason). Also install the latest patches.

And doomulation:.. please don't doom us all :)

Greevy
February 14th, 2002, 02:44
Doomulation:

As I know, PJ64 uses the zlib library to support zipped roms.
(No need to download anything, everything is included.).

zlib Home Site (http://www.gzip.org/zlib/)

I'm pretty sure that PJ actually unzips zipped roms as you load them then place the rom in a temporary directory where it load it and then delete it after you close the emulator.
(Might even delete the temporary file after you stop to play the game).

I guess that would explain why it doesn't read the CRC from zipped files.

I might be wrong though.

As for the missing file.. Been playing with the PJ source for a while and never heard of it !
I'm using Microsoft Visual C++ Professional Edition with the latest Service Packs and I have Windows98SE French as my OS.

Good luck !
Greevy.

zilmar
February 14th, 2002, 04:22
Originally posted by Doomulation

By what I've found -- I've found some very instresting things -- Pj does _NOT_ read the CRC from roms which are zipped. It only reads the size of it unzipped.


Well if you can read the code well enough to know what it is supposedly not doing .. then you should have no need to ask this question as you should have more then enough programming skills to work it out from the source.

Doomulation
February 14th, 2002, 13:15
Erm... well, Zilmar. I suppose I could find out. The problem is though, that I've been looking for a pretty long time, and I can't compile the source, which would help pretty much.

And for you Greevy:
Unzipping all roms would be a nightmare! Even uzipping a 50 mb rom on my computer takes ages. No, I don't think it does actually unzip them to read the CRC. It does however unzip them when starting to emulate it. I know that pretty sure.
And it must have the CRC when showing the browser to know if it's compitable.
And as for the file, it's named "Reverse Code.h". The reason maybe you never heard of it, is probably because those lines are commented out.

linker
February 15th, 2002, 03:42
Originally posted by Doomulation

And as for the file, it's named "Reverse Code.h". The reason maybe you never heard of it, is probably because those lines are commented out.

I told you - get the vc++ v6.0 Professional. It'll be ok then.

Remote
February 15th, 2002, 03:55
Originally posted by linker


I told you - get the vc++ v6.0 Professional. It'll be ok then.

If cash is the biggest issue for why you are stuck with an older version, go for the standard or educational version, which contains the complete Visual Studio package although you are not allowed to distrubute programs compiled with the educational version. Pick up MSVC++ 6.0 standard, which last time I checked, only will set you back by a good sixtifive US dollars, compared to all the Benjamin Franklin's you will be spending on the professional version.

Doomulation
February 15th, 2002, 14:03
Whoa! That's not very much. I have been trying to get 6.0. I will try to get it, too. By money or not.
But that's not the issue. So let's skip it.

linker
February 17th, 2002, 03:57
Originally posted by Remote


If cash is the biggest issue for why you are stuck with an older version, go for the standard or educational version, which contains the complete Visual Studio package although you are not allowed to distrubute programs compiled with the educational version. Pick up MSVC++ 6.0 standard, which last time I checked, only will set you back by a good sixtifive US dollars, compared to all the Benjamin Franklin's you will be spending on the professional version.

Pj64 doesn't compile with vc++ 6.0 Standard Edition. I tried. You can compile it with enterprise or pro edition. Dunno for educational, but i think that it is the same as standard.

Doomulation
February 25th, 2002, 07:41
Awright... I'm trying to get VC++ 6.0 standard.
Anyway, can you point out where the main function of the program is? Y'know, where the execution starts. That would help out a lot.
But I'm still confused on the part on how the emulator gets the CRC... but it shouldn't be a problem, since I already am on track for a code to solve this. Aw, yeah, right. It's true! :D

Doomulation
February 25th, 2002, 17:49
Mmkay... this is what I got when I compiled the Pj source with visual c++ 6.0 standard edition. What's wrong now? ???

--------------------Configuration: Project64 - Win32 Release External--------------------
Compiling resources...
Compiling...
Command line warning D4002 : ignoring unknown option '/Ob2'
BreakPoints.c
CPU Log.c
Logging.c
mapping.c
r4300i Commands.c
r4300i Memory.c
r4300i Registers.c
TLB Display.c
Cheat.c
Main.c
Profiling.c
RomBrowser.c
Settings Api.c
Settings.c
Win32Timer.c
zip.c
Eeprom.c
FlashRam.c
Mempak.c
Sram.c
CPU.c
C:\Documents and Settings\patrick\Lokala inställningar\Temporary Internet Files\Content.IE5\ZU0ZBXSH\Pj64%20Build% 2052%202001-12-22[1]\CPU.c(148) : warning C4013: 'CloseMempak' undefined; assuming extern returning int
DMA.c
Exception.c
Interpreter CPU.c
Interpreter Ops.c
Memory.c
pif.c
Recompiler CPU.c
Recompiler Fpu Ops.c
Recompiler Ops.c
Registers.c
rom.c
Sync CPU.c
TLB.c
Plugin.c
x86 fpu.c
X86.c
Compiling...
Command line warning D4002 : ignoring unknown option '/Ob2'
unzip.c
Linking...
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
pif.obj : error LNK2001: unresolved external symbol _LogOptions
Release_External/Project64.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Project64.exe - 2 error(s), 4 warning(s)

Doomulation
February 25th, 2002, 17:56
Mmkay, it was copiled on standard. I'll soon try to compile on enterprise. If anybody knows how to compile it on standard, then please tell me.

Doomulation
February 25th, 2002, 20:43
YES! I worked! I could compile it on enterprise edition!
Thanks for the help guys.

Slougi
February 26th, 2002, 00:56
Hehe, I have never coded c++ and helped you with that libc thing :P

Doomulation
February 26th, 2002, 02:07
BAH! I didn't need your help with that. It compiled anyway. And I didn't manage to figure out what to change ???

scaw
February 4th, 2007, 00:30
Mmkay... this is what I got when I compiled the Pj source with visual c++ 6.0 standard edition. What's wrong now? ???

--------------------Configuration: Project64 - Win32 Release External--------------------
Compiling resources...
Compiling...
Command line warning D4002 : ignoring unknown option '/Ob2'
BreakPoints.c
CPU Log.c
Logging.c
mapping.c
r4300i Commands.c
r4300i Memory.c
r4300i Registers.c
TLB Display.c
Cheat.c
Main.c
Profiling.c
RomBrowser.c
Settings Api.c
Settings.c
Win32Timer.c
zip.c
Eeprom.c
FlashRam.c
Mempak.c
Sram.c
CPU.c
C:\Documents and Settings\patrick\Lokala inställningar\Temporary Internet Files\Content.IE5\ZU0ZBXSH\Pj64%20Build% 2052%202001-12-22[1]\CPU.c(148) : warning C4013: 'CloseMempak' undefined; assuming extern returning int
DMA.c
Exception.c
Interpreter CPU.c
Interpreter Ops.c
Memory.c
pif.c
Recompiler CPU.c
Recompiler Fpu Ops.c
Recompiler Ops.c
Registers.c
rom.c
Sync CPU.c
TLB.c
Plugin.c
x86 fpu.c
X86.c
Compiling...
Command line warning D4002 : ignoring unknown option '/Ob2'
unzip.c
Linking...
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
pif.obj : error LNK2001: unresolved external symbol _LogOptions
Release_External/Project64.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Project64.exe - 2 error(s), 4 warning(s)


C:\Documents and Settings\patrick\Lokala inställningar\Temporary Internet Files\Content.IE5\ZU0ZBXSH\Pj64%20Build% 2052%202001-12-22[1]\CPU.c(148) : warning C4013: 'CloseMempak' undefined; assuming extern returning int

Add prototype to mempak.h.
void CloseMempak (void);


LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
pif.obj : error LNK2001: unresolved external symbol _LogOptions
Release_External/Project64.exe : fatal error LNK1120: 1 unresolved externals

In logging.h find hte line that reads

//extern LOG_OPTIONS LogOptions;
extern LOG_OPTIONS LogOptions;

change to

//extern LOG_OPTIONS LogOptions;
LOG_OPTIONS LogOptions;

Should compile. When you start it up, it will give you an error stating that you GFX file won't work, go to Options>Settings>Directories of the program and change the plugins directory to where the proper plugins are located. Then set the plugins you wish to use and everything should work okay.

_Chrono_
February 4th, 2007, 01:30
you are aware that this thread is 5 years old....

zaba_3
February 4th, 2007, 02:16
New gravediggin record?

Iconoclast
February 4th, 2007, 02:22
Uhh...nope?

Bah. This whole, no reviving dead threads thing, is really just a stupid case of paranoia. Who cares? Maybe, there's a five-year-old thread about where to download MINIUSF files? But then, five years after the thread was started, someone wants to announce a new and better source of these files? Why start a new thread based on the same subject?

Sometimes, you guys are too conservative. There is nothing wrong with reviving dead threads! Unless, of course, you say something totally stupid. I mean, so what if you see the same thread from five years ago at the top of the New Posts search page? Does it really matter?

Clements
February 4th, 2007, 02:42
Reviving long-dead threads is annoying in most cases. This particular thread is one of those cases. Doomulation almost certainly no longer has the problem as stated in the OP after 5 years, so any reply now is no longer relevant. Thread necromancy is considered poor 'netiquette' in almost every popular message board. When clicking the new posts option, this thread will be at the top and push down legitimate threads. Always check the date before posting in a thread. Serial offenders have been banned for this in the past. The rule we have in place is not going to change.

See also here:

http://en.wikipedia.org/wiki/Thread_necromancy

Iconoclast
February 4th, 2007, 02:52
Unreasonabily bumping threads, whether old or new, is very different from having something good to say to an old thread and replying to that. What you're basically saying is, it's okay for a young thread to be bumped to the top of the New Posts page, with a simple reply like "Interesting...I never knew that. Thanks," but not okay for some additionally helpful information, for future reference, to be posted in an old thread? I mean, you may as well close every single thread that's x months old with a paranoid rule such as this.

Cyberman
February 4th, 2007, 02:53
It's not a record but to keep it simple, don't do this. Answering a question 5 years old is like digging through a garbage dump. In any case I'm closing the thread as reviving a thread like this is likely more an opps than anything. Thread is long burried since I'm sure Doom has long ago got this working or droped it to begin with. :)

As for what you said Iconclast, you aren't a mod here, keep that in mind. There are very few instances when reviving a thread older than a year is OK. We haven't closed old threads because we thought people had enough sense to know when to not reply to one.

Cyb