I may have found another case of a previously unknown shared engine used by multiple console games.

The azumanga diaoh PS1 game seems to use the same datafiles as the One Piece fighting game

ahh, ALMOST.
Azumanga Donjara Daiou uses APF_v2.0 files, while Shonen Jump's One Piece - Grand Battle uses APF_v1.0 files
ah-ha! but From TV Animation One Piece - Grand Battle! 2 uses the same APF_v2.0 files
and One Piece: Grand Battle for the gamecube uses similarly named files (oga.apf), but inside it says it's an FSM_v1.2 file
I figured this out because the azumanga game has some filesystem code that mentions "HAYASHI". But the only Hayashi on the credits is a Special Thanks to Shigeru Hayashi, who worked on other games by Ganbarion. So I looked up what other games he worked on, and oh look, he did two other PS1 games for Ganbarion.
So presumably Hayashi did the filesystem code for the One Piece games and then it got borrowed by the Azumanga game being made at the same company
oh god this datafile better not be doing what I think it does, where instead of specifying the offset inside the file where a sub-file starts, it specifies the physical location on the disc

oh wow. they messed up their archival tool, so it accidentally included a copy of the game's executable inside the archive.

it's identical to the plain one on the disc that's executed!

interesting. if the APF files are missing from the CD-ROM, instead of loading from them, it tries to request them over the PC link. You know, if you've got a PC hooked up to the parallel port on your PSX?

okay I think I've finally figured out how the APF/APFrs format works: It's one of those bastard archives that don't include explicit offsets, instead each file is located at the previous file's offset + the size.

EXCEPT all files are rounded up to even sector offsets

the same code even works for From TV Animation One Piece - Grand Battle! 2!
although I got confused at TCRF and accidentally discovered a debug menu that's not documented yet:
800612b4 0000 activates the remnants of the debug menu in From TV Animation One Piece - Grand Battle! 2. It doesn't do much compared to the ones in azumanga and Shonen Jump's One Piece - Grand Battle! 1

It sure is nice to be back on a platform where the addresses in the debugger and the Ghidra match up.

YOU HEAR ME, DOS16? NO ONE LIKES YOU

@foone Every time I think it would be cool to crack open a DOS game, then relent a few seconds later because of Intel's awful segment model and Ghidra barely supporting it. Really lets the air out of your tyres.
@moralrecordings @foone I prefer Ida Pro 5.0 for real-mode DOS stuff. It handles segments fairly well, and annotates BIOS/DOS interrupts & IN/OUT instructions with bits of documentation. No automatic decomp, only ASM, but it works pretty well for me.
@foone just makes me think of doing x86 asm in visual studio, where the debugger kinda sorta works, but sees all ints as floats that end in .0000000001, leading to some fun consequences down the line like developers complaining that the debugger says that 3 is not less than/equal to 3, so conditional breakpoints never trigger.
@foone w- rounded to- why aren't they just separate files then?
@alilly game developers consider the filesystem to be damage and route around it
@foone You also read the DVD Video spec? Such a pain...
@foone This post is how I learned that Azumanga Daioh is from 2002 and not 2015 like I initially thought
@ic7 the show ended in 2002! the manga dates back to 1999
@foone, I've been trying to get ahold of the models stored within Azumanga Donjyara Daioh for a while, but the way it stores the file offsets in its archive format sure is something, and I'm not much of an expert in reverse engineering PlayStation titles to do much else. I wonder what else lies ahead that could possibly help with extracting data from the format.
@integerbang well good news: I have that now. My script doesn't extract yet, but it knows where the files are so it's just a matter of hooking it up.
I'll put this up on github so you can look at what I've done, in case you want to reverse engineer the models.