Author Topic: Why no compressed ROM files?  (Read 803 times)

0 Members and 1 Guest are viewing this topic.

Offline Dan Willett

  • Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Why no compressed ROM files?
« on: December 20, 2020, 06:53 AM »
I was wondering why ROM files can not be compressed or be able to use a folder that is compressed on any Mega EverDrive Flash Carts? Emulators can do it, so is it a software or hardware issue causing not being able to do so on a flash cart? I always thought this was a bit strange & never gotten a straight answer why.

Offline Missingno255

  • hi
  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +12/-1
    • View Profile
Re: Why no compressed ROM files?
« Reply #1 on: December 20, 2020, 08:09 AM »
I was wondering why ROM files can not be compressed or be able to use a folder that is compressed on any Mega EverDrive Flash Carts? Emulators can do it, so is it a software or hardware issue causing not being able to do so on a flash cart? I always thought this was a bit strange & never gotten a straight answer why.
In a nutshell: it's a hardware limitation.

Technical Reason: Because the 68000 processor in the Genesis is far too slow to decompress data with modern algorithms with hardware made in 1988. Unless Krikzz finds a way to decompress the files with the ARM processor in the MEDPro cart, it's never going to happen. Even then that might not be fast enough.
Owned Everdrives: Everdrive MD, Mega Everdrive, Everdrive N8, Everdrive GB X5, Turbo Everdrive, Super Everdrive, Everdrive GBA

Misc Flashcarts: SD2SNES

Offline Dan Willett

  • Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: Why no compressed ROM files?
« Reply #2 on: December 20, 2020, 07:02 PM »
Ok, thanks for the detailed info. I always wondered why but now I know it is a hardware limitation.

Offline Sylver

  • Newbie
  • *
  • Posts: 6
  • Karma: +1/-0
    • View Profile
Re: Why no compressed ROM files?
« Reply #3 on: December 23, 2020, 12:03 PM »
For everdrive with a CPLD, maybe that a CPLD based file decompressor could be possible and fast ?
Anyway a CHD decompressor for CDs and a zip decompressor for roms would be awesome on MEDPro!

Offline showergel

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Why no compressed ROM files?
« Reply #4 on: December 31, 2020, 06:44 AM »
One thing to remember is ROMs themselves tend to have encoded/compressed data.  For example, a common compression method used on these cartridge-based systems is RLE (Run-Length Encoding).  This is useful for graphics.  Not everything can be encoded in this manner, like program code.  However, it was one of the many tools developers would use to make the most of limited ROM space. 

An advantage PCs typically enjoy is many orders of a magnitude of available RAM.  It's trivial for a PC to take a zipped rom image, decompress it in RAM, then run an emulator.  With 1MB (8Mbit) on the MED Pro, that's not universally enough space for a run-in-ram approach.  ROMs aren't built with a standard to define data types, just memory addresses and some parts of code expected to be at those addresses.  It would be a large undertaking to find a way to standardize a ROM's format just with the sole purpose of compressing it for low-memory devices.  Given the size of the Genesis/MegaDrive library, it's really cheap to put it all on an SD card.

Now, with Sylver's idea of CHD for SegaCD/MegaCD is a very different idea to use a format that's fundamentally designed to store structured CD sector data.  CHD allows for decompression of required data on-the-fly, which would be ideal for a low-memory device like the MED Pro.

I wrote this to help provide some color to this subject.  Compression in some form was almost always used in the 16-bit era.  But not the type we're generally familiar with / spoiled by modern PCs.  :)

Offline lee4

  • codetype specialist
  • Hero Member
  • *****
  • Posts: 865
  • Karma: +49/-0
    • View Profile
    • gamehacking.org
Re: Why no compressed ROM files?
« Reply #5 on: January 26, 2021, 06:43 PM »
Quote from: krikzz
Any kind of compressed files likely will never be supported
https://twitter.com/krikzz/status/1353646918618984449
ED64 v2.0, 3.0 & X7 | EDMD v3 | MEGAED X7 M15 v2.01 & PRO rev B | TED v2.4 | EDN8 v1.2N & Pro M19 N1 | SED v2.1 | SD2SNES rev E1 & PRO rev.B | EDGB v1.1 & X7 M17 rev B | EDGBA X5 M16 rev A & Mini M19 Rev B
SNES jr | Super NT | Mega SG | Super Retro Advance | SGB v1 | 16bitPocket GBC | PCE+SSD3