Author Topic: the source code for MD 3in1 Myth Cart menu v2.01  (Read 5893 times)

0 Members and 1 Guest are viewing this topic.

Online Dr.neo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3467
Re: the source code for MD 3in1 Myth Cart menu v2.01
« Reply #30 on: October 21, 2009, 08:28:33 AM »
In my world,have 0 and 1 only ......Matrix World......

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1491
  • Just a coding machine.
Re: the source code for MD 3in1 Myth Cart menu v2.01
« Reply #31 on: October 21, 2009, 11:10:52 AM »
Yeah i forgot about the 1m limit and you have mentioned again.Sorry  ~sm-34.gif~ .

But i guess the division in blocks should be fine.
We can limit the compression of course to only roms that have size >= 1024K(-->or 512K)  and simply divide large roms by 512K(-->or 256K).

The buffer can be padded like this :
-----non compressed area-----
[save type]
[block count] --->0 = uncompressed
[rom length]
[cheat count]
-----compressed area-----
[cheat adress / code]
[blocks]
-----end-----------

We should compress all files, not just big ones. If a rom is smaller than the block size, that's fine! It just means it'll be compressed/decompressed all at once. When you compress something in blocks, it just means that if (for example) it's 1MB and the block size is 256KB, that you compress the first 256KB, write that data, compress the next 256KB, write that data, compress the next 256KB, write that data, then compress the last 256KB and write that data.

I'd say leave the cheat header uncompressed as it'll be small anyway. Then follow that with the compressed size of the following block (zero if done), followed by the compressed data. Something like that


Quote
By the way , are you going to write the decoder to raw 68K code? If yes then maybe you should pick an easy and effective algorithm  ~sm-34.gif~ ~sm-34.gif~

Yes, as I mentioned before,  the position independence sort of forces this to assembly, so the decompression code will be assembly too. I was thinking of something like lzh.

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2095
Re: the source code for MD 3in1 Myth Cart menu v2.01
« Reply #32 on: October 21, 2009, 02:40:40 PM »
We should compress all files, not just big ones. If a rom is smaller than the block size, that's fine! It just means it'll be compressed/decompressed all at once. When you compress something in blocks, it just means that if (for example) it's 1MB and the block size is 256KB, that you compress the first 256KB, write that data, compress the next 256KB, write that data, compress the next 256KB, write that data, then compress the last 256KB and write that data.

I'd say leave the cheat header uncompressed as it'll be small anyway. Then follow that with the compressed size of the following block (zero if done), followed by the compressed data. Something like that


Yes, as I mentioned before,  the position independence sort of forces this to assembly, so the decompression code will be assembly too. I was thinking of something like lzh.

Oh okay! I thought about having at least 4bytes describing the save type & the count of blocks so it can easily support both compressed& uncompressed roms.

When you're about to add this functionality let me know!
 ~sm-42.gif~