EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: 1 [2] 3 4   Go Down

Author Topic: Logging of Rebuilt Source Files  (Read 88640 times)

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
Re: Logging of Rebuilt Source Files
« Reply #20 on: 20 July 2014, 19:12 »

The nes header file is like 8 years old...erm...erm...all I remember is that a clean NES header is 16 bytes long starts with 4E45531A don't ask me where the zero bytes come from...could be based on some old discussion with Cowering....as I said...8 years....

if you google the iNes header format you find:

0-3: Constant $4E $45 $53 $1A ("NES" followed by MS-DOS end-of-file)
4: Size of PRG ROM in 16 KB units
5: Size of CHR ROM in 8 KB units (Value 0 means the board uses CHR RAM)
6: Flags 6
7: Flags 7
8: Size of PRG RAM in 8 KB units (Value 0 infers 8 KB for compatibility; see PRG RAM circuit)
9: Flags 9
10: Flags 10 (unofficial)
11-15: Zero filled


so actually only byte 11 to 15 should be tested against 0
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Windows XP Windows XP
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #21 on: 20 July 2014, 19:42 »

Hi Roman,
Yes thanks, I had a play I understand it much better now.
This rule works fine for creating a dat (Source files headered) & scanning a set stored (without any headers)
Code: [Select]
<?xml version="1.0"?>
<detector>
  <name>iNES Header Skipper</name>
  <rule start_offset="10">
    <data offset="0" value="4E45531A"/>
  </rule>
</detector>
I found for my needs this works perfectly :)

As you pointed out iNES 2.0 Headers do use bytes in range 08 to 0C

And because some header polluted files do exist (such as DiskDude!) which uses bytes all the way to 0F
Then this check can never exist.
    <data offset="8" value="0000000000000000" result="true"/>
If source files being datted contained polluted headers (such as DiskDude!) then the resulting dat would be a mix of files some with 'whole file' hashed and the rest as they should be (hash = whole file minus first 16 bytes)

I get it now, sorry to disturb you :)
Thanks for the response

« Last Edit: 20 July 2014, 19:45 by oxyandy »
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Mac OS X Mac OS X
  • Browser:
  • Safari 7.0 Safari 7.0
    • View Profile
Re: Logging of Rebuilt Source Files
« Reply #22 on: 20 July 2014, 20:13 »

feel free to provide a new better xml.....
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Windows XP Windows XP
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #23 on: 21 July 2014, 02:40 »

feel free to provide a new better xml.....
Hmm, well in all honesty I do see people get confused (often) with the
No-Intro NES dat and it's usage with CMP.
However, as I have seen the No-Intro provided Header Skipper is flawed.

So if CMP was to come with a NES header skipper XML
Then it would have the name.
no-intro_NES.xml
Code: [Select]
<?xml version="1.0"?>

<detector>

  <name>iNES Header Skipper</name>

  <rule start_offset="10">
    <data offset="0" value="4E45531A"/>
  </rule>

</detector>

And you would dump the one you currently provide ;)

EDIT: From specs you provided above
"9: Flags 9"
I confirmed Nestopia uses "09" bits 01 as PAL & 00 as NTSC
« Last Edit: 21 July 2014, 03:04 by oxyandy »
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Windows XP Windows XP
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #24 on: 22 July 2014, 03:39 »

Hi 'again' Roman,
(For anyone reading this should be done with CMP closed)
In CMP_Program_Folder\settings\
1. I opened all settings_files with Notepad++
Batch replaced
Rebuilder_CreateLogFile = off
with
Rebuilder_CreateLogFile = on

Rebuilder_AppendLog = off
with
Rebuilder_AppendLog = on
And
Rebuilder_Logfile = \n
Rebuilder_Logfile = Rebuilder_Logfile.log\n
(Logging in CMP_Program_Folder\ is just fine for me, but I really don't want all DATs using same log file.)
= quick & dirty :)

SO, what I ask is there some kind of string I could use so logs are created per Dat_Name
as in Rebuilder_Logfile = %Dat_Name%.log  ??

I know this is a quick way to enable 'Global Logging' - is there some other method ?

2. I messed up - I either forgot, had 2 instances of CMP open - when I closed (one or the other) it over-wrote the settings etc.
But anyway I did a Rebuilder run, thinking logging was enabled and well, it wasn't, oops, hehe.
So is it possible default "Global Logging" logs written by "Dat Name.log" ?

Thanks
Oxy

EDIT or maybe even
as in Rebuilder_Logfile = %timestamp%_%Dat_Name%.log
or (Specifically to deal with 2 instances of CMP being open simulataeously using same DAT)
Rebuilder_Logfile = %sequential_numbering%_%Dat_Name%.log
001_Dat_name.log
002_Dat_name.log
So if exist (002_Dat_name.log)
log_name = 003_Dat_name.log
would do fine too;)
« Last Edit: 22 July 2014, 04:06 by oxyandy »
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
Re: Logging of Rebuilt Source Files
« Reply #25 on: 22 July 2014, 07:08 »

hmm...global logging...hmmm....I will think about it
Logged

Zandro

  • Member
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 40
  • Operating System:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 24.0 Firefox 24.0
    • View Profile
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Windows XP Windows XP
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #27 on: 31 July 2014, 18:35 »

hmm...global logging...hmmm....I will think about it

Thanks Roman,
Have been away on holidays myself ;)
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Mac OS X Mac OS X
  • Browser:
  • Safari 7.0 Safari 7.0
    • View Profile
Re: Logging of Rebuilt Source Files
« Reply #28 on: 31 July 2014, 19:06 »

thinking about a good way for it. not yet sure if it it should be a batcher option or just some variable logfile naming based on the dat name or so.

....or do you want one big file for all.... nah...

ideas are welcome
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Linux Linux
  • Browser:
  • Safari 4.0 Safari 4.0
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #29 on: 31 July 2014, 19:53 »

Quote
logfile naming based on the dat name
Would be great.
However, if I have 2 instances of CMP open using the same dat file, then using same log_file is a problem.
So sequential numbering ?
001_Dat_name.log
So if exist (001_Dat_name.log)
log_name = 002_Dat_name.log
etc

I was thinking %Date_Time_Stamp%_Dat_Name.log
However - really not needed - and they often don't sort well. So nah.

Yes as a Batch option (like "Always Compress Files" works now) would work, too
However, I see that as just a distraction for the 'Regular User'
So nah, again.

So I conclude a line in cmpro.ini - which would need to be manually edited.
Code: [Select]
Pro_GlobalLogging = OnLogging by %Dat_File_name%
Then when I load a 'New Dat'....
No need to remember to enable logging (or set a log file name)
And ... if  we can do what is currently not possible, allow for 2 instances by sequential number.
I know this would also mean a new log would be made for each time that DAT is loaded and that may very well be useful too :)
001_Dat_File_Name.log
002_Dat... etc
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
Re: Logging of Rebuilt Source Files
« Reply #30 on: 01 August 2014, 15:59 »

ah..multiple instances of cmpro...users shouldn't use that ;-)
well....I will do some more thinking...guess I have time next week for this...


the current wip whatsnew list is:

misc: corrected handling of sets with only bios roms and sample clone (MAME 154 gp110 sets)
misc: dir2dat not always writes cr/lf as line delimiter (deprecated format only)
misc: optimized general hash calculation / file read routine
misc: removed crc=-1 from suspicious checksum check
misc: rebuilder log show EXISTS entry in case of an already rebuilt file
misc: changed nes header file to be a bit less strict
misc: updated to latest ziparchive class lib, unrar dll



....and I wanted to do some work on
better uncompressed sets support (some hash caching)
h/r/s attribute warnings saved in log
..and you log thingie....
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Linux Linux
  • Browser:
  • Chrome 11.0.696.34 Chrome 11.0.696.34
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #31 on: 01 August 2014, 18:02 »

misc: optimized general hash calculation / file read routine
Nice tweak, thanks

Speaking of 'uncompressed sets' CMP has a bug..
I have known for a long time..
When Rebuilding from Drive A: to Drive B: & the destination file already exists. [uncompressed]
CMP throws an error.
Quote
Want to Stop ?
Error while rebuilding:
A:\Some_File.ext
to
B:\Some_File.ext
Do you want to stop?
It's like CMP does not know the file is already present at the Destination.
Understand ?
I could make an example Dat & Files (If needed)
 ;D

Edit: Drive A: to Drive B:
Drive letters just example of course..
« Last Edit: 01 August 2014, 18:05 by oxyandy »
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Linux Linux
  • Browser:
  • Chrome 11.0.696.34 Chrome 11.0.696.34
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #32 on: 01 August 2014, 18:57 »

Speaking of 'bugs..'
I have also had CMP crash (quite a bit), while "Redrawing last Scan Result"
I will keep on eye on this, it hasn't been happening with previous builds, just one of the most recent ones.
It has only been with the one dat which I used for the recent MAME update (I think)
BUT, I haven't used the newest build much as I have been away on holiday.
So, again I will persevere and let you know.
cmpro_32.exe [crc32 4CF91535] from cmp20140718.rar



 :-X



« Last Edit: 02 August 2014, 00:54 by oxyandy »
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Linux Linux
  • Browser:
  • Chrome 11.0.696.34 Chrome 11.0.696.34
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #33 on: 02 August 2014, 01:16 »

Ok Roman,
Great, I found a scenario where this crash is 100% repeatable.
If I open CMP. Load the DAT and go to Scanner.
CMP loads fine, without a crash. "Redrawing last Scan Result" works. (I have a single unneeded file)

Now I open CMP load the DAT, go to Rebuilder, when I use the "Jump to Scanner" button
(Bottom Right Hand Corner of Rebuilder Window)
It crashes every single time while "Redrawing last Scan Result"
Correction: (Nearly every single time)
I guess I should try reduce down the CMP Program Folder, and send you the whole thing 'as is'

EDIT: Ok done that, CMP program folder reduced,
crash still occurs while switching between "Scanner + Rebuilder"
Going to Boot over to Win7 X64 and try same CMP folder there.

EDIT_2:It did not happen there  :'(
I will just ignore it, see how things work out on next 'Official Release' - doesn't stop me using CMP.


« Last Edit: 02 August 2014, 02:37 by oxyandy »
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
Re: Logging of Rebuilt Source Files
« Reply #34 on: 02 August 2014, 12:25 »

hmm...don't happen here (win7 64bit)...guess I have to run a virtual xp machine....


...no luck in 32bit and virutal xp either....
« Last Edit: 02 August 2014, 12:49 by Roman »
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Linux Linux
  • Browser:
  • Chrome 11.0.696.34 Chrome 11.0.696.34
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #35 on: 02 August 2014, 12:55 »

Roman,
Please ignore Reply #32 & #33 - don't waste any time on my XP *only* crash (for the moment)
Maybe it will go away with next build ? Maybe not.. Is not a big issue to me.
(Plus I have a CMP program folder, which *repeats* the crash - I can upload this)

Reply #31 does mention a bug with Uncompressed sets though..
Time would be better spent looking into that, and your existing list ;)
Thanks anyway.
« Last Edit: 02 August 2014, 13:02 by oxyandy »
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Mac OS X Mac OS X
  • Browser:
  • Safari 7.0 Safari 7.0
    • View Profile
Re: Logging of Rebuilt Source Files
« Reply #36 on: 03 August 2014, 08:07 »

nah a crash comes first :-)

most likely a not initialized variable or something. something which randomly messes up the memory.  I will have a look
Logged

oxyandy

  • Member
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 269
  • Operating System:
  • Linux Linux
  • Browser:
  • Chrome 11.0.696.34 Chrome 11.0.696.34
    • View Profile
    • .
Re: Logging of Rebuilt Source Files
« Reply #37 on: 03 August 2014, 09:21 »

Quote
nah a crash comes first :-)

OK then, in another attempt to make your life just that 'little bit' easier..
Toggle between Rebuilder <> Scanner with this dat loaded... (Sometimes it takes upwards to 5 toggles Rebuilder <> Scanner  <> Rebuilder)
http://speedy.sh/GYxzM/CMP-CRASH-TEST.7z
You may need to manually edit the data before you open CMP so 'ROM path exists'.
Currently it expects Q:\MAME - ROMs (v0.154)\
Sure an empty folder will work..
While Re-drawing Last Scanner Result <CRASH>
« Last Edit: 03 August 2014, 15:32 by oxyandy »
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
Re: Logging of Rebuilt Source Files
« Reply #38 on: 03 August 2014, 16:31 »

hmmm..no luck yet....switched like 40 times....

guess I will look at the source instead ;-)
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
Re: Logging of Rebuilt Source Files
« Reply #39 on: 03 August 2014, 19:33 »

...and regarding your other remark about unpacked sets...can't repeat that either...

Simply used a decompressed MAME set (have the same decompressed on in source and destination rebuilder folder)...ran rebuild....and all files were skipped...no prompt...everything was fine....
Logged
Pages: 1 [2] 3 4   Go Up
 

Page created in 0.132 seconds with 22 queries.

anything
anything