cbhacks / crashedit Goto Github PK
View Code? Open in Web Editor NEWUnofficial Crash Bandicoot 1/2/3 Level Editor
Home Page: https://www.cbhacks.com/tools/crashedit/
License: Other
Unofficial Crash Bandicoot 1/2/3 Level Editor
Home Page: https://www.cbhacks.com/tools/crashedit/
License: Other
The SEQ tempo command is actually slightly different from the MIDI tempo command, so this is where this problem comes from. There's a good description on it here:
http://loveemu.hatenablog.com/entry/20060630/PSX_SEQ_Format
Needs issue #15 completed first
Self-explanatory. Should also update the drawlists appropriately.
Depends on issue #12
Clicking a music entry should show the contents in the first item, such as the location of the VH file and the wavebank entries used.
"Import" adds another texture chunk, but the user is prompted to choose a texture image (which format? I dunno), "Change" replaces the current texture image with another one.
The scenery entry format for crash 3 is nearly identical, except one field was made unsigned instead of signed. Still thinking about how exactly I want to approach this, but it should be easy either way.
Objects in Crash 1 (all versions) are significantly less complicated and are also way smaller. They have some sort of Int16 that pretty much says how they will show up (after 4 empty bytes with unknown purpose), then ID, then something that says that it's an object and not anything else, then 3 special settings (all of what I listed is in Int16, not sure if they're signed or not), then a byte for type followed by a subtype, then positions: Int16 for X, Y and then Z, followed by more positions if they exist. Note: there must be an extra empty (unsigned?) Int16 if an object has more than 1 position (so you'll have 2 empty Int16 instead of only 1). The editing box fro this should be pretty simple to code, but I don't know where the draw lists (or load lists for that matter, if they exist) are, so I guess there's not much that can be done.
Edit: Ninja'd by #30 I think.
Should be easy.
It just resizes them to 32x32 automatically no matter the original size, this makes it impossible to properly add a crystal texture.
When saving (or before, technically), CrashEdit should detect whether a type on a non-camera entity exists by checking the code entries. Additionally (but possibly only available in the far future), CrashEdit should also detect if animations and models by EID for all of the subtypes in the level and if data for them exists too. If any of these is not available, an error should pop up with an appropriate description i.e. "Type {Type} for object with ID {ID} does not exist.", "Subtype {Subtype} (in object with ID {ID}) does not have a model/an animation/available code." (this last one is picked accordingly).
CrashEdit should support a default-off toggleable option to render the collidable geometry used in zones.
I already have an uncommitted implementation of this using immediate mode, with terrible performance. GL display lists help this somewhat, but not enough to be very useful. VBO's may be able to get much better performance, and non-VBO-capable hardware is not going to be powerful enough to get even one FPS on immediate mode anyway.
I'd also like to look into ways of using fragment shaders. Perhaps a quad could be rendered across the entire screen, and a fragment shader could do the octree walk for each fragment? Not sure about the math involved or the potential performance issues, since the kind of conditional execution it will take might be pretty bad on GPU hardware. We'll see.
This encompasses a set of features:
Right now the code for this is all over the place, I want to design a common interface for all of the model formats, and then have a "renderer" for each output format or OpenGL feature-set which will use that one single interface.
The problem is, all of the model formats have varying and unusual requirements. We can ignore textures for now, the vertex and color scheme is complicated enough.
So the problem is too many different possibilities:
I'm working on something now which I think might work for this, but we'll see.
Texture/image (i.e. loading screen) in Crash 1, collision tree in Crash 2 and 3: "Vcol is a collision tree (crash used video collision). Imag is either a texture block or some kind of display image like the loading screens or other static screens"
CrashEdit likes to eat memory, and uses a LOT of memory when seeing zones, and uses even more memory for each frame in an Old Animation Entry (instead of just using the animation that's already loaded). The program eventually crashes at around 350 MB of RAM usage no matter how much free space you've got.
Some kind of thread pool should be used to parse and process chunks as soon as they're read. There's no point in waiting for the entire file read to complete before beginning parsing.
Same thing for saving, may as well start writing as soon as the first chunk is ready.
ErrorManager will need to be thread-safe for loading. Errors while processing should wait for all of the preceding chunks to finish before appearing, so they don't start showing up out-of-order.
The PAL Crash 2 game engine rejects modified game files.
NTSC Crash 2 & 3 both accept the modified game files regardless.
There should be some method for opening a 3D view of the entire level, similar to a normal zone viewer.
"SLST" entries, already RE'd out by wurlitzerfox. I'll need to go over his docs in more detail to get a better understanding about how they work.
I'll probably call these Scene List Entries, or something similar to that.
Not really sure where to post anything, so here it goes.
I've had a fair amount of work done on CrashEdit locally which hasn't been pushed (apparently the version on here is from december of last year? ancient).
I intend to release 1.0.0 at some point, I think this versioning scheme is much better than what I was doing before. I'll probably make a small post on xentax once it's out, but then I'll switch to hpzr.proboards.com to start a thread and announce any further work there. There are certain features I want in before I publish 1.0.0:
Some other things I want but probably won't make it into this version:
This doesn't mean 1.0.0 is coming soon, but it is something I intend to happen.
Duplicating entities can cause packing errors, but because there's no way to delete them again, these errors can be difficult to solve. To rectify this, a "delete entity" option should be added.
A malformed entity entry (or a Crash 1-style entity entry) can crash the core Crash library with an OutOfMemoryException
in Entity.cs
. This issue may also apply to other areas where such allocations are made.
This would actually simplify a lot of code as well, especially the draw list handling and "duplicate entity" option.
This would also simplify some Entity backend code as well if the cameras were a different class.
Will need the RIFF code to support reading.
Regenerating the SLST entries, needs issue #25. This is absolutely mandatory for some significant things:
I'll also need to reverse engineer the exact projection and rotation/scaling/etc the cameras use so I can do this accurately.
This will probably take quite a bit of processing power, so I'm considering OpenCL to allow computing on graphics cards and/or across multiple systems or processors. OpenCL supports CPU-only systems, supposedly, so that's good for compatibility. OpenTK already includes bindings for OpenCL.
Pretty significant, but also not too difficult, hopefully.
Import needs the rewritten NSD patcher from #23. Export isn't really useful without import.
This format is the same as the "Old Model Entry" format, or so it seems. Should be pretty simple to add.
Double-clicking an NSF file while a CrashEdit instance is open caused it to open another CrashEdit instance (so you have 2 of them open), this should be optimized so it opens in the currently open exe. If you for some reason have 2 exes open, the last or first one that was initialized should be chosen to avoid confusion.
Since the Crash engine glitches out the music if they use Note Off events, CrashEdit should transform them to Note On w/ velocity 0 on export/import.
These are the GOOL scripts used by the game objects. Code is a decent enough name and some of them also contain MIPS machine code intermixed with the GOOL.
Minor cosmetic change.
Given some more work on c2c, CrashEdit should be able to launch the (external) program directly into the currently opened level, and c2c would report when individual chunks are loaded or unloaded which could then be displayed in the editor.
The next step after this would be live application of level changes to the game while it runs, similar to editing memory in cheat engine, but with the editing capabilities of CrashEdit.
Chunks in the UI should show the amount of free space available within them, as well as indicate when they have been over-allocated. Entries should also indicate their size to give some idea of how the user might reorganize to fix packing errors.
Most advanced anti-virus programs (AVG, etc.) can detect CrashEdit as a virus, but the anti-virus programs don't delete CrashEdit, just block it from using other files (the DLLs), this causes CrashEdit.exe to just open a crash message whenever you try to open it. This can be fixed by adding the CrashEdit folder to the exceptions list (or disabling your anti-virus before starting it up).
Pretty simple. The real question is, should it also be able to go around and update all of the references to itself to use the new name? Potentially a search-and-replace EID's menu option could be added for that.
A simple extra option to force the PS1 to draw it no matter what. This could fix a lot of failed editing, since adding anything a little bit off away from the original objects can make them unseeable and thus nonexistant.
The backend needs a real MIDI parser which can parse the MIDI event stream as well as save it back out.
This will be needed for MIDI import as well as MIDI editing, and also to fix the broken MIDI export tempo problem
Grabs the first SEQ (or second, maybe there should be an option for this), VAB and "merges them together", so you'll get the SEQ as if it was in the game (but doesn't loop). This should also include in-game effects such as reverb and echo and whatever.
Replaces or adds a VB file to the game. The appropriate number of chunks should also be automatically made and the wavebank entries should be named whatever the user wants. No more than 7 chunks should be created otherwise it should spit an error saying it's too big.
Simply turns textured mode on and off.
A warning should show up when saving in case a draw list (any) does not contain an object (with ID, name, at least 1 position, type and subtype). The warning prompts the user to either save anyway or go to draw list(s) in the same zone(s) as said object(s).
CrashEdit should be able to import MIDI files and convert them to SEQ with the necessary conversions:
Needs #15
The error messages for packing errors are unhelpful, notably:
The entire system should be redesigned. Preferrably, it should show entry sizes and remaining chunk-space live as the entries are modified. One possible design is this:
This setup would also have the side-benefit of having entity names updated in the tree view as their names are modified in the control.
Including a disassembler for the known opcodes, plus MIPS. This is a dependency for having a debugger and interpreter, the interpreter then being necessary for a bunch of other features.
This should support some batch actions such as:
This should make it easier to just jam in external midis and try them out, although playback would help with that as well.
Needs issue #15
CrashEdit is currently completely incompatible with:
Haven't tested NTSC-J Crash 2, so I'm not aware of the problems in that one.
I already have an icon for this but I need to make the UI actually use it.
Opening an NSD should make CrashEdit show its content similar to the way it shows NSFs: Instead of chunks you got chunk index, spawn point index, etc. and inside those are the EIDs and CIDs (and spawn point garbage in the spawn point section, this is made in a weird way though)
Should also force user to add it to the draw lists.
The bug is simple to reproduce:
I'm trying to change Cortex boss fight's music, but it's hard because there's Crash code in the same chunk (which is a big pile of code).
EDIT: This bug only happens when you cause the packing error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.