Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Friday, 8 July 2011

EasyMiNT again...

After using aranym+freemint for a while I found I didn't have any space left on my development ext2 partition. I suspect there are much easier ways of sorting this out, but here's what I did.. Basically this was just to get the basic 'sparemint' rpm distribution installed (basic unix filesystem) + a few extra utils.

So my starting point is a drive C (gem) and drive d (512meg ext) partitions. Somehow I have previously downloaded a system that boots to the emutos desktop but running mint. I have easymint: em.170 which I suspect is from the file EM_170.zip downloaded from massi Soft.
I'd reconfigured the system to boot from E. which actually turned out to be fine because my 'C' boot up didn't work, it also appears that EasyMiNT requires a working mint.
Before you re-run easymint - the installer,
-check that there are a bunch of files in c/em.170/pakete/
Files are *.tar and *.list.
-delete the tmp folder in c/easymint/tmp -- this tells easymint that it needs to start again from scratch.

The problem I had was that I wanted to replace drive D with a bigger one. So I had to create a blank ext2 partition. You can save yourself so much time by using either the built in one in aranym but instead I installed something on the mac called "Ext2FS_1.4d4"
All that was just so I could type dd and mkfs according to these instructions..

So after all that pain I had a working 1.5 gig ext2 partition.. for the record:
>dd if=/dev/zero of=./gigtest.img bs=1024k count=1536
>/usr/local/sbin/mke2fs ./gigtest.img
but mostly there must be an easier way (eg; find a debian machine and tar.gz the results..)

So the extra pain was that there were alot of trouble editing files on the C drive so that I could re-run easymint. And more pain trying stuff where drive C just wouldn't boot up.

Oh, the final result... (if only the terminal would let me copy and paste)..

>df -h
Filesystem Size Used Avail Use% Mounted on
c:/ 250M 225M 25M 90% u:/
d:/ 1.5G 329M 1.1G 22% u:/
e:/ 37T 23T 14T 62% u:/
r:/ 262M 8.0k 261M 1% u:/
u:/ 1.5G 329M 1.1G 22% u:/

So it looks like the base install uses 329 meg.

Sunday, 24 May 2009

recommended software to get started with...

There are still a few people developing new software for the standard (non-multitasking) TOS.

Firstly, desktop replacements: I found teradesk and I like it. It is available from
here.

I found an editor which is specifically for html. Only I like to program so I'm using it as a normal text editor too. Its called Joe. There are a few other programs available from this page, they all seem to be free and the author seems to be a bit of a fan of GFA basic. Get it from here.

And finally, I wanted to get perl for the Atari. The latest version that I see that runs with TOS is version 4, and these are found in the form of zoo archives. Pain in the neck...
Anyway the Perl files I found were:
perl4_10.zoo (252kb)
perl_419.zoo (191kb)

Then the zoo archive program was zoo21.lzh

And to unpack the zoo program I used winrar (boo.. hiss..)

So, once I had ZOO.TTP and readme.st, it was just a matter of typing in the correct command line. Which turned out to be a right pain because I couldn't find the forward slash key..
In Teradesk, I ran Zoo.ttp and entered 'x C:/ATARI/perl_419.zoo'
and hey presto, it all unpacked.

Perl 4 is not as cool as later versions of perl and perhaps there's a 'command line' for the ST that would make error messages stay on-screen for longer, but any bugs in my perl didn't seem to be usefully reported to the screen. After a lot of trial and error, I wrote a working prime number generator..

@primes = (2);

$t_s = time;
for ($i = 3; $i < 35000; $i = $i+2) {
$sqrt_i = sqrt($i);
$prime = 1;
foreach $k (@primes) {
if ( 0== $i%$k) {
$prime = 0;
# print " $i is divisible by $k \n";
last;
} elsif ($k > $sqrt_i) {
last;
}
}
if ($prime) {
push (@primes, $i);
}
}
$t_e = time;

The two biggest bugs were:
'push @primes, $i;' -- didn't work because you need brackets for push.
'if ($i%$k) {' -- didn't work because that wasn't the correct test..
'if (not $i%$k) {' -- should have worked, but seems perl 4 doesn't work like that.

So that's plenty enough for one day...