News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: What's the meaning of ending bytes in each PS1 mode2 sector?  (Read 219 times)

Metafalica

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
I trying to make PSX CD image repacker for own needs. I need to make it to be free from third-party repackers.
This is the structure schema that I understand from the image.

Other repackers changes that ending bytes when something is repacked, so I need to do the same, but I don't even know what is that and what rules applies to it.

Some real data:

Most of time it looks like something compressed, but rarely is a lot of zeros and few non zero bytes.

theflyingzamboni

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: What's the meaning of ending bytes in each PS1 mode2 sector?
« Reply #1 on: June 22, 2018, 10:43:48 am »
Did you try looking up the answer first? It's described on Wikipedia. The header you're referring to is actually a combination of several different things, and the mess of code at the end is for error detection and correction.

Question though: Why do you need to be free from other ISO rebuilding programs? Do they not do something you need? Programming another one seems like a lot of effort for something that's already been done, unless you just want the experience.

This one was just released: https://www.romhacking.net/utilities/1404/ (says it handles both Form 1 and Form 2)
I've used this one, and it works fine: https://www.romhacking.net/utilities/848/ (though it may not handle Mode 2/Form 2 sectors, I'm not sure)
« Last Edit: June 22, 2018, 11:02:58 am by theflyingzamboni »
ROM wasn't hacked in a day.

STARWIN

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
Re: What's the meaning of ending bytes in each PS1 mode2 sector?
« Reply #2 on: June 22, 2018, 08:17:07 pm »
if you put everything else in its place correctly and leave these spots empty, then this program http://www.romhacking.net/utilities/1264/ will fill them for you. there's source code in there if you really want to see how.

Metafalica

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: What's the meaning of ending bytes in each PS1 mode2 sector?
« Reply #3 on: June 23, 2018, 03:42:19 pm »
Thanks everyone for the answers. I already solved my issue by leaving these things untouched at rebuilding. CD-burning device corrects them anyway, while emulators ignores it. So I just forget about it.