Go Back   the Magicball Network > Forums > MBN Main Forums > General
Buy LBA1/Relentless from GOG.com Buy LBA1/Relentless from DotEmu Buy LBA2/Twinsen's Odyssey from DotEmu Buy LBA2/Twinsen's Odyssey from GOG.com Buy Little big Adventure from GOG.com or DotEmu Buy Little big Adventure 2 from DotEmu or GOG.com

Welcome to the Magicball Network.

You are currently viewing our site as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

General The general chatting goes on in here. That means talk about the LBA games and it's world.

Reply
 
Thread Tools
  #1  
Old 2016-11-21, 23:17
MrQuetch's Avatar
MrQuetch MrQuetch is offline
Quetching a Mr.
 
Join Date: Apr 2011
Location: United States
Posts: 656
Twinsun Programming Of LBA1 and 2

This may have been asked before, but were LBA1 and 2 all written in ASM code? Or were they written in C? I know that the developers used their own programs, but those could have been written in either ASM or C. Technically speaking, C involves ASM - C just makes it easier rather than only working with registers in ASM. It'd be cool to see the source code for either game, and then to be able to learn from it.

Thanks.
__________________
I am a Quetch. However, I am a Mr. Quetch.
Reply With Quote
  #2  
Old 2016-11-22, 04:33
gravel22's Avatar
gravel22 gravel22 is offline
FreemanQC
 
Join Date: Sep 2008
Location: Canada
Posts: 534
Send a message via MSN to gravel22
I already asked Fred for the source code and he was open to the idea but now Fred looks busy and doesn't reply to my last email.
__________________
Little Big Adventure Former World Record Holder (53:40:80) see on Twitch below

I'm a LBA speedrunner find me on and SPEEDRUN.COM subscribe to my twitch channel.
Reply With Quote
  #3  
Old 2016-11-22, 11:27
xesf's Avatar
xesf xesf is offline
Magic Ball Master
 
Join Date: Sep 2002
Location: Dublin
Posts: 7,719
Both codes have been written in C with performance code in ASM.
There are quite a few low level code in the game, but I think its mainly in LBA1. The overall is C.

Your best choice at this stage is to look at TwinEngine implementations on github.
You have the reverse engineer implementation as well as the ResidualMV LBA1 and LB2 implementation.
__________________
Personal Blog - blog.xesf.net

TwinEngine v0.2.1 win32 beta released - open source re-implementation of the LBA 1 original engine.
[Discuss]|[Download]|[Changes]|[SourceCode]|[Issues]


The Sacred Carrot website
Reply With Quote
  #4  
Old 2016-11-22, 23:14
MrQuetch's Avatar
MrQuetch MrQuetch is offline
Quetching a Mr.
 
Join Date: Apr 2011
Location: United States
Posts: 656
You guys are awesome. Thanks so much for the answers.

So, Xesf, would it be possible to using the code, change something, recompile it, and then play LBA1 or 2 to see what changed? Or is the implementation not that far yet?

Edit: Just looked at some code, and found this in the "renderer.c" file:

#define POLYGONTYPE_FLAT 0
#define POLYGONTYPE_COPPER 1
#define POLYGONTYPE_BOPPER 2
#define POLYGONTYPE_MARBLE 3
#define POLYGONTYPE_TELE 4
#define POLYGONTYPE_TRAS 5
#define POLYGONTYPE_TRAME 6
#define POLYGONTYPE_GOURAUD 7
#define POLYGONTYPE_DITHER 8

This is something that I've always wanted to try on the models. I've tried hex-editing the models in the past, but have never found the value for drawing different types of polygons. Is there a way I can get this to work? I've noticed that there is no option in the LBAnimator program that you've made Xesf. I've only been able to change poly colors.

There is a lot to look at, and it's very interesting.
__________________
I am a Quetch. However, I am a Mr. Quetch.

Last edited by MrQuetch; 2016-11-22 at 23:42.
Reply With Quote
  #5  
Old 2016-11-24, 22:58
xesf's Avatar
xesf xesf is offline
Magic Ball Master
 
Join Date: Sep 2002
Location: Dublin
Posts: 7,719
You can change, but you can end up with weird graphic glitchs.
In LBA1 engine the rendering is the tricky part, because is all software rendering and still buggy.
__________________
Personal Blog - blog.xesf.net

TwinEngine v0.2.1 win32 beta released - open source re-implementation of the LBA 1 original engine.
[Discuss]|[Download]|[Changes]|[SourceCode]|[Issues]


The Sacred Carrot website
Reply With Quote
  #6  
Old 2016-11-27, 03:51
MrQuetch's Avatar
MrQuetch MrQuetch is offline
Quetching a Mr.
 
Join Date: Apr 2011
Location: United States
Posts: 656
Quote:
Originally Posted by xesf View Post
You can change, but you can end up with weird graphic glitchs.
In LBA1 engine the rendering is the tricky part, because is all software rendering and still buggy.
Hmmm... Is there a way around the graphic glitches?
__________________
I am a Quetch. However, I am a Mr. Quetch.
Reply With Quote
  #7  
Old 2016-11-27, 15:45
xesf's Avatar
xesf xesf is offline
Magic Ball Master
 
Join Date: Sep 2002
Location: Dublin
Posts: 7,719
Nop, but is normal, because each polygon type expects a specific type of data not available in the model if you play with it. Few of them work together others don't.
__________________
Personal Blog - blog.xesf.net

TwinEngine v0.2.1 win32 beta released - open source re-implementation of the LBA 1 original engine.
[Discuss]|[Download]|[Changes]|[SourceCode]|[Issues]


The Sacred Carrot website
Reply With Quote
  #8  
Old 2016-11-28, 19:06
MrQuetch's Avatar
MrQuetch MrQuetch is offline
Quetching a Mr.
 
Join Date: Apr 2011
Location: United States
Posts: 656
Quote:
Originally Posted by xesf View Post
Nop, but is normal, because each polygon type expects a specific type of data not available in the model if you play with it. Few of them work together others don't.
Would it make sense if you hex-ed a file in a specific way that it'd be possible to get those polygon types that aren't there? Like just changing the indices? I'd think it'd be possible for every model - just a matter of knowing where everything is placed. You're probably right though - you seem to know more about the code than anyone else.
__________________
I am a Quetch. However, I am a Mr. Quetch.
Reply With Quote
  #9  
Old 2016-11-28, 19:35
Battler's Avatar
Battler Battler is offline
Welcome to Zirla!
 
Join Date: Apr 2004
Location: Koper, Slovenia
Posts: 5,304
Send a message via ICQ to Battler Send a message via AIM to Battler Send a message via MSN to Battler Send a message via Yahoo to Battler
I have the source code for the compression algorithms used, got the LZSS (LBA 1 compression) source code from Yaz0r and LZMIT (LBA 2 compression) from Frédérick Raynal himself... the former is entirely in C and the latter is in a combination of C++ and assembly (it also has a C version of the assembly code but it's #ifdef'd out). I also have the decompression code that elmuerte gave me, which he got from Frédérick Raynal and it's in C from what I remember.

Also, Japanese LBA 1 for PC has a file that includes the descriptions of all HQR files and a path to the source code, as well as a file with defines.
__________________
Join #doki-doki on irc.ringoflightning.net for some nice chit-chat about anime, manga, and other aspects of Japanese culture now!
Reply With Quote
  #10  
Old 2016-11-29, 04:52
MrQuetch's Avatar
MrQuetch MrQuetch is offline
Quetching a Mr.
 
Join Date: Apr 2011
Location: United States
Posts: 656
Quote:
Originally Posted by Battler View Post
I have the source code for the compression algorithms used, got the LZSS (LBA 1 compression) source code from Yaz0r and LZMIT (LBA 2 compression) from Frédérick Raynal himself... the former is entirely in C and the latter is in a combination of C++ and assembly (it also has a C version of the assembly code but it's #ifdef'd out). I also have the decompression code that elmuerte gave me, which he got from Frédérick Raynal and it's in C from what I remember.

Also, Japanese LBA 1 for PC has a file that includes the descriptions of all HQR files and a path to the source code, as well as a file with defines.
Holy crap! That's so awesome! It's amazing just how much information has already spread. That is all really cool.

Battler, would you know how to change the polygon types for the game? Do you program at all? Or did you just retrieve all of this as time went on? Either way, I'm really impressed with all of that.
__________________
I am a Quetch. However, I am a Mr. Quetch.
Reply With Quote
Reply

Tags
engine, game, lba1, lba2, program

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming language used to make LBA1 mobile? TransDiv General 13 2014-06-03 08:41
Socket Programming Bomba! Off topic 5 2007-09-26 22:43
Best programming language and why Quetch Off topic 10 2007-03-24 01:53
programming Jesse Off topic 6 2006-03-03 22:10
Programming in C/C++ mop_int Off topic 15 2002-03-07 22:42


All times are GMT +2. The time now is 06:20.




News Feed
Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2016, the Magicball Network