legend-of-dragoon-modding / legend-of-dragoon-java Goto Github PK
View Code? Open in Web Editor NEWLegend of Dragoon decompiled, reverse engineered, and ported to Java
Legend of Dragoon decompiled, reverse engineered, and ported to Java
n * 0x8080_8081 >>> 39 ~= n/255
n * 0x8888_8889 >>> 37 ~= n/60
n * 0x8888_8889 >>> 32 ~= n*15/8
n * 0x6666_6667 >>> 35 ~= n/20
n * 0x8102_0409 >>> 38 ~= n/127
n * 0xcccc_cccd >>> 35 ~= n/10
n * 0xd1b7_1759 >>> 45 ~= n/10_000
n * 0x431b_de83 >>> 50 ~= n/1_000_000
n * 0x0a7c_5ac5 >>> 39 ~= n/3_125
n * 0x00ff_f001 >>> 36 ~= n/4_097
n * 0xff80_3fe1 >>> 39 ~= n/513
n * 0x0fe0_3f81 >>> 35 ~= n/129
This may have been a fluke in my playthrough (possibly even something I did manually and forgot about) but Dart started at D'lvl 5. Someone needs to play through up until Dart gets his Dragoon spirit and see if it happens again.
A lot of models have incorrect palettes applied to certain texture pieces (e.g. Dart's red boots, static-noise horses).
Collision is probably about 90%, but not quite accurate. For example, rubbing against some collision barriers can cause you to teleport into the abyss.
The dragoon eye to transform into a dragoon is invisible (you can still select it though)
Even if it wasn't Dart's dragoon that levelled up
(it may be rendering off-screen like some other stuff)
If you leave the game running for long enough it'll run out of memory
There's a very common exception when booting, probably about 5-10% of the time, especially on slower hardware. The solution will probably be to just rewrite the code reading these files so that it doesn't have to rely on the hardware translation layer.
java.lang.ArrayIndexOutOfBoundsException: Index 7 out of bounds for length 7
at legend.core.cdrom.SyncCode.fromLong(SyncCode.java:14)
at legend.game.Scus94491BpeSegment_8003.processCdromInterrupt(Scus94491BpeSegment_8003.java:789)
at legend.game.Scus94491BpeSegment_8003.FUN_800321c4(Scus94491BpeSegment_8003.java:1065)
at legend.game.Scus94491BpeSegment_8003.FUN_80036e50(Scus94491BpeSegment_8003.java:3444)
at legend.game.Scus94491BpeSegment_8003.FUN_8003429c(Scus94491BpeSegment_8003.java:2027)
at legend.game.SInit.FUN_800fbb9c(SInit.java:219)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at legend.core.memory.Memory$MemoryValue.call(Memory.java:362)
at legend.core.memory.types.SupplierRef.run(SupplierRef.java:25)
at legend.game.SInit.executeSInitLoadingStage(SInit.java:94)
at legend.game.Scus94491BpeSegment_800e.executeSInitLoadingStages(Scus94491BpeSegment_800e.java:1053)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at legend.core.memory.Memory$MemoryValue.call(Memory.java:362)
at legend.core.memory.types.RunnableRef.run(RunnableRef.java:17)
at legend.game.Scus94491BpeSegment_800e.executePregameLoadingStage(Scus94491BpeSegment_800e.java:934)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at legend.core.memory.Memory$MemoryValue.call(Memory.java:362)
at legend.core.memory.types.RunnableRef.run(RunnableRef.java:17)
at legend.game.Scus94491BpeSegment.executeLoadersAndScripts(Scus94491BpeSegment.java:388)
at legend.game.Scus94491BpeSegment.lambda$gameLoop$0(Scus94491BpeSegment.java:354)
at legend.core.gpu.Gpu.lambda$run$11(Gpu.java:451)
at legend.core.opengl.Context.draw(Context.java:96)
at legend.core.opengl.Window$Events.onDraw(Window.java:336)
at legend.core.opengl.Window.run(Window.java:217)
at legend.core.gpu.Gpu.run(Gpu.java:458)
at java.base/java.lang.Thread.run(Thread.java:833)
Related to #24, some animations (for instance, some fog, the trees in the chase scene) will do things like stretch deform instead of rotate.
When you complete an addition, the text that pops up on the right side of the screen has each letter incremented by one (Harpoon -> Ibsqppo)
Some (all?) TMD (and other?) files inside of MRG files have an extra header before they start that looks like this:
0h (4 bytes) - offset to actual start of file
4h (4 bytes) - optional relative pointer (may be 0) - appears to be a relative pointer to an array of 4 relative pointers. If present, a 30h-byte struct is allocated on the memory management linked list and the array of relative pointers is resolved to absolute pointers and copied to the 30h-byte struct at +20h (see SMAP function 800de004).
8h (4 bytes) - optional pointer offset (may be 0) - I think this is a relative pointer to an array of 7 relative pointers. If present, the relative pointers are resolved to absolute pointers and stored in BigStruct at +d0. Note that there are several other 7-element arrays in BigStruct that are related.
... (Do some of these files have more data here? +0h is an offset to the start of the actual file. The only value I've seen so far is 0xc, but there could be others)
?h - The start of the actual file - actual offset is the value at +0h
The loader code is also reading the upper 16 bits of the TMD ID (i.e. the value that should always be 00000041
, unless we're missing something that isn't in the file format docs.
It appears these padded files aren't always in MRG files. There's one at 800103d0
in the main executable of the game.
All of the the extended TMDs I've seen so far are followed by another file with the same extra header and a file ID of 0x01
(assuming they follow the same file ID convention as many other PS1 files)
It seems that enemies can't hit with regular attacks. Magic attacks work, however.
HP/MP/etc text that should be white is red, yellow is blue, etc
Hoax is a good example, the background smoke in the battle scenes renders with a black background
i.e. current character portrait outline, full SP flashing rectangle, addition squares
Yeah that pretty much sums it up
Note - I don't think it's actually possible to have multiple negative status effects at once.
If a player is afflicted with both a mind and body status at the same time, a single status-healing item cures all negative status effects, not just the ones they're supposed to.
Maybe we should fix this and add an option to enable multiple status effects for increased difficulty?
Add load game to the inv menu. Can probably look into the game over logic for a good way to reset back to the main menu.
Used a healing breeze, instead of healing Rose it said "MISS"
When the camera in the crossroads fades in, it is slightly past the edge of the background texture. Instead of being black-filled, it repeats the edge textures to the edge of the "screen".
I overwrote a save game, and the data displayed on the load game screen was as expected; however, once loaded, some of the data was from the saved game I overwrote. For example, HP/time played was from the old save, but the potion I used was consumed.
Animations seem to generally snap between end states without the intermediate frames or proper transformations.
This is just a reference for me so I can easily find these stubs.
8004c390
8001b33c
80045cb8
The combat camera is very glitchy. It jumps around a lot and the angles aren't quite right.
Try to replace character - assertion error
Player damage is being rounded oddly, you always seem to do a multiple of 5 damage like 25, 35, 45 (can't remember if you can do even multiples like 30 or 40)
It seems to be rendering over and blending with itself. See 800e4934
for code.
Press the camera switch button a few times and eventually it'll stop changing the camera
However if an enemy blocks, you need to press the circle button (at any time before the hit, it doesn't have to be accurate)
What it says on the tin.
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.