Author
|
Topic: So I took a look at Geiger's Snes9x. (Read 4962 times)
|
KingMike
Guest
|
|
« Reply #45 on: October 02, 2006, 11:29:00 pm » |
|
Even more frightening: I discovered that Bongo's recompression routine functions almost identically to the one I originally wrote for Sylvanian Families 5 and repurposed for Patlabor. I recycled my graphics compression tools for Namco's Nadia game for Genesis, to use on Jelly Boy 2 for SNES (by Game Freak and Sony). All I had to do was change the decompressed size to little-endian.
|
|
|
|
Ryusui
Guest
|
|
« Reply #46 on: October 02, 2006, 11:37:53 pm » |
|
See, that's the thing I love about LZ. The Compression doc won't tell you this, but its evil secret is that if you put Distance as 1 and Length as the number of times you need the preceding byte copied, it works just like RLE.
EDIT: *shoots himself, shoots himself some more and then keeps on shooting*
All this freakin' time. Ever since I first found compression in this game, I was fully expecting to find even the script compressed.
Guess what: it's not. The problem is, I should have known that already.
I made a table for it years ago.
That's right, back in the caveman days when I was breaking G Gundam's knees with absolutely no idea who Schwartz Bruder was (and I still regarded Sylvanian Families as being Maple Town's "inferior clone", if I had heard about it at all), I made a table for Patlabor, probably using my crappy old romaji method, long before the idea that I could thwart compression (let alone implement a VWF) ever popped into my head. How I forgot this simple fact, I have no clue, but I've had a fair bit of the work already done for me. Hopefully I can salvage my old table and make the script extraction process a breeze.
...You know, it would be infinitely appropriate if I implemented some kind of DTE or other script compression into this game. ^_^
EDIT #2: Well, what a surprise. It's not quite as prehistoric as I feared: I last updated it May 30th, 2005...conveniently, shortly before I started work on SF1. ^_^; Which would also have been after I made an attempt on SF5.
Anyway, the important thing is, it seems I rewrote it for use with WindHex after all. The whole thing is in Shift-JIS format; problematic if I want to use Atlas, but on the shining upside, I can now make my own insertion/extraction tools.
...I'm probably being premature here, but I think I'm slowly turning into an expert here. And I don't have a single release under my belt. XD
|
|
« Last Edit: October 03, 2006, 12:44:39 am by Ryusui »
|
|
|
|
Kitsune Sniper
Guest
|
|
« Reply #47 on: October 03, 2006, 02:28:03 am » |
|
So uh, do I go on with the Patlabor title screen or not?
|
|
|
|
byuu
Guest
|
|
« Reply #48 on: October 03, 2006, 10:03:17 am » |
|
Wasn't there a comment on nesdev about loading & saving at certain points in time, and then emulating up to the actual moment when the user hit the save button? Two major problems here: 1) The overhead of constantly saving states in the background would choke the emulator speed even more. Conversely, if I take snapshots less frequently, then loading savestates will take that much longer. I doubt the user will be willing to tolerate 1+ second delays (though the alternative of no savestates is certainly much worse). After taking the snapshot, I would then have to keep a log of keyboard presses to simulate a series of events. This would add a constant overhead of logging this data nonstop while the emulator is running. 2) There's still the problem of getting to a point where a savestate can be captured at all. bsnes has three active threads at this time (core, sCPU and sSMP). In the future, it will also have sPPU and sDSP. So, ultimately, I will have to capture a state when all five threads are at a point where I can safely enter the routines from the start of their functions, with no disruption. While we can get into all kinds of theoretical arguments regarding this, I really don't think all threads will align in such a way that none are "in the middle of doing something" at any point in time to conveniently take a snapshot. Doing this with just the three threads I have now, however, shouldn't be too bad. I'd probably only miss a few opcodes, which could be corrected with your "save prior and catch up on load" approach mentioned above. Which is very clever, nonetheless. It would work great if there were only two threads to worry about Let me explain the situation a little better... let's say you wait until a CPU opcode edge, no DMA is running, and no interrupt is executing. You're at a safe point to restart the CPU thread. However, the PPU is right in the middle of a scanline render. You still have a good half a scanline worth of instruction code to execute before you reach a safe resume point (start of a line, let's say). Your SMP is in the middle of an opcode execution as well. So, what do you do? Run the SMP until it's at a safe opcode edge. Whoops, now your CPU is in the middle of an opcode, and your PPU is still in the middle of a function. And now your DSP thread is also in the middle of generating the next sample. It's impractical to wait for all to align. It could theoretically never happen with the right code in place. Now, the obvious next question is, "why not add more safe return points?" Simple. Each one is very costly to performance and code clarity. If, for example, you want to add more than just "between opcode" points to your CPU core, that means you have to split your CPU core into a cycle-based core, and split your DMA routine to transfer one byte at a time and return. There's a 60% speed drop in your CPU core alone (~20% total speed hit), and now you basically have a cycle CPU core. That's still not good enough for resuming between bus accesses. So split that in half again, now you have a 40% total emulator speed hit, and your code looks like spaghetti, but now you can basically resume at any point in CPU operation. However, the glaring problem here, even if we assume this is practical, is that at this point, there's no need for having additional threads! You've basically negated all benefits to running separate threads concurrently, or in parallel, like the real system does. For the same reasons a copier cannot take an accurate savestate on real hardware, bsnes cannot take an accurate savestate during emulation.
|
|
|
|
Suzaku
Guest
|
|
« Reply #49 on: October 03, 2006, 10:18:24 am » |
|
Personally, I'd prefer having a totally hardware-accurate SNES emulator to one that is mostly accurate and runs far slower, but can save-state. The only time I really use save states are while I'm translating something, and in that case I can use other emulators for that. I want just one SNES emulator that is hardware-perfect, or as close as it's possible to get with emulation. That's what I want to play games on, and to test to make sure everything is running/displaying correctly with a patched ROM.
bsnes has the opportunity to do something that no SNES emulator has ever done before--be a REAL system emulator. I'd hate to see that compromised simply to add the use of save-states. And since it's already a resource-intensive program, I'd also hate to see a major increase in overhead just to implement something like a save state.
In my opinion, bsnes should focus solely on the same functionality that a real SNES provides, and emulate that as closely as possible. Once that's done, then maybe look at some optional functions. If they can be implemented without breaking the emu or hosing performance, great. If not, then scrap 'em.
|
|
|
|
Nightcrawler
Guest
|
|
« Reply #50 on: October 03, 2006, 01:37:53 pm » |
|
I generally agree with Suzaku and that's why I stated BSNES caters to a different userbase than ZSNES earlier.
As far as savestates on the real hardware. You know, my UFO takes some fairly decent savestates. Most of the time any issues get resolved exiting or entering an area and sometimes, there's little to no noticeable issues at all. That's just my observation since it was brought up. I'm not saying you should or shouldn't add savestates nor how to do it.
|
|
|
|
Ryusui
Guest
|
|
« Reply #51 on: October 03, 2006, 01:40:35 pm » |
|
So uh, do I go on with the Patlabor title screen or not? Not quite yet. I'd like to put a stake through the heart of the tilemap compression while I'm at it. One minor quibble worth noting: in the character select screen, Noa's backup is identified as "Asuma Sinohara", but since the name already takes up an entire line of its little databox, should I just leave it as-is and call him by the proper romanization of "Asuma Shinohara" everywhere else, or should I grapple with what is probably most undoubtedly another compressed graphics/tilemap double-decker and find some way to, say, hyphenate it to fit? As for the title screen itself, I'm pretty much satisfied with the Patlabor logo that's already there. It's the "The Mobile Police" part that I'd like to add, and seeing as how I suck at working with italics, I guess I can give you that part. Naturally, I'd like the end result to resemble the official logo as much as possible...as for the palette, what kind of reference do you need? I can provide the uncompressed graphics and a palette in .ZST format... EDIT: Even without the shadow effect, the plain logo still looks pretty badass on the title screen: [attachment deleted by admin]
|
|
|
|
Kitsune Sniper
Guest
|
|
« Reply #52 on: October 03, 2006, 02:29:49 pm » |
|
Well, as I mentioned before, the English Patlabor logo on the game is the same as the official one (except the official one is white). I can probably adapt "The Mobile Police" based on the cover you provided earlier and any other official artwork I can find.
Now, in regards to Asuma's name... it's supposed to be 'Shinohara'. Several backgrounds in the series have the name as Shinohara (since Asuma is the son of the owner of Shinohara Industries, who manufacture the Police Labor AV-98 Ingram models used by Special Vehicles Section II) so the name should be that. But you know, some Japanese don't write down the 'h' in shi, so who knows. I vote for changing that to Shinohara. :angel:
Just send me a palette I can use and I'll see what I can do.
|
|
|
|
Ryusui
Guest
|
|
« Reply #53 on: October 03, 2006, 02:53:16 pm » |
|
I love compression. 268K worth of ZST and a 15K logo in Mode 7 format compressed down to 64K.
Load the SMC in Tile Molester, set it to 8BPP Linear mode, import the palette from the ZST and away you go.
|
|
|
|
byuu
Guest
|
|
« Reply #54 on: October 03, 2006, 03:09:19 pm » |
|
As far as savestates on the real hardware. You know, my UFO takes some fairly decent savestates. Most of the time any issues get resolved exiting or entering an area and sometimes, there's little to no noticeable issues at all. That's just my observation since it was brought up. I'm not saying you should or shouldn't add savestates nor how to do it. Would you really want bsnes savestates that work "most of the time"? Because I could do that. I could just disable synchronization and run each component up until a safe syncing point. But the problem is, resuming will not be accurate. I doubt it would cause much trouble, but since it's a difference from the real system, it would be possible to crash. The annoyance of taking a savestate, resuming, and then crashing; even 1% of the time; would be far worse in my opinion than not having savestates at all.
|
|
|
|
Kitsune Sniper
Guest
|
|
« Reply #55 on: October 03, 2006, 03:12:25 pm » |
|
As far as savestates on the real hardware. You know, my UFO takes some fairly decent savestates. Most of the time any issues get resolved exiting or entering an area and sometimes, there's little to no noticeable issues at all. That's just my observation since it was brought up. I'm not saying you should or shouldn't add savestates nor how to do it. Would you really want bsnes savestates that work "most of the time"? Because I could do that. I could just disable synchronization and run each component up until a safe syncing point. But the problem is, resuming will not be accurate. I doubt it would cause much trouble, but since it's a difference from the real system, it would be possible to crash. The annoyance of taking a savestate, resuming, and then crashing; even 1% of the time; would be far worse in my opinion than not having savestates at all. Well, in that case, I would suggest people to save states at times where such syncronization was not a huge problem. Like an options screen, a story scene, a menu, or such. Edit: @Ryusui - Tile Molester?! *hissssssssssssssss* I don't use crappy tile editors! >_< Blargh, the sacrifices I do for you people.
|
|
|
|
MegaManJuno
Guest
|
|
« Reply #56 on: October 03, 2006, 03:34:09 pm » |
|
Regarding the save states, there was a hardware device that pretty much served this function that I used to own at one point. I believe it was called a NakiTek Game Saver+ or something along those lines. It seemed to work OK from what little I messed with it, but I do think there may have been some issues with certain games (been too long to recall honestly). I wonder if knowing the inner workings of the device would help any? Edit: Some (very little) additional info on the device here.
|
|
« Last Edit: October 03, 2006, 07:15:34 pm by MegaManJuno »
|
|
|
|
Ryusui
Guest
|
|
« Reply #57 on: October 03, 2006, 05:49:28 pm » |
|
I used one of those to beat Plok.
|
|
|
|
creaothceann
Guest
|
|
« Reply #58 on: October 03, 2006, 06:44:04 pm » |
|
byuu: So that doesn't work then. You could of course do that unreal/blurry savestate thing. Needs a good name though... Suzaku: Unfortunately hunting down some bugs (so that you get to a SNES-like emulator) requires either savestates, or wading through massive logfiles. Some game will however have disorted sound or graphics, so inclosed with the Game Saver is a piece of paper with a ton of codes which can be typed into the Game Saver on a special screen (hold SELECT while the Game Saver loads) and will fix sound and/or graphic problems. Ugh... -_-
|
|
|
|
Dragonsbrethren
Guest
|
|
« Reply #59 on: October 03, 2006, 06:47:15 pm » |
|
I had one of them, used it once, lost it in a move.
|
|
|
|
|