| |
Krill
Registered: Apr 2002 Posts: 2969 |
Release id #118713 : Krill's Loader, repository version 146
Please post feature requests, bug reports, questions etc. here.
Highest priority on my to-do list are speed enhancements, anything else you'd like for your next stunning demo? |
|
| |
enthusi
Registered: May 2004 Posts: 677 |
Please make it fail on 1541u, thanks :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
for the next loader release it would be great if a plush demo came attached to it =P |
| |
Luca
Registered: Apr 2002 Posts: 178 |
Quote: for the next loader release it would be great if a plush demo came attached to it =P
Hahaha! :D
I absolutely dunno how to manage a trackloader, but this release pushes me to face the effort this time. Thank you. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Finally managed to compile it. \o/ Maybe I should give it a chance now. :) |
| |
Urban Space Cowboy
Registered: Nov 2004 Posts: 45 |
Actual serious request time: allowing more than one serial device would be nice. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
same for allowing less than a dozen unused drivecodes in memory =D |
| |
Luca
Registered: Apr 2002 Posts: 178 |
Quote: Finally managed to compile it. \o/ Maybe I should give it a chance now. :)
Envying you so much right now, I'm so far away from even get in touch with the whole stuff :_(
First part + loader part + second part = happiness...if only I barely know howto... |
| |
WVL
Registered: Mar 2002 Posts: 896 |
Compiling that stuff is also not for me.. I once managed to do it and I just keep hanging on to that binary that I managed to compile once :)
BTW, that Spindle-thing looks pretty complex to me, very much so that I'm scared to just even look at it..
Darnit.. When did I get into the habit of using two dots?.. David must have gotten into my mind to save some bytes.. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
wtf is so hard about installing ca65 and then typing "make" in the sourcetree? *shrug* |
| |
algorithm
Registered: May 2002 Posts: 705 |
For windows users install cygwin. Then the other prerequisites. Eg strawberry perl and assembler binaries to the path and voilla. (And zip.exe) then its just a case of editing the config file and going into the directory via cygwin and typing something like make prg resident=8000 install=0800 zp=f0 etc |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: wtf is so hard about installing ca65 and then typing "make" in the sourcetree? *shrug*
+1 |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
cygwin is so old and unsupported.
is there no proper modern kit ? |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
Quote: wtf is so hard about installing ca65 and then typing "make" in the sourcetree? *shrug*
many guys around have never used ca65, c compilers, cygwin, from what algorithm writes it also needs perl ? a step by step tutorial would make life for us clueless idiots easyer. what needs to be instealled, what needs to be in path, how to set that up, example make commandlines / config files, etc. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: many guys around have never used ca65, c compilers, cygwin, from what algorithm writes it also needs perl ? a step by step tutorial would make life for us clueless idiots easyer. what needs to be instealled, what needs to be in path, how to set that up, example make commandlines / config files, etc.
docs/Prerequisites.txt and docs/Usage.txt
Seriously, it's not _THAT_ hard, even for a complete newbie. If you have interest you _WILL_ work it out, I promise. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Quoting SIDwavecygwin is so old and unsupported.
is there no proper modern kit ?
Cygwin is not old and unsupported. |
| |
Luca
Registered: Apr 2002 Posts: 178 |
Quote: docs/Prerequisites.txt and docs/Usage.txt
Seriously, it's not _THAT_ hard, even for a complete newbie. If you have interest you _WILL_ work it out, I promise.
I'm gonna amaze all of you: I've written the first post just after some attempts, which have been incredibly performed just after a reading of the docs. I know you're surprised'bout this revelations right now :)
Thank you all for encourage me to try and try again, installing and placing those useful stuff some here and some there trying to make it works, unfortunately I'm not that skilled to understand why there's no 'make' exe to run somewhere (just top say one), but I try and I try and I'll try again, hence root for me. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
Quote:a step by step tutorial would make life for us clueless idiots easyer. what needs to be instealled, what needs to be in path, how to set that up, example make commandlines / config files, etc.
sometimes i am absolutely sure that there is a video tutorial for everything - including how to shit into your own pants.
a coder who never used a c compiler? seriously, no. its not 1988 anymore.
Quote:docs/Prerequisites.txt and docs/Usage.txt
Seriously, it's not _THAT_ hard, even for a complete newbie. If you have interest you _WILL_ work it out, I promise.
seriously. this. it'll also be very rewarding to have solved a problem entirely by yourself instead of getting it spoon feed by someone else. you may even actually learn something new =P |
| |
Wisdom
Registered: Dec 2001 Posts: 90 |
Merits of open sourcing. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Quoting Groepazwtf is so hard about installing ca65 and then typing "make" in the sourcetree? *shrug* Nothing, if it goes well. But there can easily be all kinds of problems you have to figure out.
Quoting Groepazsometimes i am absolutely sure that there is a video tutorial for everything - including how to shit into your own pants. How about on how to not be a complete dick?
Quoting Groepaza coder who never used a c compiler? seriously, no. its not 1988 anymore. Exactly, other languages than C have been invented since then. |
| |
lft
Registered: Jul 2007 Posts: 369 |
Quoting CruzerQuoting Groepaza coder who never used a c compiler? seriously, no. its not 1988 anymore. Exactly, other languages than C have been invented since then.
Yes, and they all make different tacit assumptions about build systems and dependencies. Do you all know your way around the module systems of Perl, Haskell, Python, Ruby, Scheme48, ATS, Scala and SWI-Prolog, just to name a few?
While I agree with Groepaz that the best approach is to just dive in and try to untangle the knot, I can also appreciate what a dauting task it feels like before the pieces fall into place.
Luca: There's not supposed to be a make.exe. You have to install a make package (GNU make is good), and then you will have a "make" command in your path. Stand in the directory containing a file called "Makefile" and run "make" with no arguments. Also, when you edit a Makefile, make sure to use tabs and not spaces.
Simple when you know it, but like I said, all sorts of tacit assumptions. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
Quote:Nothing, if it goes well. But there can easily be all kinds of problems you have to figure out.
welcome to reality - this even applies to shitting into your own pants =)
Quote:How about on how to not be a complete dick?
you know what - people NOT spoonfeeding every single detail to me and essentially telling me to GTFO when asking equally silly questions is essentially what enabled me to find information and solve this kind of *trivial* problems myself. the scene needs less of that happyfamily BS and more balls for that matter. its 2013. there is google. finding out how to install cygwin and make and perl and ca65 IS NOT HARD AT ALL AND ALL INFO IS RIGHT THERE. whining about it is PURE LAZYNESS.
Quote:other languages than C have been invented since then.
still C/C++ is pretty dominant and a must-know. much more important than knowing assembly even :)
Quote:Do you all know your way around the module systems of Perl, Haskell, Python, Ruby, Scheme48, ATS, Scala and SWI-Prolog, just to name a few?
on my box i am running tools which are using perl, python and ruby. i have no clue how any of these languages work. yet making them and the tools work hardly required more effort than installing the respective packages and reading a few lines of instructions.
i feel stupid now for actually ordering, paying and reading "using and porting gcc" when i first encountered it and tried building an sh4 crosscompiler. should have asked in some random webforum instead, i guess :( |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
To make myself clear.
I have no problem with the fact that Krill releases his loader in this form, it's a nice, perfectly legal solution and I know its my problem if I'll ever have a hard time with it.
Also, I have never even tried to compile it, because there was also someone around who did it (often krill himself).
So, it's just my general assumption on feedback from Clarence (he had his share of trouble with it) and from this thread that its complicated. |
| |
Dr.j
Registered: Feb 2003 Posts: 277 |
I can understand Groepaz approach to dive and to discover
everything by yourself but seriously i didn't deal with C compilers for over 10 years (and don't have intetion do it
without a reason ) i tried the "MAKE" program from microsoft and didn't succeed to run the Make command. i ain't a big expert to install comiplers/script systems . i do try the cygwin and i hope i will make it. i think it could be more user friendly for win users ,but in the other hand i appreciate so much Krill great loader. probably the best loader the erea and ofcourse up-to-date with new features |
| |
lft
Registered: Jul 2007 Posts: 369 |
Quoting Groepazit'll also be very rewarding to have solved a problem entirely by yourself instead of getting it spoon feed by someone else. you may even actually learn something new =P
I agree completely with this. Frustration is an essential part of personal growth; it indicates that you are actually pushing beyond your current abilities. People who actively avoid frustration trade long term skills for short term bliss.
However! Most of the people who have posted in this thread are not asking to be spoonfed. They are venting their frustration, which actually shows that they are tackling the problem. Oswald did ask for a tutorial, but more or less took it back. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
Quote:Most of the people who have posted in this thread are not asking to be spoonfed. They are venting their frustration, which actually shows that they are tackling the problem.
and i am actually just doing the same - especially i find it strange to hear certain things from people who i consider very capable coders. call me stupid, but from these i also expect having the skill of installing, and using, something which is essentially a standard toolchain. infact, in 2013, i am seriously asking myself on each of these occasions "how can he still not have cygwin installed?" :)
that said, i was going to post a quick cygwin setup guide now, but realised i havent done it myself for 10 years now (thats when i completely switched to linux) and things probably changed enough that i would get some detail wrong and confuse the heck out of people more than it'd help - so just a hint that you probably will not find so easily in a newbie guide:
- before you install it, search your entire HDs for "cygwin*.dll". if you find such files, they most likely belong to some program you installed that was also built using cygwin. this is somewhat of a problem - you must make *absolutely* sure that under no circumstances more than one cygwin.dll is in your path, or the respective search path of a certain application. if somehow different versions of the dll get mixed up, all hell breaks loose and the programs using the dlls will expose random (and sometimes very weirdo) errors. ("compiler can not create executable", "error 0" -> you are screwed! =P)
- resist the temptation to change the default install location (which is c:\cygwin). yes there is no reason it shouldnt work anywhere else. however, there is enough broken software in the wild that will break one or the other way if its another drive or a path longer than 256 characters are wtf else could possibly go wrong :)
other than that, it really shouldnt be harder than running setup.exe from the cygwin site, selecting a couple of packages (gcc, make, libc, bash, lex, yacc, perl, python ... ymmv) and let setup.exe do its thing (in modern windows you perhaps want to do this systemwide as administrator)
and when its done, get familiar with compiling some stuff.... like pucrunch or acme (should both work with just make and gcc, no other dependancies if i recall correctly).
now to compile a package with more complex dependancies (like krills loader), just do the same - and install missing packages according to the errors you will likely get :)
and now its time to read burglars makefile tutorial =) (and i really mean it - as much of some people seem to think that .bat files work fine for them - once you got the idea of what a makefile does and how to make it do what you need to do, there is no way back. not for you either, promised :=)) |
| |
iAN CooG
Registered: May 2002 Posts: 3186 |
I don't have cygwin installed. I use MingW/MSYS :P |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Proper documentation and a web-based build service have been on the TO-DO list for a long time now, but i simply had more fun working on the actual product, implementing features and fixing bugs.
Despite no proper documentation and no easy build procedure (but still easy usage once it's there as .prg, i hope), not to speak of any advertisement in form of a web-site or blog posts, i can say this little pet project of mine has been a great success so far.
Many times, i was even positively surprised by new demos using it without me having had any contact with their makers.
Whether an 8-bit demo coder in 2013 needs to know these relatively modern build systems is debateable, and i understand that some people have not been forced to work with them yet.
But compared to 1988, there really is all necessary information at your fingertips, plus many people giving advice, including myself. |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Oh, and about Cygwin, MinGW and Windows itself: The make et al. text-based non-GUI approach is something coming from Unix systems, and those existed long before Windows.
Thanks to Linux (and BSD variants), it has found its way to commodity PCs in our homes, and keeps on being very powerful and usable.
What i want to say is this: These days, Windows is one of many alternatives for home computing, and things like Cygwin or MinGW are actually not a direct loader dependency, but an indirect one, simply because Windows has always worked different than *nix systems in many ways, but is still tweakable fairly easy to comply with those.
In the end, make et al. is one of the most, if not _the_ most portable way to build software.
Most demo sceners seeming to keep sticking to Windows exclusively may be an argument for releasing something like this loader in a Windows-friendly/-only way, but there are many reasons against this, myself using three different OSes on a daily basis probably being the most important one. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
I don't have Cygwin either, since I'm on Mac. I have been able to build Krill's loader, and it wasn't as hard as I thought. But now I have the prg's and I wonder what to do with them. I assume you have to jsr install first, and when you wanna load something uncompressed, jsr loadraw. But then the c64 freezes. Also, I don't know how to choose which file to load. |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Refer to loader/samples/minexample/minexample.s and loader/include/loader.inc. Basically:
jsr install
bcs error
ldx #<filename
ldy #>filename
jsr loadraw
bcs error
[...]
filename: .byte "blipblop", 0; 0-terminated PETSCII string
It's adviseable to check for errors. After each call, carry is clear if all is ok, and set on errors, with the error code in the accu. A list of the error codes can be found in loader/include/diskio.inc. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Thanks. Guess I have to learn ca65 syntax to understand the "documentation" :)
I get error $fc after install. The closest thing to that I could find in diskio.inc was:
DEVICE_NOT_PRESENT = .lobyte(-$04)
True drive emulation enabled and disk attached in Vice. |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Yes, $fc = -4 = drive not present.
Is the KERNAL enabled when calling install?
Also MacVice has some strange UI quirks, like enabling IEC drive in Settings->Peripheral Drives would effectively disable true drive emulation despite the option being ticked and the control window showing current track and drive LED.
Does the test image work fine with the same settings? |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
.lobyte (-$04) o_O |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Quote: .lobyte (-$04) o_O
Yes. Current ca65 snapshots won't accept "-$04" as a byte value any more, as it's $fffc implicitly.
Hence the ".lobyte()" part (which is the same as "<").
It's not pretty, but in the end it's supposed to remain hidden behind symbols anyway, e.g. "cmp #diskio::status::DRIVE_NOT_PRESENT" in some error handler. |
| |
Luca
Registered: Apr 2002 Posts: 178 |
Ok, at now I tried for hours and days, and have to accept I lack the knowledge to afford this :'( Thank you all anyway. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
KERNAL enabled. $01 = #$37.
IEC drive not enabled and loadertest-c64.d64 works fine. |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Ok, and a=$fc with carry set is returned by install, so you never actually call loadraw? Or does install work fine, but loadraw returns the error? |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Luca: Where did you get stuck? What is the problem? |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Quoting Krilla=$fc with carry set is returned by install, so you never actually call loadraw? Correct :) |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
This is odd. I can only explain this by some garbled zeropage/lowmem KERNAL variables, so the serial bus KERNAL calls done by the installer fail somehow.
Where did you put the loader's zeropage variables?
Can you send me a minimal test image? |
| |
algorithm
Registered: May 2002 Posts: 705 |
Cruzer, I would call the jsr initialise loader routine first line in the code before any SEI, setting interrupts etc. (I assume you are doing this?) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
yeah dont init loader when your part (music irq, whatever) is running. that gave me exactly the same errors =D |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Already tried sei, cli, turning off all interrupts before calling install, not turning them off, etc., with the same result. So I figured something had to be wrong with install-c64.prg. While browsing around in the source files I noticed some of them were write protected, so I did a recursive chmod 777, and after compiling again, I was able to jsr install without errors. Woo-yay! :D |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Yeah, lots of write protected files in the latest version. Makes it semi-broken I'd say. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
And I got it to load a file with an interrupt running \o/
Sure hope I have grown from this experience. :)
Guess I still have a lot to learn though, e.g. how to load a file without the drive having to access the dir each time, and how to integrate it with packers. |
| |
algorithm
Registered: May 2002 Posts: 705 |
I think krills loader caches the data on the drive and by default it points to the next file on the disk for preperation.
Once the decompressor option is enabled in the config.inc file and the loader is compiled, there should be a loadersymbols.inc file generated which will give you the offset jump table for use in loading compressed files.
Using exomizer for example, you can pack a datafile using something like exomizer mem -f testdata.prg -ocompdata |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
"I think krills loader caches the data on the drive and by default it points to the next file on the disk for preperation."
yeah, thats how it worked last time I've used it. the loader positions the head on the next file in the directory structure after finished with the previous, so place files in loading order in the disk. |
| |
Luca
Registered: Apr 2002 Posts: 178 |
Thank you Krill for your help, compiling it has been actually easier than I imagined :) |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Quote: "I think krills loader caches the data on the drive and by default it points to the next file on the disk for preperation."
yeah, thats how it worked last time I've used it. the loader positions the head on the next file in the directory structure after finished with the previous, so place files in loading order in the disk.
There is a drive-side cache for the files' starting track/sector. This is a sliding window on the directory, holding about 30 file entries on 1541, with 4 bytes per entry (2 bytes track/sector, 2 bytes filename hash).
Normally the directory should only be accessed once, unless you have more files than can be held in the cache.
If the directory is larger than what the cache can hold, and a file cannot be found in the cache, the directory track will be read again, trying to find that file. This will likely leave another chunk of the directory in the cache.
Now, if you have more files than the cache can hold, and you jump wildly about the directory, the loader will be forced to revisit the directory track here and there.
If it jumps back to the directory track despite all files fitting into the cache, it's a bug on my side.
Does the problem still exist? |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Quoting CruzerWhile browsing around in the source files I noticed some of them were write protected, so I did a recursive chmod 777, and after compiling again, I was able to jsr install without errors. Woo-yay! :D Quoting CruzerYeah, lots of write protected files in the latest version. Makes it semi-broken I'd say. Okay, this is interesting. Of course i checked if the zip i uploaded builds fine after download, but i didn't check the prg target, nor did i suspect, or ever hear, that read-only source files would silently produce broken binaries.
Will investigate, but can anybody tell me more about this? |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Quoting algorithmthere should be a loadersymbols.inc file generated which will give you the offset jump table The jump table (consecutive jmp instructions jumping to the public routines, located at the beginning of loader.prg and install.prg) is only needed if you don't use loadersymbols.inc for whatever reason, otherwise it's just a waste of space and time. |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
Quote: yeah dont init loader when your part (music irq, whatever) is running. that gave me exactly the same errors =D
Can you elaborate? Normally, the init procedure should not be disturbed by whatever your IRQ handlers do, but KERNAL must be enabled, sprites are forbidden, and $dd00 must only be written to with proper masking (as opposed to $dd00 access after install). |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
i was probably doing one of the things you shouldnt do, likely sprites :) |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Just downloaded and recompiled it, without chmod'ing. This time no problems, so if zip file hasn't been altered, please disregard my previous statement about write protected files being the problem. I was pretty sure it was the chmod that solved it, but apparently I must have done something else too. Sorry for the false alarm! But hey, I'm a n00b, what can you expect? :) |
| |
Krill
Registered: Apr 2002 Posts: 2969 |
There is a regression bug with the dependencies of the binary target, which i fixed today, snuck in when i added the +4 target. This effectively required a make clean before each make prg. (Cruzer: Doing the chmod probably touched all files so make would rebuild everything.)
Will fix the file permissions (must have changed due to various copying across media and OSes) and also a few other minor things (like the Java dependency), then upload a new version.
Sorry for the inconvenience. |
| |
TheRyk
Registered: Mar 2009 Posts: 2218 |
Only because there was a lot of blabla about Krill Loader after BCC#10 (see CRX Race) and I had admitted having had trouble with Krill-Loader-using releases (which I've never contributed carelessly to the loader without decently checking out other reasons, however), I feel obliged to make crystal clear, that all my problems turned out to be a slightly broken power suppy providing about 11.7 V on the 12 V on-load(!).
About 0.3 to 0.5 V difference seems(!) neglectable, but was DEFINETELY the reason, as 2 drives (with perfectly clean reading-head) failed with the power supply in question (tested with BCC#10 trackmos, CRX Race and David Bowie Collection) but worked fine with 2 other power supplies producing 12 V or slightly more.
Bottom Line: I recommend everyone, especially DATA-Land, to measure power supply _on-load_ (i.e. while-loading) if you face crashes with releases using Krill loader. |
| |
Thunder.Bird
Registered: Nov 2003 Posts: 109 |
Didn't you pay your electricity bills? *heheheh* :D
At X2016 mayby somebody helps you out with a PSU.
"Remember to spread the love" ;) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
i feel like pointing to post #3 :) |
| |
Ninja
Registered: Jan 2002 Posts: 411 |
Well, your conclusion is true if most other loaders fail, too. If it is only Krill's loader which fails, then another conclusion might be that it is too far on some edge and he has now a starting point to find out which.
Have you tried the loaders of lft and Bitbreaker? |
| |
Bitbreaker
Registered: Oct 2002 Posts: 504 |
It is not even clear what kind of problems occur, nor is there a testcase to track down the quality of the problem. There's so many points where loading can fail, be it the stepping, the spinning speed, transfer. Then also, how are errors covered? Does the respective release make use of error codes or hang? One could also just ask an oracle about a solution. One slight hint the low 12 line gives might be spinning speed at least, but it is only a hint. Also, it is often easy to blame the loader when things break, but never it was the fault of irqs fucking registers or wild and arbitrary poking on $dd00 :-D
As for further evaluation i can hand out a bitfire .d64 for testing, but also doing some measures on spinning speed would be worth a try. Such cases need collection of data and further information. |