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]   Go Down

Author Topic: [Feature Request] Recognize cbr cbz cb7 as archive  (Read 179 times)

rummeltje

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
  • Operating System:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Firefox 77.0 Firefox 77.0
    • View Profile

I understand that this is completely out of scope for normal use of clrMame,
but I would love clrMame to be able to recognize cbr cbz and cb7 as archives and treat them as such.

As a retrogaming enthusiast I have worked with clrMame for Mame Roms, and I know clrMame is a great program.
And as a comicbook collector I think it that clrMame could be the awesome tool in the comicbook department as it is in the rom department.

cbr stands for ComicBook Rar, and are images inside a rar archive, but the extention changed to .cbr
cbz stands for ComicBook Zip, and are images inside a zip archive, but the extention changed to .cbz
cb7 stands for ComicBook 7z, and are images inside a 7z archive, but the extention changed to .cb7
(cbt stands for ComicBook Tar, and are images inside a tar archive, but the extention changed to .cbt) *

*cbt is very rare and not many comicbook readers support it

I and some friend have been already using clrMame to scan the collections of comicbooks of ourselves,
but clrMame does not scan inside inside the archives. It instead treats them as roms.
We want it to scan inside and crc the images, and not just crc the cbr archive as a whole.

All the functionality is already present in clrMame,
except a way to tell clrMame that these cbr / cbz / cb7 / (cbt) comicbooks are archives with renamed extentions.
(If I rename the extention cbr back to rar, clrMame does exactly what I want and crc the images inside the archive)

So, Dear Sirs, Gods of Coding, could you please make an option to give in archive aliasses,
or have clrMame recognize cbr, cbz, cb7, (cbt) as archive natively?
Logged


Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 86
  • Offline Offline
  • Posts: 2760
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 83.0.4103.116 Chrome 83.0.4103.116
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #1 on: 24 June 2020, 07:09 »

hmmm.....if it's just a real zip or a real 7z or a real rar then there might be a chance with some kind of extension alias (tell cmpro that .zip is .cbr). That would be relatively easy I guess....

The problem might be that the used libraries might have additional tests on the filename extension (especially when it comes to split archives...but they might not play a role here). If the files are not only renamed but also used different identifiers inside the archive structure...well..then you might face another problem

I will check what's possible.....do you have some example files by the way?
Logged

rummeltje

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
  • Operating System:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Firefox 77.0 Firefox 77.0
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #2 on: 24 June 2020, 08:16 »

Yes, they are real archives.
Standard, non-split.

example files here:

https://drive.google.com/drive/folders/1zl3c6sL2O3liAtO3lvlYFIuLbZzVnh9K?usp=sharing
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 86
  • Offline Offline
  • Posts: 2760
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 83.0.4103.116 Chrome 83.0.4103.116
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #3 on: 28 June 2020, 18:09 »

Thanks for the files. I've did some tests and yes it works pretty fine and easy when .zip is simply replaced with .cbz alias (same for rar/7z)
What would be more interesting is when you want to support both .zip/.cbz at the same time. So for example rebuilding to .cbz but reading .zip files etc...
That'd require some additional coding since you a) somehow need to define what the prefered writing alias is and b) there are some checks which need to run through all alias then.

Since it's nearly holiday time, I put it on my to do list....but yes, in general it seems to be not too much work....
Logged

rummeltje

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
  • Operating System:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Firefox 77.0 Firefox 77.0
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #4 on: 29 June 2020, 20:59 »

I am really happy that you are seriously looking in to this.

 ;D

Being able to scan the pages and have others rebuild them, would be a leap forward for our comic collectors group.
We could rename all pages to a standard naming scheme, and the cbr / cbz to a standard naming scheme.


Some thing comes to mind though:

1- I vagely recollect that some comics use 1 folder or multiple folders inside the archive.
I don't know if that poses any extra challenges?

2- Input wise, it would be 99 % cbr or cbz
but it would be awesome if a zip / rar / 7z containing the images or folder containing the images would also be possible, so all bases are covered.

3- Output wise :
cbr (rar max compression)
cbz (zip max compression / torrentzipped)
cbz (store)
cb7 (7z max compression / torrent7z)

Most of the comic book scene prefers CBR RAR at max compression, because RAR was traditionaly better at compressing images then ZIP, and they are kind of stuck with that. (Even though 7z performs equally well and the differences with zip are small)

I personaly started prefering CBZ ZIP (store), because it opens much faster on my slower devices.
ZIP is accepted and integrated pretty much everywhere, windows can browse it like a normal folder these days.
and because it's store mode, there's no need for the better compression of 7z / RAR.
With HDD size and price being what they are, I no longer care that much about my collection being 1 TB or 1,1 TB


Enjoy your holidays
And thanks a million already.
« Last Edit: 29 June 2020, 21:03 by rummeltje »
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 86
  • Offline Offline
  • Posts: 2760
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 83.0.4103.116 Chrome 83.0.4103.116
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #5 on: 30 June 2020, 06:58 »

1) folders are supported. They need to be listed in the datfile though. So instead of rom name="1346b.cpu-u25" size="2048" crc=".... you got rom name="my_sub_folder/1346b.cpu-u25" size="2048" crc="....

2) yeah, definetly the better way to simply understand zip and cbz as an alias for it and handling both.....need to think about it a bit...

3) compression settings can be setup in the rar/7z tabs of settings->Compressor. For zip you can define the compression level in cmpro.ini (Packer_Zip_CompressionLevel = 9)


since holiday is just some days away, don't expect anything anytime soon ;-)
Logged

rummeltje

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
  • Operating System:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Firefox 77.0 Firefox 77.0
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #6 on: 01 July 2020, 16:24 »

I've been thinking about this idea for about 8 years, so no need to hurry.

Enjoy your holidays.  ;)
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 86
  • Offline Offline
  • Posts: 2760
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 83.0.4103.116 Chrome 83.0.4103.116
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #7 on: 04 July 2020, 17:43 »

Did I say "do not expect anything anytime soon"? Well....looks like I was wrong...

I did some restructuring of the packer code and actually cmpro is now able to handle anything which is "like 7z/rar/zip" based.
And all at the same time. So cbz, cbr, cb7 isn't a problem....and of course you can think of jar, war etc as well.... ;-)

So where is it? Well, of course I want to test it a bit more so I can't promise if I put out a nightly before my holiday....
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 86
  • Offline Offline
  • Posts: 2760
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 83.0.4103.116 Chrome 83.0.4103.116
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #8 on: 04 July 2020, 19:19 »

https://mamedev.emulab.it/clrmamepro/binaries/cmpro20200704.rar

Beware...this is just a very early test!
You should use a new separate installation for it (going back from it would kill your set compression settings (like rebuilder pack type etc) at the moment, so better use a fresh install ;-) )

By default you of course got rar/7z/zip support.....You can add additional ones by editing cmpro.ini and add/modify:

Packer_ZIP_Alias = .cbz
Packer_RAR_Alias = .cbr
Packer_7Z_Alias = .cb7

The alias settings allow multiple values separated by space, so e.g. Packer_ZIP_Alias = .cbz .jar .war

If you find anything weird, collect and post the quirks....I will look at it after my holiday...
Logged

rummeltje

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
  • Operating System:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Firefox 78.0 Firefox 78.0
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #9 on: 05 July 2020, 08:26 »

You are fantastic.

Downloading it now. Will test over the week and reply my findings back to you.
Logged

rummeltje

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
  • Operating System:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Firefox 78.0 Firefox 78.0
    • View Profile
Re: [Feature Request] Recognize cbr cbz cb7 as archive
« Reply #10 on: 05 July 2020, 13:02 »

1st test seems to be all ok.
Logged
Pages: [1]   Go Up
 

Page created in 0.114 seconds with 22 queries.