The Kronos Inner Workings - For the brave ones ;-)

Discussion relating to the Korg Kronos Workstation.

Moderators: Sharp, X-Trade, Pepperpotty, karmathanever

Locked
User avatar
michelkeijzers
Approved Merchant
Approved Merchant
Posts: 9112
Joined: Thu Feb 08, 2007 3:10 pm
Location: Netherlands
Contact:

Post by michelkeijzers »

Dear Heider,

Thanks for the re-explanation. I have only start following your post after some time (due to 2 weeks vacation without internet). However I am seeing you make remarkable progress and wish you good luck with the project already.

About the wish list. As you know I have created PCG Tools. The main reason to start with that was to make visible the relation of programs and combis, i.e. if a program is used by one or more combis and that program is changed, the combi is broken. My tool is completely offline, but it would be awesome, to be able to navigate from a program to its used combi(s).

Besides that, I can think of hundreds of useful functions, related to the GUI (some of needs some additional space in the PCG content possibly). But I will not hijack your thread with that ... in case you really succeed which I hope, maybe it's wise to create a new wish list thread for your tool. It can have a lot of potential.

Also notice, that Korg might not really like being 'tampered' with their OS, on the other hand, my app is also not official (since the PCG Tools is proprietary).
Image
Developer of the free PCG file managing application for most Korg workstations: PCG Tools, see https://www.kronoshaven.com/pcgtools/
Heider
Guest
Posts: 102
Joined: Thu May 17, 2012 1:07 pm
Location: Wimbledon
Contact:

Post by Heider »

Thanks Michael,

I appreciate your post, and certainly will come across your wish list once what I have in mind is completed...

Believe me, Korg Support "challenged me" to modify the Kronos by saying "You will not be able to do it, if you like to try, then good luck with that !"... I was like "Ok?!... Right... Let's respond and see the outcome"... So I said to Mr. S (if you follow previous posts): "I am busy right now (that was in April), but I will start working on this in 2-3 months time"... The reply was "Good luck with that!"...

The nice thing is that I have this all on emails for the record. in case this go to legal someday.

P.S. The OS is an open-source, I think you meant "Korg's APP" rather than "Korg's OS"... either way, either myself or someone else will do the change someday... Just like someone changed the PA3X and Support don't know what's going on to advice on what's been changed and why, or even care about making a "Korg Version" of such change that is being sold in Lebanon at the moment by a private company. So, I thought, Why not the Kronos?!... I mean I paid more than £3000 because it was advertised as "Great for live performance", which doesn't do it for me nor tons of others who're stuck with the same problems that Korg support wouldn't even bother forwarding to Engineering to release a quick fix?!...

Anyway, I can talk about this all day, but for now, I will go back to continue my work hopefully to get there on time.

Thanks for the post anyway Mike, hopefully we'll talk later.

Kind Regards
Heider
Heider Sati
User avatar
michelkeijzers
Approved Merchant
Approved Merchant
Posts: 9112
Joined: Thu Feb 08, 2007 3:10 pm
Location: Netherlands
Contact:

Post by michelkeijzers »

Heider wrote:Thanks Michael,
... (reaction to Last post to save space)
Kind Regards
Heider
I am sure we will talk again.

That's great news that you have at least the success and good luck messages from Korg. Actually I sort of have the same with PCG Tools (though I needed to sign an NDA for more documents; I also get some information from a developer inside Korg, dont' know if I can call his name here).

However, it is good that you have their acknowledgement so you can continue. I think you are like me, you want to make the best of a Kronos so every function you (or others) might be useful should be inside the Kronos (if time allows).

Ideally, a lot of things that I did in PCG Tools should be INSIDE the Kronos. If you can reach (part of) it, it would be awesome.

I don't have the time to read all older posts but I will in time; anyway I will follow these threads from now on and wish you again good luck like Korg did.
Image
Developer of the free PCG file managing application for most Korg workstations: PCG Tools, see https://www.kronoshaven.com/pcgtools/
Heider
Guest
Posts: 102
Joined: Thu May 17, 2012 1:07 pm
Location: Wimbledon
Contact:

Post by Heider »

Progress Update on the ELF bit...

I've coded my .NET to read the "ELF Header", "Program Header Table", "Section Header Table", "String Header Table", managed to map all segments and offsets, but DARN... there are more sub-tables to process, I can now read the ELF file exactly as how the system does it, but still a lot to do in either for my system to read the whole file and copy it into another one after add the new section headers. The nice thing is that I can create a new section called "HeidersCode" and another called "HeidersData", and apply the flags to cause the library to treat it exactly like a .TEXT section and load it into memory, Nice!...

I also picked up on the OA.KO that Korg has intentially modified the header slightly to cause a "out of memory" when an interpretor / decompiler tries to read the content, in theory this can be fixed later on...

Anyways, it's a nice day today, I feel very good, about to walk back into my house now... might continue later tonight...

Talk to you later.

Regards
Heider
Heider Sati
User avatar
BobTheDog
Platinum Member
Posts: 1536
Joined: Mon May 21, 2007 1:46 pm

Post by BobTheDog »

Wow!

Keep it up Heider looks like you are doing a great job.

Kronos Bending, who would have thought it!

All the best.

Andy
Heider
Guest
Posts: 102
Joined: Thu May 17, 2012 1:07 pm
Location: Wimbledon
Contact:

Post by Heider »

Thank you Andy...

Quick update to all,...

Still working on the ELF tool, I've compiled my "Hello World" C file that has similar calls and functions to test the ELF tool, right now just cutting through "segmentation faults", however the bright side is that using my tool on both the Kronos ELF and my test one, I hae now:

1) Re-located the Section-Header tables.
2) Re-located the Program-Header tables.
3) Re-located the Library-Segments
4) Re-located the Text-Segments
5) Added a new custom Global-Segment
6) Added a new custom DATA segment (8000h bytes)
7) Added a new custom CODE segment (8000h bytes)

For some reason, SegFault is occuring in the middle between the Dynamic segment and the GOT table upon loading (before the code-execution stage), not sure why yet, it's probably something dumb I missed, will do some more checking on the ELF format, It's a matter of time (probably a day or two) to get this working.

I've got another travelling to do on Monday for 4 days, (again, sadly away from my Kronos), however, I wil continue to work whilst away as it's all on my laptop for now. Just gutted that I can't test it on the Kronos itself.

Anyways, as I said before, it's a matter of time now, nothing more... I promise that you WILL ALL see a big enhancement to the Kronos this year, with "hopefully" all the wish-list completed in time...

Kind Regards
Heider
Heider Sati
Ksynth
Platinum Member
Posts: 1225
Joined: Mon Jun 01, 2009 4:32 pm
Location: Northern California, USA

Post by Ksynth »

The most interesting thread on the forum so far.

I don't pretend to know exactly all the technical stuff but its really interesting to follow these developments.

Just want more and more of it...
Luk84PL
Posts: 14
Joined: Sat Jun 30, 2012 9:10 pm

Post by Luk84PL »

Sharp should make this topic sticky... but just for the brave onces... ;)
Kronos 88, Farfisa F1, nanoPAD2, Casio SA-10 :D
User avatar
Sharp
Site Admin
Posts: 18221
Joined: Wed Jan 02, 2002 12:29 am
Location: Ireland
Contact:

Post by Sharp »

Luk84PL wrote:Sharp should make this topic sticky... but just for the brave onces... ;)
Done.
User avatar
michelkeijzers
Approved Merchant
Approved Merchant
Posts: 9112
Joined: Thu Feb 08, 2007 3:10 pm
Location: Netherlands
Contact:

Post by michelkeijzers »

Congratulations with the sticky post ... it is deserved.
Image
Developer of the free PCG file managing application for most Korg workstations: PCG Tools, see https://www.kronoshaven.com/pcgtools/
Heider
Guest
Posts: 102
Joined: Thu May 17, 2012 1:07 pm
Location: Wimbledon
Contact:

Post by Heider »

(edited, lots of spelling mistakes when on the train, could not believe it)...

Hi Guys,

Thank you all for the nice comments... Always nice to hear from you...

In regards to the thread-name, I didn't decide on the name myself, I was poting earlier on a different thread to reply on a different topic, but then because I was too technical, the preson suggested to create a new thread, Roblof then kindly created this thread so that I (or we) can post more about things here...

I would've called it "Kronos Future, or Enhancements", or something.

I have no idea what Sticky thread means!, I hope it's a good thing :)

I'm on the train at the moment travelling long distance, still thinking and working on all of it...

Kind Regards
Heider
Heider Sati
Heider
Guest
Posts: 102
Joined: Thu May 17, 2012 1:07 pm
Location: Wimbledon
Contact:

Post by Heider »

Hi All,...

I just wanted to share the good news,... my new ELF modification tool that was written on .NET now (on Windows) to modify ELF files (on Linux) is now fully working 100%...

New sections relocated successfully within all ELF files now, and code-interception and relocation is about to begin...

I am using NASM, GCC and MAKE to code new sections to add to these files.

Gutted that I don't have my Kronos with me here, arrived at the hotel in about 2 hours ago, I feel like I deserve a large meal from a close Thai restaurant ...

Anyway, I feel very optimistic about updating the Kronos now,...

(P.S. I wish I could celebreate loudly now, however, I was in a very bad mood today all day, my son Rami had an accident and was in A&E all morning, I was in tears when the doctor was stitching his eye-brow, he didn't cry when he was squeezing my hands,... I felt very bad and still do, I hope you are ok, and wanted to let you know that I love you, and I am sorry... I will make it up,... I promise...)

Apologies to the rest if the above paragraph is a little off-topic, I will continue working on the updates and something will come up this year as promissed...

Kind Regards
Heider
Heider Sati
User avatar
michelkeijzers
Approved Merchant
Approved Merchant
Posts: 9112
Joined: Thu Feb 08, 2007 3:10 pm
Location: Netherlands
Contact:

Post by michelkeijzers »

Heider wrote: I have no idea what Sticky thread means!, I hope it's a good thing :)
Sticky means that this post will always stay on top of the list, making it very easy to be seen by everybody, resulting in a very easy way to find it back (it's one of the top 5 or 6 posts) and you will get a lot more readers/exposures and probably feedback.
Image
Developer of the free PCG file managing application for most Korg workstations: PCG Tools, see https://www.kronoshaven.com/pcgtools/
KPF
Posts: 4
Joined: Thu Oct 18, 2007 7:29 pm

Post by KPF »

Hi Heider!

very interesting thread!

I do not program C and Linux kernel, but much in Java and web under Linux, and I see several points which resonate with my experience.



Can we please discuss the following:

1. Is there possibility to speed up the boot time? Actually, boot time 2:30 is rather strange for standard x86 performance and ultrafast SSD disk.

Can we just add standard hibernation? i.e. simply load and fill 2.0-3.25 GB of plain memory image. For SSD speed about 200 MB/s and DDR2, it should take as low as 10..20 seconds. (for less amount of used memory and some basic fast compression, maybe shorter)

From my personal experience of programming highly-loaded web servers with several GB of data, loading already-prepared images is very effective for many tasks.

It could be, for example, new option in Global tab. You press Hibernate, the Kronos dumps its 2 gigabytes to SSD and says you can switch it off.

Moreover, to save SSD resource, this image can be saved only once, as the synthesizer is always started in the same way and loads the same preload bank. For example, memory image can be prepared only when you choose in Global which KSC to be autoloaded.



2. support of two disks again, as I read it was dropped by OS update.


--

I have little experience in C for Linux, and never touched ELF structure, but have built systems of higher level (Java and OpenCL with similar language syntax) so I can be useful in building and testing some logic.
and can be alpha- or beta-tester :)

Is it possible to fiddle with the system just with bootable USB-stick and USB keyboard?



Best wishes,
KPF
Heider
Guest
Posts: 102
Joined: Thu May 17, 2012 1:07 pm
Location: Wimbledon
Contact:

Post by Heider »

Dear KPF,

Just before I start my day in the office onsite, good morning to you, although this might sounds a little corney or cheesy, but I am going to start by saying "Everything is possible"... Now, I am going to answer your questions "practically":

1) Booting time: Ok, it is definitely possible based on the following facts,

A) With hidden-console by default from the Kronos, it takes about 2-4 seconds for the OS to boot up, this is where you see the cursor ready for you to type in SHELL commands. This is before any Kronos software/devices loads up. Let's call this phase "OS-Ready"

B) Loading up the stage between (OS-Ready) and (mounting and decrypting the Mod and Eva images) takes about another 6 seconds.

C) Loading up the OA.ko file takes about 4 seconds

D) Loading up the Eva file takes the long time, this is the time when your system says "Loading Startup Files... " to "Loading Banks etc.."

Now, the issue here is that because of the (again) badly-developed code, this is taking all the time, I've seen this issue in the past with big companies (such as Korg) that you have a team who does the internal infrastructure, and another team who does high-level API menus, the first team probably wrote OA.ko (and all the other initial ones like HAL etc) that team provided an API set to the high-level team who wrote the menus and screens etc to interface with the OA... This is where the bottle-neck is... Imagine if we had a release that all is contained in one big file, (weill, it would be a alot smaller without all the APIs exposed, and preforms faster as well)... Although EVA is the one that I am working on at the moment, which is the slow-loading file due to resource-loading, I can't promise to improve the loading time on my first release, however, I promise to get it better as we go along, as I do have plans (like always) to re-invent the wheel and get this loaded more appropriately.

Another fact is that I have gone as far as the USB interface, I don't know the SHARK hardware myself, but judging the frame-buffer and how fast I can draw on-screen, I'd say the interface can definintely be improved to load, think about video-card USB sticks, (TV Tuners etc), I have one that display on my 1920x1200x32b color screen in real time with my USB tuner, imagine how much data flying through that, it's a lot more than what MOBO is sending to SHARK, therefore, I know it's possible, and you are absolutely right.



2) Don't worry about Disks for now, if you have TELNET, or (better) a Wireless USB card support, would you care about disks?... even without, we can now compile drivers for the OS, thanks to Korg, they left GCC4.5 and NASM on the original Kronos DVD-2, which is very nice!...

Anyway, with the OS changing, the sky is the limit...

Booting time can certainly be improved... not sure if it's coming this release though... but definitley possible.

Ok, it's 9:20am, I'd better get back as my meeting starts in 10 minutes... Will follow this tonighit hopefully..

Kind Regards
Heider
Heider Sati
Locked

Return to “Korg Kronos”