Welcome, Guest. Please login or register.

Author Topic: 68k AGA AROS + UAE => winner!  (Read 26223 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #74 from previous page: April 16, 2004, 08:23:33 PM »


I forgot to attach the binary-image to MSDOS disk program,
is this program correct?


#include /* just includes */

#include

#include
#include
#include

int main( int argc , char **argv )
{
int ret = 20 , closer = 0 , SECTOR_SIZE , SECTOR_NUM , sector ;
struct MsgPort *TrackMP = 0 ;
struct IOExtTD *TrackIO = 0  ;
UBYTE *WriteBuffer = 0 ;
struct DriveGeometry *geom = 0 ;
FILE *fp = 0 ;

if( argc < 3 )
 {
 printf("%s binary_file unit [for_real]\n" , argv[0]) ;
 printf("eg\n%s ram:xys 1 1\n for PC1:" , argv[0] ) ;
 return( 20 ) ;
 }

fp = fopen( argv[ 1 ] , "r" ) ;
if( fp==0 ){ printf("couldnt open %s\n" , argv[ 1 ] ) ; return( 20 ) ; }

TrackMP = CreatePort( 0 , 0 ) ;
if( TrackMP==0 ){ printf("CreatePort error\n" ) ; goto cleanup ; }

TrackIO = (struct IOExtTD *)CreateExtIO( TrackMP , sizeof( struct IOExtTD ) ) ;
if( TrackIO==0 ){ printf("CreateExtIO error\n"); goto cleanup ; }

if( OpenDevice( "mfm.device" , atoi( argv[ 2 ] )  , (struct IORequest *)TrackIO , 0 ) )
 {
 printf("failed to open drive %d\n" , atoi(argv[2]));
 closer = 0 ;
 goto cleanup ;
 }
else closer = 1 ;


geom = AllocVec( sizeof( struct DriveGeometry ) , MEMF_PUBLIC | MEMF_CLEAR ) ;
TrackIO->iotd_Req.io_Data = geom ;
TrackIO->iotd_Req.io_Command = TD_GETGEOMETRY ;
DoIO( (struct IORequest *)TrackIO ) ;

printf("sector size=%d, numsectors = %d\n" , geom->dg_SectorSize ,
  geom->dg_TotalSectors ) ;

SECTOR_SIZE = geom->dg_SectorSize ;

SECTOR_NUM = geom->dg_TotalSectors ;

printf("sectors/track = %d, numsectors = %d\n" , geom->dg_SectorSize ,
  geom->dg_TotalSectors ) ;

if( argc==3 )goto cleanup ;

/* bytes/sector, sectors/drive, cylinders, sectors/cylinder, surfaces,
sectors/track,
*/
/* only support: full-sector writes on sector boundaries */


WriteBuffer = AllocVec( SECTOR_SIZE , MEMF_CLEAR | MEMF_PUBLIC ) ;

for( sector = 0 ; sector < SECTOR_NUM ; sector++ )
 {
 PutStr(".") ; Flush( Output() ) ;

 fread( WriteBuffer , 1 , SECTOR_SIZE , fp ) ;
 
 TrackIO->iotd_Req.io_Length = SECTOR_SIZE ;
 
 TrackIO->iotd_Req.io_Data = WriteBuffer ;
 TrackIO->iotd_Req.io_Offset = SECTOR_SIZE * sector ;
 TrackIO->iotd_Req.io_Command = CMD_WRITE ;
 DoIO( (struct IORequest *)TrackIO ) ;
 }

ret = 0 ;

cleanup:
if( WriteBuffer ){ FreeVec( WriteBuffer ) ; WriteBuffer = 0 ; }
if( geom ){ FreeVec( geom ) ; geom = 0 ; }
if( closer ){ CloseDevice( (struct IORequest *)TrackIO ) ; }
if( TrackIO ){ DeleteExtIO( (struct IORequest *)TrackIO ) ; TrackIO = 0 ; }
if( TrackMP ){ DeletePort( TrackMP ) ; TrackMP = 0 ; }
if( fp ){ fclose( fp ) ; fp = 0 ; }
return( ret ) ;
}

 

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #75 on: April 16, 2004, 11:42:28 PM »


@bloodline,

re: big vs little endian PC AROS,

perhaps a practical path is 2 versions thus:

1. Uncompromising little endian, *no* backward 68k compatibility,
   aimed as the long term version of AROS,

2. Big endian shared OS data structures version for full 68k compatibility,
   as a short term version of AROS in order to attract 68k owners,


A lot of people will not use AROS unless it has full 68k compatibility,
I know this because I mentioned about AROS booting on PCs to someone I know
who has his finger on the pulse of the scene and he underlined the fact
that AROS has limited 68k compatibility. When this guy raises an objection,
you have to listen, anyway I heard him,


usually we criticise people for being too short termist,
but here for the first time is an approach that maybe is too long termist,


The advantage of 2. is all it requires is a 68k emulator,
and a chipset emulator implemented via the AROS API,
ie no ROM,


simply subdivide RAM into 3: 1. x86 code area, 2. 68k code area, 3. other,
when x86 is active execute protect 2.,
when emulator is active read protect 1.,

the paging exceptions toggle between x86 and emulator,

this requires your OS datastructures to be at the byte level identical to
68k,

so its simply a matter of carefully slotting in a 68k emulator, and
also implementing the custom chipset via the AROS API,


/**
I spent several hours yesterday looking at Comet, Staples and PC World,
**/


/*
If it's your first PC it *might* be an idea to get a prebuilt system.
*/

worth it for the Windows stuff, the way they bundle Windows is a bit
like a drug pusher giving you some free drugs to begin with,

/*
But if you are going to do that, then still avoid the high streets.
If you really must go the high street route, then use something like
"Time Computers"... but if possible go to special)
st dealer.
*/

I visited Time, but they seemed a bit expensive and their systems
include eg monitor, possibly they are good value if you also need a monitor,


BTW I looked at the ATI-Radeon demo of a butterfly flying up to a chimpanzee,
when the salesman showed me that you could go to any viewpoint in the sequence
I realised what you meant,

things have moved on a lot since I last looked,

/*
You say you want to avoid M$ Windows. I say that it makes sense to at least have a
copy of 2000 or XP on your machine so you can run the lastest games,
and/or any important apps you might need.
*/

its a way out of compatibility problems, also it has been very revealing to
see just what MS are up to, more on this later,

/*
SCSI is pointless for any home user. Any modern drive
(Like the Western Digital's with thier 8meg caches) will be much cheaper and
offer similar performance. S-ATA is the new way to go so look for that if you can.
Don't forget that UAS2 and Firewire offer good Hard drive suppoer too,
though both are pricey.
*/

SCSI is just for my existing drives: I have 2 SCSI hard disks and 1 CDRW,
I like external drives because I can switch them off if I go on the internet
to prevent viruses,

I want to try and run my system entirely from external drives that way
internet drives will never be on at the same time as my programming drives,

to prevent viruses, I will switch off the one lot and switch on the internet
drive before connecting,

/*
Yes, It is testiment to Michal Shultz, Johan Grip et al,
hard work getting AROS booting the PC hardware.
Though the fact that PCs have a standard BIOS does help.
*/

backwards compatibility is their Achilles heel for alternative OS's?

for me so far this PC looks totally impenetrable,
I am getting a very clear picture now about what Windows really is,
and I think AmigaOS has a lot to offer,

At the moment I am alternating between the 2 systems by reconnecting just
my VGA socket and modem socket, so I can really know the truth now about
AGA A1200 vs current PC,
no more FUD possible because I now have both real things, real Amiga h/w and
real PC h/w

and its a current Windows XP machine,

/*
/*
/*
When choosing hardware you must first consider what your requirements are,
then choose what is useful and at the cheapest price. Ignore religious/political
issues like "brand" and "make", these things are unimportant when it comes to
technology.
*/
*/
*/

/*
/*
I am upset though that something so horrible as MS has a stranglehold,
why cant we have a quality monopoly,
*/
*/

/*
M$ Windows simply offers a standard way for software to talk to both
the user and the hardware. It does that job very well.
I it a shame hadware manufactures often only provide Windows drivers,
and never any source code. but Since windows *is* the standard)
this is little we can do about it, unless we offer a viable alternative for the user.
*/

the guy in PC World agreed that I could use Linux, but they dont bundle Linux,


/*
/*
Yes, just download the AROS CD image, burn that to a CD-ROM,
*/
*/

correction:

``Yes, just download the AROS CD doubly compressed image,
decompress it if you can *to* a PC, burn that to a CD-ROM,''

famous last words!

/*
then put that in the CD drive, turn the PC on...
AROS will boot and run by itself.
*/

not reached this stage yet,

/*
Wndows provides internet access and CD burning software, that alone makes it useful.
*/

I decided it was worth getting Windows, one should know what the competition is
up to, having tried out their system I dont think its a big deal,

IMO you could implement Windows XP in a few megabytes,
I've not seen the API but certainly the functionality is just
a few megs worth,


the OS3.9 CD provided quite comparable music + video viewing programs,
in fact I keep getting deja-vu trying out Windows XP,

when I begun the install I thought "this is OS1.2 MS AmigaBasic",

the install couldnt cope with the fact that I hadnt got any loudspeakers,

the text scrolling is really horrible,

King-Con's AGA shell history scrolling p*sses all over WindowsXP,

I wonder if maybe Windows XP was written in Microsoft's AmigaBasic??

every now and then I get a glimpse of the pre-Windows MSDOS black screen
with pulsating cusor, so they must have recycled some really ancient and
decrepit code,

My AGA Prefs totally outdo what this PC provides, this PC presents me
with about 3 screen resolutions all of which are wrong,

with AGA its near infinite, I believe also that AGA outdoes graphics cards
in such respects,

IMO AGA "high res" ie 640 x 256 screen is perfect, somehow if the res is
too high and there are too many colours I find I cannot focus on the
information.

despite all the graphics power if I change the screen resolution I can
literally see the subrectangles been drawn, slower than my AGA system,

its sufficiently slow that I think I may even be able to figure out what
rendering algorithm they are using, it looks really silly,


this machine is allegedly > 100 x as powerful as my A1200,
something doesnt add up,

please do not ever compare graphics card classic Amigas with AGA Amigas,
apart from the interleaved bitmaps AGA is actually quite fantastic,



Somehow if the interface is too "beautiful" then I cannot
focus my thoughts, so eg I much prefer fixed width fonts: because they
are bland I can focus on what is being said,

in the same way ugly politicians are preferable because
you can focus on the policies and not be distracted by
any charm element,

I wont get any programming done if I used some publishing quality
variable width fonts,

likewise if they sung the news it would be very difficult to focus on
the meaning,

the music player is fantastic sound quality, the sharpness (on my headphones)
felt like my eardrums were being etched, the Mozart was well chosen and well
performed (or is it Beethoven?), but one of the other 2 options has the
most humdrum lyrics ever, something on the level of
"I pared my toenails, then I stood up and looked at the light bulb",
at one point he sings about "breathing in", I will see if I can transcribe
the lyrics and maybe post them somewhere,

/*
To run AROS it needs to be either on a CD or on a floppy.
From the CD you can install it onto a hard drive and once there it can
boot without a Flopyp or CD
*/

I had no luck with the floppy, but there may be a bug in the program I wrote,
rather than debug it I thought I would try the CD path,

I think you need to supply or link to enough PC s/w to do the install,

the floppy binary doesnt seem worth compressing: compressed its 1.2 meg,
decompressed 1.4 meg (I think),

If you can bug fix my program maybe compile it and supply it for people
to install the floppy binary,

/*
AROS needs to be running in order to install itself on to a hard drive.
*/

ok, so its a 2 stage "bootstrap" install,

/*
The Black Troll machine is an AROS system, it does not come with Windows. It might
not be ideal for your needs.

The shop bundles do catch the first timers, but then they do make things very
painless for the first timer too.
*/

I think its only after you buy the machine that it dawns on you that
its not actually a computer but lots of units connected together,
and any of these units can be transplanted for low cost,

PC World told me I could buy a motherboard for a mere £47.59,
less than the CPU: £52.88,
so for less than £100 I can transplant these 2 items and have a totally
different machine,


eat your heart out Dr Frankenstein!

/***
You could build a Big Endien AROS for the x86 but that would be incompatible
with the faster Little Endian one.
***/

/**
effectively it would be AROS on a different platform,

it would be very interesting to see what exactly the slow down is,
you believe its 30% but as it hasnt been done we dont know for sure
**/

/*
It would be a different AROS platform, in the same way the PPC verison of AROS is.

Tests have confirmed that the slow down would be significant.
Amithlon has the advantage that even the lowest spec PC taking a
30% speed hit is still 10 times faster than the fastest real Amiga.
As Amithlon runs software meant for a real Amiga it's no great loss.
*/

/*
But how would you feel if you wrote a program and compiled it for Linux,
Windows and AROS. And the AROS version was 30% slower than the Windows and
Linux versions on the same machine? that sux, no one would bother with the
AROS version because it is crippl)
d. No speed penalty is worth it.
*/

very few people would measure it, the speed critical routines could
always be rewritten in little endian,

the idea of speed being a secondary issue is very much a Unix concept,
its certainly where I learnt the concept from, our department was
Unix through and through,

Unix programs are really bloated and inefficient,
the reason Unix is so widespread and successful is they put portability
and maintainability etc above speed decades ago,

c is also a Unix thing, the idea being that if you write an OS in c,
to port your OS all you have to do is port the c compiler,
we all take this for granted now but that was a radical innovation,
the fact that even AROS hinges on gcc proves this, and gcc is
many times more inefficient than Lattice C,


gcc is slow + totally portable,
Lattice C is very fast and produces faster binaries,
but AROS is using the slow compiler which produces the slow binaries,
all because someone put speed as a secondary issue,


we were taught that what really matters is asymptotic speed,
bubble sort is no good because it is an n-squared algorithm,
good algorithms are n-log-n,

dont worry about constant linear factors we were told again and again,
in lecture after lecture, dont worry even if the linear factor is 300%

Quicksort is said to be probably the fastest sorting algorithm on typical input
with average speed of n-log-n, however in the worst case it is n-squared,
so I wont use it, but a lot of people will and its in the standard c library
as qsort(),


:I will never use it because I believe in
robust algorithms == best worst case behaviour,

if you know a system is using a non robust algorithm
you could bring it to its knees by sending it the worst case situation,

some sorting algorithms grind to a halt or stack-overflow if you send
an already sorted list or a reverse sorted list,


viruses are all about worst case scenarios,

if a star-wars defence system algorithm has bad asymptotic behaviour
all the enemy has to do to defeat it is send a huge number of missiles
ie overload it with computational complexity,

send 2 batches of missiles, the first without warheads the second with,

:who knows it may even cause stack overflow!,
(computers are capable of quite awesome clangers),

or if for speed they are using a 16 bit register for number of incoming
missiles then send the missiles in batches of say 65536,
and it will think its 0 missiles causing 65536 missiles to get through,

(to play it safe exceed 65536 by some "safety" margin),


we were told that the US military likes networks where if you
blow up any node the full message still gets through intact!

they put this above speed, if you put speed topmost then
you could remove error detection and precompute
the path that a message would take which could be much faster,
but instead a message is broken up into pieces and the route is
recomputed afresh each time, the pieces could arrive in the wrong order,
so the receiver has to rearrange them into correct sequence => extra
space + time overhead,

/*
Also if the 68k was "inline" then the AROS would be less stable,
as bugs in old programs would be allowed to creep in and take down the OS.
If we run them in UAE, when they die, you can simily restart them.
The OS remains uncrashed.
*/

UAE will have its own WB screen or UAE + AROS will share the same WB screen?

/**
will each x86 API call have to synchronise the 68k data structures?
**/

/*
It would be up to the 68k verison working with UAE to make sure it
knows what the x86 OS is doing.

If you call a function in a library on the 68k side that function
will then call the coresponding function on the x86 side performaing
any byte order conversions if needed.
*/

probably it is doable in the sense that it may just require a few
minutes to patch each API call,


/***
This will allow 68k programs to run in the same environment as the x86 programs.
The only down side is that 68k programs will not be able to call x86
functions and vice versa. This could be possible, but probably not worth it.
The UAE Emulator will be running a 68k version of AROS (specially designed to
synchronise with the x86 version).
***/

/**
I suppose the open nature of AROS means someone else could
create their own variant of AROS some other way, (I'm not volunteering just yet!)

whereas with AmigaOS we would all be stuck with the company's decision,
**/

/*
You could, if you want, right now get the AROS sources and add in your own
"inline" 68k emulator and make a big endian verison of the x86 AROS.
The devs would even help you as best they can. That is the beauty of
Open source software.
*/

I may study some possibilities, I think at the moment its going to be
a challenge just to get "hello world" up and running on this PC,


this option for anyone at all to take AROS in their own direction
is a robustness feature of the AROS project,


eg with Amiga co. I feel they should have used Intel (or clone) and not PPC,
also I think they should have emulated OS3, released that and then begun on
new work OS4,

had it been AROS, Berndt would have gone down that path some years ago,


Eyetech being a h/w manufacturer strategically cannot go down
the Intel path because they would factor themselves out of the equation!



/****
everyone says its not a big deal that Eyetech created the A1,
I wondered whether they could prove this by doing their own one,
****/

/***
Anyone is able to sell Terrons.
I could put a little sticker on it if you like and sell it to you.
***/

/**
see you are telling me its not a big deal,
how much would you sell it for?
**/


/*
It was a brave market decision to push a PPC platform at that price,
but I guess Eyetech knew people would buy anything with an Amgia Sticker on it.

Sure I'll sell you one, hmmm how does $14 billion sound?
*/

how much profit do you think they make then per board?

is it just a matter of taking a standard PC and replacing the mobo by a Terron?


/**
but as you throw more and more objects it must eventually slow down?

ie

for( i = 1 ; ; i++ ){ introduce_1000_objects() ; }

must eventually catch up with your CPU power,

how about 10000 explosions?
**/


/*
A Modern graphics card has a GPU (a dedicated Processor) that is as powerfull as super computers were 10 years ago. When programming 3D with a modern Graphics Card (using DirectX or OpenGL, whatever) you left the GPU do all the hard stuff and left the CPU )
orry about the game logic.

You will have to see the performance to believe it.
*/

I saw the chimp + butterfly demo in TIME yesterday, so I think I understand now
what you meant,

each leaf in that jungle would take an A500 ages to render,


it made me think of ground-hog-day, the butterfly appears to repeatedly fly
along exactly the same path,


I remember when people would leave their A500 running through the night
to render a teapot + billiard ball and things, (not every night!),


/***
We need the 68k AROS for the integrated UAE Emulator idea.
I also want to run AROS on my A1200. We do have a working 68k AROS,
but it needs to be adapted to boot the Amgia Hardwre.
At the moment it only boots the Palm PDA.
***/

/**
reimplementing AmigaOS via the same custom chips!

you may need to study UAE to understand the custom chips!

(a bit like studying AROS to understand AmigaOS),

I hope you fix some of the existing bugs eg
AGA SetRGB32CM doesnt set the lower 4 bits of the blue component,

also blitter OS calls can fail horribly on bitmaps exceeding
1024 pixels width even though the h/w can cope with huge bitmaps,

according to the autodocs someone forget to set an AGNES big blit flag
they knew that in 1992 and havent yet fixed the bug!
**/

/*
Booting UAE would be much easier than a Rael Amiga, since one could bypass the
hardware bootstrap. Using UAE one might be able to figure out how the hardware
is initilised at power on.
*/

I think the early initialisation is documented at the back of some of the RKMs,

have a look in both the first and second edition RKMs,

Alternatively have a read of some of the assembler-games-writing tutorials
in the Amiga mags of long ago, the cover disks supplied assembler complete with
explanations,

/*
In the 68k version of AROS, one would not have the same bugs as AmigaOS,
unless there is specific reason to copy that bug.
*/

the graphics render bugs need fixing,

I think printer.device retains bugs for compatibility:
ISTR the autodocs discuss these bugs,


 

Offline that_punk_guy

  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 4526
    • Show only replies by that_punk_guy
Re: 68k AGA AROS + UAE => winner!
« Reply #76 on: April 17, 2004, 12:03:35 AM »
@whoosh777

Re: .tar.bz2 files.

If I recall correctly, TAR is not intended to compress the contents, it's a simple archiving format. The reason this is done is because you can only bzip individual files. It's a "Unix thing" indeed, but you can open then on Windows if you have WinRAR.

It's fully-functional shareware, not difficult to find. Try not to freak out too much.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: 68k AGA AROS + UAE => winner!
« Reply #77 on: April 17, 2004, 05:07:17 PM »
Quote

IMO you could implement Windows XP in a few megabytes,
I've not seen the API but certainly the functionality is just a few megs worth,


:lol: Tell it to Microsoft :-D

The truth is

1) There's a vast amount of redundancy in windows. There are literally dozens of different was a user can do the same thing.

2) There's tons of functionality most people aren't aware of and wouldn't neccessarily use even if they were. Loads of services and other features are included that the average home user has no idea about.

3) When updating windows resources, it's extremely rare to find that a set of .dll files or whatever are actually updated as it's not time/cost effective for MS to bother. Most of the time, newer .dll files are simply added. There's a lot of historic bloat alone that comes from this.

4) Most likely your preinstalled windows xp has system restore and other features enabled. This is basically like having a copy of the CD in a folder under your xp installlation and if something goes wrong, you can restore the last working configuration.

In the end, it all adds up to one gargantuan behemoth :-D
int p; // A
 

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #78 on: April 17, 2004, 09:16:22 PM »
Edit: the source code has been improved via some but not all of
Pirus suggestions from a reply to this posting in the future!

:the program is also improved now to read + write any binaries
eg AmigaOS and PC,

The PC MSDOS disk binary writer is correct provided you create a binary
by the same method, just tested it out and it correctly copied a PC disk,

you can download the 68020 binary + source here:

http://www.whoosh777.pwp.blueyonder.co.uk/trackdisk.lha

[code]

/************** Usage: ***************/

run with no arguments or just 1 argument ? for usage info

convert disks to and from binary files, usage:

prog binary_file unit (w|r) (device)

w => write to disk read from file,
r=> read from disk write to file
default device==mfm.device for PC disks
trackdisk.device for AmigaOS disks,
use other devices at your own risk: BEWARE


examples:

trackdisk ram:xyz 0 r trackdisk.device ; create AmigaOS df0: binary ram:xyz
trackdisk ram:xyz 2 w trackdisk.device ; write  to AmigaOS df2: from binary ram:xyz
trackdisk ram:uvw 1 r                  ; create PC1: binary ram:uvw
trackdisk ram:uvw 1 r mfm.device       ; create PC1: binary ram:uvw
trackdisk ram:uvw 1 w mfm.device       ; write to PC1: from binary ram:uvw
trackdisk ram:uvw 1 w                  ; write to PC1: from binary ram:uvw


/*************************************/

the improved source with complete headers is:

#include
#include
#include
#include
#include

#include
#include
#include
#include
#include
#include
#include

extern struct ExecBase *SysBase ;

int main( int argc , char **argv )
{
struct Task *task = FindTask( 0 ) ;
int ret = 20 , read = 1 , write = 0 ,
 closer = 0 , SECTOR_SIZE , SECTOR_NUM , sector ;
unsigned SIGNAL = SIGBREAKF_CTRL_E ;
struct MsgPort *TrackMP = 0 ;
struct IOExtTD *TrackIO = 0  ;
UBYTE *WriteBuffer = 0 ;
struct DriveGeometry *geom = 0 ;
FILE *fp = 0 ; BPTR out = Output() ; char *device = "mfm.device" ;

if( argc < 3 )
 {
 FPrintf( out , "convert disks to and from binary files, usage:\n" ) ;
 FPrintf( out , "\nprog binary_file unit (w|r) (device)\n\n" ) ;
 FPrintf( out , "w => write to disk read from file,\n"
  "r=> read from disk write to file\n"
  "default device==mfm.device for PC disks\n"
  "trackdisk.device for AmigaOS disks,\n"
  "use other devices at your own risk: BEWARE\n"
  "\n\nexamples: \n\n"
 "%s ram:xyz 0 r trackdisk.device ; create AmigaOS df0: binary ram:xyz\n"
 "%s ram:xyz 2 w trackdisk.device ; write  to AmigaOS df2: from binary ram:xyz\n"
 "%s ram:uvw 1 r                  ; create PC1: binary ram:uvw\n"

 "%s ram:uvw 1 r mfm.device       ; create PC1: binary ram:uvw\n"
 "%s ram:uvw 1 w mfm.device       ; write to PC1: from binary ram:uvw\n"
 "%s ram:uvw 1 w                  ; write to PC1: from binary ram:uvw\n" ,

 argv[ 0 ] , argv[ 0 ] , argv[ 0 ] ,
 
 argv[ 0 ] , argv[ 0 ] , argv[ 0 ]
 
  ) ;
 return( 20 ) ;
 }

if( argc==3 || tolower(argv[ 3][0])=='w' )
 { read = 0 ; write = 1 ; fp = fopen( argv[ 1 ] , "r" ) ; }
else { read = 1 ; write = 0 ; fp = fopen( argv[ 1 ] , "w" ) ; }

if( argc >= 5 )device=argv[ 4 ] ;

if( fp==0 ){ FPrintf( out , "couldnt open %s\n" , argv[ 1 ] ) ; return( 20 ) ; }

TrackMP = CreatePort( 0 , 0 ) ;
if( TrackMP==0 ){ FPrintf( out , "CreatePort error\n"); goto cleanup ; }

TrackIO = (struct IOExtTD *)CreateExtIO( TrackMP , sizeof( struct IOExtTD ) ) ;
if( TrackIO==0 ){ FPrintf( out , "CreateExtIO error\n" ) ; goto cleanup ; }

if( OpenDevice( device , atoi( argv[ 2 ] )  , (struct IORequest *)TrackIO , 0 ) )
 {
 FPrintf( out , "failed to open drive\n" );
 goto cleanup ;
 }

closer = 1 ;

geom = AllocVec( sizeof( struct DriveGeometry ) , MEMF_PUBLIC | MEMF_CLEAR ) ;
if( geom==0 ){ FPrintf( out , "failed memory allocation\n"); goto cleanup ; }
 
TrackIO->iotd_Req.io_Data = geom ;
TrackIO->iotd_Req.io_Command = TD_GETGEOMETRY ;

if( DoIO( (struct IORequest *)TrackIO ) )
 { FPrintf( out , "i/o error, quitting\n" ) ; goto cleanup ; }

FPrintf( out , "sector size=%ld, numsectors = %ld\n" , geom->dg_SectorSize ,
  geom->dg_TotalSectors ) ;

SECTOR_SIZE = geom->dg_SectorSize ;

SECTOR_NUM = geom->dg_TotalSectors ;

FPrintf( out , "sectors/track = %ld, sectors/cylinder = %ld\n" ,
 geom->dg_TrackSectors , geom->dg_CylSectors ) ;

if( argc==3 ){ ret = 0 ; goto cleanup ; }

/* bytes/sector, sectors/drive, cylinders, sectors/cylinder, surfaces,
sectors/track,
*/
/* only support: full-sector writes on sector boundaries */


WriteBuffer = AllocVec( SECTOR_SIZE , MEMF_CLEAR | MEMF_PUBLIC ) ;
if( WriteBuffer==0 ){FPrintf( out , "memory allocation failed\n" ); goto cleanup ;}

PutStr( "type control-E to quit\n" ) ;

for( sector = 0 ; sector < SECTOR_NUM ; sector++ )
 {
 int amount ;
 
 if( task->tc_SigRecvd & SIGNAL )
  {
  Wait( SIGNAL ) ; /* no wait, to clear the signal */
  PutStr("\n***Break\n" ) ; Flush( out ) ;
  goto cleanup ;
  }
 
 PutStr(".") ; Flush( out ) ;

 amount = SECTOR_SIZE ;
 
 if( write )
  {
  amount = fread( WriteBuffer , 1 , SECTOR_SIZE , fp ) ;
  if( amount < SECTOR_SIZE )
   { ret = 20 ; FPrintf( out , "file ends early\n"); }
  if( amount==0 )break ;
  TrackIO->iotd_Req.io_Command = CMD_WRITE ;
  }
 else TrackIO->iotd_Req.io_Command = CMD_READ ;
 
 TrackIO->iotd_Req.io_Length = SECTOR_SIZE ;
 
 TrackIO->iotd_Req.io_Data = WriteBuffer ;
 TrackIO->iotd_Req.io_Offset = SECTOR_SIZE * sector ;

  {
  int err , count ;
  count = 0 ;
  while( 1 )
   {
   if( task->tc_SigRecvd & SIGNAL )
    {
    Wait( SIGNAL ) ; /* no wait, to clear the signal */
    PutStr("\n***Break\n" ) ; Flush( out ) ;
    goto cleanup ;
    }
 
   err = DoIO( (struct IORequest *)TrackIO ) ;
   if( err==0 )break ;
   if( err )FPrintf( out , "DoIO error %ld\n" , err ) ;
   count++ ;
   if(count==5){FPrintf( out , "I give up,\n" ) ; goto cleanup;}
   }
  }

 if( read )
  {
  amount = fwrite( WriteBuffer , 1 , SECTOR_SIZE , fp ) ;
  if( amount < SECTOR_SIZE )
   { FPrintf( out , "file error\n"); goto cleanup ; }
  }
 if( amount < SECTOR_SIZE )break ;
 }

ret = 0 ;

cleanup:

if( WriteBuffer ){ FreeVec( WriteBuffer ) ; WriteBuffer = 0 ; }
if( geom ){ FreeVec( geom ) ; geom = 0 ; }
if( closer ){ CloseDevice( (struct IORequest *)TrackIO ) ; }
if( TrackIO ){ DeleteExtIO( (struct IORequest *)TrackIO ) ; TrackIO = 0 ; }
if( TrackMP ){ DeletePort( TrackMP ) ; TrackMP = 0 ; }
if( fp ){ fclose( fp ) ; fp = 0 ; }
return( ret ) ;
}

[\code]
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: 68k AGA AROS + UAE => winner!
« Reply #79 on: April 17, 2004, 09:47:53 PM »
Quote
Code: [Select]
#include <pragmas/exec_pragmas.h>
#ifdef LATTICE
#include <clib/exec_protos.h>
#endif
#include <clib/alib_protos.h>
#include <clib/exec_protos.h>
#include <clib/dos_protos.h>

Use:
Code: [Select]
#include
#include
#include

instead. More portable.
Quote
Code: [Select]
int ret = 20;

Use:
int ret = RETURN_FAIL;
later, ret = RETURN_OK; and ret = RETURN_FAIL;
Quote
Code: [Select]
TrackMP = CreatePort( 0 , 0 ) ;
if( TrackMP==0 ){ printf("CreatePort error\n"); goto cleanup ; }

TrackIO = (struct IOExtTD *)CreateExtIO( TrackMP , sizeof( struct IOExtTD ) ) ;

Use CreateMsgPort/DeleteMsgPort and CreateIORequest/DeleteIORequest. Why use amiga.lib when these routines are in exec.library ?

Quote
Code: [Select]
WriteBuffer = AllocVec( SECTOR_SIZE , MEMF_CLEAR | MEMF_PUBLIC ) ;

geom = AllocVec( sizeof( struct DriveGeometry ) , MEMF_PUBLIC | MEMF_CLEAR ) ;

Allocation can fail. You MUST check for NULL result from AllocVec and act accordingly.
Quote

mixing printf and PutStr / Flush

Don't mix stdio and dos.library calls. This won't work properly (output problems due to buffering). Either use only stdio functions or only dos.library functions.

In fact, there is no need to use stdio in the program, just use dos.library and get rid of all stdio stuff. The code will never be portable anyway, so why use stdio?

Quote
Code: [Select]
DoIO( (struct IORequest *)TrackIO ) ;

IO can fail. You should implement retry (maybe 5 times), and if retry fail, report the error.
 

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #80 on: April 17, 2004, 10:14:00 PM »

@Karlos

BTW you are in good company with your views, as they are
exactly what we were taught by our computing lecturers,

eg RISC better than CISC, many registers = good idea,

I went away believing that, but several years later
I bought a PC mag and it said that Intel CISC are the
fastest consumer CPUs,

and from my education I had thought "by now RISC such as
in MIPS will have totally superceded Intel",

so at that point I begun to doubt the conventional wisdom,

and then here in the Amiga forums we were told again and again
that Intel totally outdoes PPC RISC, PPC RISC is very similar to
MIPS RISC, this further underlined my loss-of-faith in
the conventional view,

As its off topic, if you wish to continue the discussion
perhaps we should continue via email but possibly not on a
daily basis as time is currently in very short supply!

/*
I sincerely suggest you read the PPC open ABI specification to get a
better understanding of how it works.
*/

where would I find this?, any URL?

/*
The issues you raise almost never occur due to how the ABI is layed out.
Stack based calling is rare (unless you have more than 8 integer/pointer part
meters). Those registers never need to be backed up before a call because the
compiler won't use them to hold anything that needs to survive a call.
*/

if you have a huge number of registers, then subject to that
you could have eg 100 scratch registers, 100 function argument registers,
100 internal function registers etc,

my question is whether you could achieve identical results with say just 16
registers via careful register usage, I think you can and that
 a lot of chip complexity clutter can be swept out, resulting in a much
faster chip,

BTW one area where register arguments is a bit awkward is with
variable argument functions such as printf() and AmigaOS taglist functions,

accessing the n-th argument becomes longer, because your initial 8 registers
will need extra code, the only way out is if the h/w allows you to treat
the registers as an array,

another subtlety is that in c I can do:

int f( int x ){ int *y = &x ; ... }

ie I can take the address of a function argument, its not a big deal but
it means you would have to copy x to a stack cell that now represents x,


here is a taglist fragment from a real program of mine, 26 arguments,
and this is quite typical of intuition.library taglist calls:


screen = OpenScreenTags
           (
           NULL ,
           SA_Interleaved , interleaved ,
           SA_DetailPen , detailpen ,
           SA_BlockPen , blockpen ,
           SA_Behind , TRUE ,
           SA_Depth , depth ,
           SA_Width , width ,
           SA_Height , height ,
           SA_Title , (int)title ,
           SA_ShowTitle , TRUE ,
           SA_AutoScroll , autoscroll ,  
           SA_Overscan , OSCAN_TEXT ,
           SA_DisplayID ,screenmode ,
           TAG_DONE
           ) ;
 

generally taglists are heavyweight API calls so the time factor is
irrelevant,

/*
When I look at well optimised PPC code generated from a good compiler,
I see very little stack usage, very little register backup etc.
*/

count also the register usage, ie how many different registers get used,
IMO this will often be much smaller than you imagine,
(depends how good the compiler is),

BTW IMO optimisation is a relic from the days when computers had
1kb of memory and were 10 instructions/second,

todays computers are so ridiculously fast that optimisation
is no longer the issue it once was,

I once wrote a simple file splitting program, ie

prog  file  1000

will split file into 2 files file1 and file2 where file1 is 1000 bytes
and file is the conctenation of the 2,

I did it via a  fputc( fgetc(in_fp) , out_fp ) ; loop,

it was very slow, so instead I replaced it with a

          amount = fread( array , 1 , 30000 , in_fp ) ;
          fread( array , 1 , amount , in_fp ) ;

loop, this caused a staggering speedup,

Now had I compiler-optimised the original program, it would have
made no difference,

ie the slowness was caused by a factor on a higher plane, way beyond
the scope of a compiler,

Often program speed is determined by what type of h/w i/o caching is used
(as above), or what memory-allocation mechanism is used,

:compiler optimising such programs (eg gcc -O2 -c prog.c -o prog.o)
will not speed it up, the slowness being on a higher plane,

this is why our lecturers were entirely right in telling us to always
focus on the algorithms and not on system-specifics such as computer language,

with disk i/o you can use your eyes and ears, if the prog makes the disk leds
light up smoothly with silence then the algorithm is good, but if the
led's blink rapidly and the drive makes a noise its a bad algorithm,

/*
All the examples you have posted so far tend to deal with linear code,
doing fairly simple arithmetic.

x = a + b * (c + (d*d)); etc.
*/

most of an OS is like this,
take the c: directory, most of the maths is quite trivial,

if you type:

c:list ram: lformat="%p%n" all

the program recursively calls Examine(), it will have the directory name
in a string and then concatenate each filename to this string,
which it then prints,

so the maths really is totally trivial, mainly + to determine stringlength,
its quite a bit of effort to write:
lots of trawling through the dos.library autodocs, my datesorter prog
involves this sort of code,

anyway most of an OS is conceptual rather than mathematical,
eg the concept of a Task doesnt involve maths, a task is a non
mathematical thing, the maths would be eg seeing if another task
has a high enough priority to pre-empt it,

eg if a waiting task is awoken by say control-C in its window,
the OS will see if its priority is sufficiently high to
immediately pre-empt the executing task,

Wait( SIGBREAKF_CTRL_C ) ;

/*
Chuck in function calls (some of which may be inlined),
multidimensional pointer dereferences (that may be used several times
in one expression), etc., and more and more volatile registers
becomes useful to hold temporaries that may be needed more than once
*/

vector maths I think may require totally different CPU architecture,

Oh BTW one thing I thought of is that probably the speed of 3D games
maybe is decided by the speed of the graphics card,

so maybe PPC 3D games and Intel 3D games will run at identical speeds?

maybe even A1200 + ATI-Radeon 9800 will be very impressive??

Graphics cards seem now to be the most expensive part of PCs,
£199 for ATI-Radeon, £80 for VGA switcher box, £53 for CPU,
£48 for mother-board, in PC World,

:puts things in perspective,

 

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #81 on: April 17, 2004, 10:39:04 PM »
   
   
     Re: 68k AGA AROS + UAE => winner!
     
     by Karlos on 2004/4/17 17:07:17
     
     Quote:
     
/**    

  IMO you could implement Windows XP in a few megabytes,
  I've not seen the API but certainly the functionality is just a few megs worth,
**/    
     
     
/*
Tell it to Microsoft
     
The truth is
     
1) There's a vast amount of redundancy in windows.
There are literally dozens of different was a user can do the same thing.
*/

too many help options, which also makes it difficult to remember which help option led to some useful help,


/*
2) There's tons of functionality most people aren't aware of and wouldn't
neccessarily use even if they were. Loads of services and other features are
included that the average home user has no idea about.
*/

its an exercise in intimidation and dumbing down,

If you brought in a bulldozer and removed all the progs then
I think the few megs I mentioned would remain,

AmigActive magazine was quite capable of filling an entire CD with
huge amounts of interesting material, thats where I got my free MakeCD
from for example.

:I think any of their coverCD's would give Windows XP a good run for its money!


Windows also have taken much too much trouble in prettifying the interface,
I am much more interested in ease of use and what a prog does than
in the appearance,


/*
3) When updating windows resources,
*/

I havent got that far yet!

/*
it's extremely rare to find that a set
of .dll files or whatever are actually updated as it's not time/cost
effective for MS to bother. Most of the time, newer .dll files are simply added.
There's a lot of historicC
bloat alone that comes from this.
*/

probably I will understand this later,

it seems everything is going to be .xyz

.dll  .exe

/*
4) Most likely your preinstalled windows xp has system restore and other
features enabled. This is basically like having a copy of the
CD in a folder under your xp installlation and if something goes wrong,
you can restore the last working configuration.

In the end, it all adds up to one gargantuan behemoth
*/

annoying that they didnt give me an XP CD,


all the years of MS FUD are very rapidly caking off!

active mice pointers really irritate me, on my A1200 the mouse is totally passive
as you move it along nothing happens till you actively click,


(except those equally irritating help bubbles on some Amiga progs,
with MakeCD I had real difficulty rotating the options because the
help bubble was in the way and I couldnt get around it to the
rotator-thingy it described),


Its going to be really good fun finding out the truth about this system,

 

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #82 on: April 17, 2004, 11:10:22 PM »

@that_punk_guy

Re: .tar.bz2 files.

/*
If I recall correctly, TAR is not intended to compress the contents,
it's a simple archiving format. The reason this is done is because you can only
bzip individual files.
*/

I wasnt aware of this, I never paid too much attention to the sizes before,

I only noticed it this time because of the hugeness,

on the Amiga the word "archive" has tended to be used synonymously with
the word "compressed",


/*
It's a "Unix thing" indeed,
*/

actually to be pedantic is it more of a Linux thing?

I say this because I had to port bzip2 myself to the Amiga as it wasnt
on Geekgadgets, I needed it for rpm which is Red hat,
it was the easiest port ever, I think it took 15 minutes to port on my
68030 A1200, a straight recompile,

rpm OTOH is a nightmare port (to classic 68k Amiga, for Linux it will
of course be a mere recompile),

my port of bzip2 is on the rpm.html page of my website,
and its there as a .tar.gz file (for reasons of self-referentiality!)

isnt gzip the Unix thing??


/*
but you can open then on Windows if you have WinRAR.
*/

thanks for the link, this may fix the problem,

/*
It's fully-functional shareware, not difficult to find.
*/

but I am a PC newbie!


/*
Try not to freak out too much.
*/

sorry!

I am really freaked out about DiskSalv though, using it to fix the
damage done by Fryingpan.lha: DiskSalv wiped out the bin directory
of my GeekGadgets,

I only discovered this when I attempted to use something in gg:bin/

luckily I dont trust DiskSalv and copied the entire partition to
another partition before attempting it,

:this backing up of the unwritable partition with 600 Meg of files took
 many many hours,

So I will have to copy all the wiped out stuff back via script,

I think I will never use DiskSalv again, how dare it and FryingPan
wipe out Geek, I wonder what other damage was done, the script I will use
will tell me,

luckily I also have 2 backups of all work directories, though a few weeks of work
is not backed up except backed up to another partition,

I remember the OS3.9 install overwrote everything on the partition,
 
 

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #83 on: April 17, 2004, 11:25:29 PM »
@NightShade737

/*
You really need to be a LOT more specific.
You can't just say Radeon 9800, or even worse just GeForce.
The name GeForce has been given to a line of cards spanning ~5 years,
so giving me a price and saying GeForce doesn't mean anything.
*/

I have absolutely no idea, I just bought the PC, so I know zilch about this, its all jibberish to me!

the machine currently has a shared memory Intel extreme graphics card, a cousin of the machine has 9800 SE,

can you name specifics that I should look for?

/*
The price on the 9800 is also useless unless it has an extension (SE, Pro, XT).
 From that price I guess it is an SE, which is a BAD price
*/
/*
(roughly £115 new anywhere else).
*/

which site has it at this price, how does the SE compare with the others,
eg whats missing or is it slower??

will the Chimp + butterfly demo run on all 3?


/*
It could be a plain one with no extension,
but you need to specify. The PC-World sit
 gives me 2 hits, neight for that price.
*/

the PC World one is £199,


/*
 VGA switches can range from £10 to £200,
the price depends on the output quality and the features.
Pay more if you want better quality.
*/

I want cheapest simplest possible, where should I look for a £10 one?

all I want is to connect my PC and A1200 to the same VGA TFT,


so I dont need one which can deal with 8 monitors or does keyboards as well,
merely 2 computer VGA cables in and one monitor VGA cable out,


at the moment I reconnect the VGA cable while all 3 machines are switched off,


/*
 I have no idea on A1 or Peg compatability as I don't care about either.
*/

fine,

I forgot to ask: AROS compatibility also matters, or will they all function
on AROS?


 

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #84 on: April 18, 2004, 02:58:24 AM »
 @bloodline,

YAH:-D:-D:-D:-D!!!!!!!!!!

I've done it!

the earlier link to WinRAR did the trick,
so thanks to the guy who pointed that out,
though it was some effort due to the impenetrable
Wind:pissed:ws XP interface, you have to go through a maze whenever you want to switch activity,

First attempt didnt b:griping:t as it was the .tar archive!

So one further decompression via WinRAR and then
burnt :madashell: yet another CD-R (luckily I bought 10),

This time it b:lol::lol:ted!

I had to witness some ancient MSD:crazy:S screens and
then:

a Workbench with
2 icons: Ram: looking like a microchip and the CD's icon,

15.5 Meg graphics ram in the title and 236.7Meg other! :-D

:first time on this new PC that I've seen how much
ram I have!

Up till this point I had only been thinking of AROS as
source code, but here it was entirely a real interface,

It is an Amiga, it has its own flavour but it is
recognisably an Amiga,

and its a truecolour workbench because there is a
colour circle demo program showing a continuum of
colours,

its certainly a reimplementation,

it even has Prefs programmes,
I forget if it was in Prefs but I saw Zune#?
but didnt think of trying it out,
I set my keyboard repeat + delay without probs
via one of the Prefs programs,

I also changed it to a US keyboard as the
positioning of the non-alpha-numeric characters
is better thought out,

I eventually found the shell, via c:Newshell,
I changed the long shell prompt to > via c:prompt,

A lot has been done and a lot of libraries are present,
:kitty: kitty looks real in truecolour)
 
enough is certainly up and running to make it
worth writing programs for,

the fact that I saw a Ram: icon says that
intuition + graphics + dos + exec are done!

which for me is almost everything,
other than the #?.device's, I didnt check
which of these are done,

its going to take some time to get used to
the fact that I can now actually look at the
source code, its like a huge gate has been opened
and we can all walk in and press the buttons on
the control panels of the OS!

:I am so entrenched in the 3rd-party-developer mindset,
vs the OS-contributor mindset,

until now the OS was entirely in the hands of an elite,
who decided on our behalf,

I can already see one program I can create
 by recycling existing code,
the required library being present there,

I couldnt find gcc, so I presume its on
www.aros.org, (or is it www.aros.com?),

I think the things which are missing are
what makes the project interesting from a
programmer POV,

so its almost like you can reinvent the wheel :roflmao:
your own way,

double clicking a text file makes it automatically view,

so I double clicked s:startup-sequence,

its very cheeky because it is a real startup-sequence,
serving the real purpose but its not the official one,

Before you can write programs for AROS you will have to
check whether the required libraries are present,

anyway a lot of existing programs should port very
rapidly as the central stuff is present,

its lucky that I follow the minimalist principle when
coding, ie use the absolute minimum of external dependencies eg I strictly program within OS3.0
and cybergraphics.library,

I presume you have reimplemented cyber??
(I will find out soon enough!),

I noticed arosc.library (I think), so I presume that is
standard c things as a shared library??

this is also my first visit to amiga.org in truecolour
via internet explorer, its a totally different website
via this browser + XP,

Ibrowse is ahead in that there is an editor button
so I can edit in Memacs, also on IBrowse I can
reply to a post via "view in new browser" : where
the reply happens in an Ibrowse folder!,

so eg on Ibrowse you can open all the pages of a
thread as lots of folders, which is really useful!

:not as lots of windows but folders like in YAM,

You can tell that this is a developer driven system
in stark contrast to the kid-gloves approach of
Wind:pissed:ws XP by the fact that
it has a program PCI Tool which shows you in great
detail all sorts of PCI stuff that I dont understand,

they'd never let you see things like
that on Wind:admonish:ws XP,

I got the feeling somehow of an engineering workshop,
that people are actively making the system take shape,
I could almost smell the engine oil,

So I've just seen the little-endian Intel-AROS,
until this point that phrase was just a concept for me,

and in a way it is an OS4 on Intel and you arent
afraid to let people try it out,

will it be possible to see my PC's hard disk on screen?

It will be very revealing to look in it via Amiga:roll:S,

Anyway trying something out is so different from talking about it,

I finished the session by trying out the Amiga's
3 key reset and yes the machine reset, though
XP didnt reboot,

The close down procedure of :ak47: XP :destroy: has a reset button so
it must be possible,

 

Offline Hammer

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1996
  • Country: 00
    • Show only replies by Hammer
Re: 68k AGA AROS + UAE => winner!
« Reply #85 on: April 18, 2004, 08:53:53 AM »
Quote
2) Your assumption that the "external CISC" style approach of x86 could be better based on code density is very difficult to judge. You have to consider that the code decomposition into the internal micro op language is far from simple to achieve. The design of these cores are fantastically complicated, gobbling up silicon like nobody's buisness.

One problem, PowerPC 970 has ~52 million transistors i.e. such transistor count is similar to the Athlon XP(Barton core).

In estimating the transistor count for AMD’s K8 core one can do the following;
1. Athlon FX’s ~90 million transistors minus Athlon 64 ~77 million transistors. This gives us an estimated single channel memory controller count i.e. ~13 million.
2. Athlon 64 ~77 million minus 13 million gives 64 million transistors. Athlon 64 with AGP tunneling/hyper transport interface and 1MB L2 cache consumes about 64 million transistors.

As one can see, K8 core and K7 Barton core is in range of PowerPC 970's transistor count.
 
Quote
All this takes clock cycles - which is partially why modern x86 CPU's have such very long pipelines and "time of flight" for instructions.

Note that PowerPC 970 has a comparable pipeline depth as with Athlon XP(Barton core). Try comparing it with an AMD solution instead of Intel's solution.  

Quote
We had several Windows NT workstations in our spectroscopy labs at Uni, one was using the latter at 266 MHz and we had a newer P-II 300 MHz, with it's new spanking "internal RISC style core" and the alpha still stuffed it

Note that Alpha sports an EV6 bus advantage, why try it with EV6 bus enabled K7 Athlons?
Amiga 1200 PiStorm32-Emu68-RPI 4B 4GB.
Ryzen 9 7900X, DDR5-6000 64 GB, RTX 4080 16 GB PC.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: 68k AGA AROS + UAE => winner!
« Reply #86 on: April 18, 2004, 02:39:49 PM »
@Hammer

It totally depends on what your transisters are used for :-D

How much of the modern x86 die is given up to x86 -> micro op decode, how much is given up to crutchhing up the "classic" x86 support?

How much of hte 970 transistor count is needed for legacy support? Virtually nothing.

Incidentally, I'm not the one who started the PPC v Intel debate here ;-)

Anyway, my point here is that the core of modern x86 processors is comparable to modern day RISC, hence the old "CISC v RISC" arguments are largely irrelavent in modern designs. Your PPC v AMD comparison makes that even more evident.

Quote
Note that Alpha sports an EV6 bus advantage, why try it with EV6 bus enabled K7 Athlons?


Dude, this was around start 1997. I should have made that clear - it's been a while since I was at Uni, you see. There were no Athlons and I'm not sure what sort of bus the Alpha was using then. But, it completely stuffed the new P2 systems that came to "replace it", which was rather amusing.

@whoosh777

I agree, the fastest consumer processors are x86 currently. That doesn't mean they are achitectually superior - as I say, they use many RISC paragdims in their cores to acheive the performance they reach. There is absolutely *no way* a conventional "classic x86" core, soley depending upon the 486 register set could get this far. The chip designers realised this a decade ago when the first "many register load/store" processors were crucifying them performance wise :-D

However, the x86 was already massively popular. They are the most competitively developed processors because the market is so ripe. Now it is dominated by Intel and AMD. A decade ago, there were many rivals.

Anyway, the point is, the "large register count / RISC is better view" has been largely proven. As I said, internally, x86 manufacturers moved their cores this way quite some time ago. What would have been truly interesting is to see what their cores would be like if they were packaged as a pure RISC processor, without all the x86 decode. For example, the P2 core has something like 64 (or maybe 128, I don't remeber) registers used for rename and shadowing.
int p; // A
 

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #87 on: April 18, 2004, 08:35:23 PM »
@bloodline,

it occurred to me that for tricky and undocumented PC h/w,
it may be an idea to borrow freely from the Bochs ("think in the box!")
project,

I cannot find the archive for the URL, but use google, I downloaded and
decompressed it ages ago, though did nothing further with it as I was
too busy with other projects,

below is a recursive list of all subdirectories of Bochs,

right now I am trying to fix the damage caused by DiskSalv and FryingPan :admonish:,
the backup I made via Geeks gg:bin/cp is correct except the dates were lost,
I probably should have used the -p flag, otherwise the backup is correct
including Geek's softlinks,

so I just need to copy over the dates, problem is c:list cannot cope with
Geeks softlinks, so I am quickly cobbling together a simplified recursive
c:list program that copes with softlinks (eg skips or lists them etc),
I used this to list out the Bochs subdiretories:

"bochs-20031115"
"bochs-20031115/build"
"bochs-20031115/build/beos"
"bochs-20031115/build/debian"
"bochs-20031115/build/linux"
"bochs-20031115/build/macos"
"bochs-20031115/build/macosx"
"bochs-20031115/build/redhat"
"bochs-20031115/build/win32"
"bochs-20031115/build/win32/nsis"
"bochs-20031115/debug"
"bochs-20031115/disasm"
"bochs-20031115/doc"
"bochs-20031115/doc/docbook"
"bochs-20031115/doc/docbook/development"
"bochs-20031115/doc/docbook/documentation"
"bochs-20031115/doc/docbook/images"
"bochs-20031115/doc/docbook/include"
"bochs-20031115/doc/docbook/user"
"bochs-20031115/doc/man"
"bochs-20031115/docs-html"
"bochs-20031115/dynamic"
"bochs-20031115/font"
"bochs-20031115/fpu"
"bochs-20031115/fpu/stubs"
"bochs-20031115/fpu/stubs/linux"
"bochs-20031115/gui"
"bochs-20031115/gui/bitmaps"
"bochs-20031115/gui/keymaps"
"bochs-20031115/instrument"
"bochs-20031115/instrument/example0"
"bochs-20031115/instrument/example1"
"bochs-20031115/instrument/stubs"
"bochs-20031115/iodev" :juggler:
"bochs-20031115/memory"
"bochs-20031115/misc"
"bochs-20031115/misc/sb16"
"bochs-20031115/patches"
"bochs-20031115/plex86"
"bochs-20031115/plex86/kernel"
"bochs-20031115/plex86/kernel/freebsd"
"bochs-20031115/plex86/kernel/include"
"bochs-20031115/plex86/misc"
"bochs-20031115/bios" :roll:
"bochs-20031115/cpu"

I forget which version of Windows Bochs is trying to reimplement,

@person-regarding-bz2:

the source for bz2 is:

ftp://sources.redhat.com/pub/bzip2/v102/bzip2-1.0.2.tar.gz

which seems to indicate its Redhat Linux,

the contents of "bochs-20031115/iodev" are:

".cvsignore"
"Makefile.in"
"aspi-win32.h"
"biosdev.cc"
"biosdev.h"
"cdrom.cc"
"cdrom.h"
"cdrom_amigaos.cc" :roll:
"cdrom_beos.cc"
"cdrom_beos.h"
"cmos.cc"
"cmos.h"
"crc32.cc"
"crc32.h"
"devices.cc"
"dma.cc"
"dma.h"
"eth.cc"
"eth.h"
"eth_arpback.cc"
"eth_fbsd.cc"
"eth_linux.cc"
"eth_null.cc"
"eth_packetmaker.cc"
"eth_packetmaker.h"
"eth_tap.cc"
"eth_tuntap.cc"
"eth_win32.cc"
"extfpuirq.cc"
"extfpuirq.h"
"floppy.cc" :-D
"floppy.h"
"gameport.cc"
"gameport.h"
"guest2host.cc"
"guest2host.h"
"harddrv.cc"
"harddrv.h"
"ioapic.cc"
"ioapic.h"
"iodebug.cc"
"iodebug.h"
"iodev.h"
"keyboard.cc"
"keyboard.h"
"ne2k.cc"
"ne2k.h"
"parallel.cc"
"parallel.h"
"pci.cc"
"pci.h"
"pci2isa.cc"
"pci2isa.h"
"pciusb.cc"
"pciusb.h"
"pcivga.cc"
"pcivga.h"
"pic.cc"
"pic.h"
"pit.cc"
"pit.h"
"pit82c54.cc"
"pit82c54.h"
"pit_wrap.cc"
"pit_wrap.h"
"sb16.cc"
"sb16.h"
"scancodes.cc"
"scancodes.h"
"scsi_commands.h"
"scsidefs.h"
"scsipt.h"
"serial.cc"
"serial.h"
"serial_raw.cc"
"serial_raw.h"
"slowdown_timer.cc"
"slowdown_timer.h"
"soundlnx.cc"
"soundlnx.h"
"soundwin.cc"
"soundwin.h"
"unmapped.cc"
"unmapped.h"
"vga.cc"
"vga.h"
"virt_timer.cc"
"virt_timer.h"
"vmware3.cc"
"vmware3.h"

:-D :lol: :roflmao:
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: 68k AGA AROS + UAE => winner!
« Reply #88 on: April 18, 2004, 09:43:27 PM »
@whoosh777

I'm glad you finally had a chance to play with AROS :-)

Cybergraphics is present and correct. You would have noticed that the AROS graphics are either 65536 or 16.8 million colours (ie true colour) by default. That is why the icons can be very colourful.

If you get a Nvidia (ie GeForce) graphics card you will notice a massive speed up if you select "NVIDIA" at the boot options.

If you press Left-Win + Right-Win and Ctrl keys together AROS will reset (this avoids using the BIOS, so allows for a quicker reset).

AROS can only read Amiga hard drives at the moment, so it can't see your Windows Hard drive. We need a FAT32/NTFS file system driver in order to read the drive.

If you take out the Windows Hard Drive and put a blank drive in there, AROS can format the drive to the Amiga format and you can install AROS onto it.

Once you get a chance to play with the AROS applications and demos in the "Extras" dir of your AROS CD you will see why we are against a slower "big endien" x86 AROS :-) Once you get a taste of Raw CPU speed... you just want more :-D

Offline whoosh777Topic starter

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 114
    • Show only replies by whoosh777
    • http://www.whoosh777.pwp.blueyonder.co.uk
Re: 68k AGA AROS + UAE => winner!
« Reply #89 on: April 19, 2004, 01:06:41 AM »


Quote

bloodline wrote:
@whoosh777

I'm glad you finally had a chance to play with AROS :-)

Cybergraphics is present and correct. You would have noticed that the AROS graphics are either 65536 or 16.8 million colours (ie true colour) by default. That is why the icons can be very colourful.


is the default WB screen 16.8 million or 65536?
new to such things I dont know the difference,

I had another session today, my A1200 is taking a
trillion years to copy the dates over from the
fried partition so I disconnected it from the VGA
and left it chugging away and had another try with AROS,

hence this reply is via Internet Explorer,
ASAP I want to start browsing via IBrowse,


I found many new things this time, eg the text editor
which has exactly the features I want and does
them better than Memacs: search, search + replace,
tabs remaining as tabs and most importantly bracket alignment:

ie if I type:

tab tab { return
the cursor is aligned with the {, this feature
is vital for the way I write c,

with Memacs I can configure it to do this via
numeric return, but with yours I can use either  
return which is much more convenient,

I found so much further stuff this time that
I now think it is very nearly mature,

so I think it can take off without backwards 68k
compatibility,

last night when I tried it out, somehow I didnt
find all the directories,

I still havent found gcc on it, though I found
the includes and gcc libraries, you have a lot
of gcc stuff including libjpeg,

I noticed you have libbz2.a and bzip2, otherwise
I would have ported those, on this machine
it could port instantly. Though something that
ports painlessly on one system may be a major
issue on another,

jpeg is very very portable so it should port to
everywhere very straightforwardly,

Quote

If you get a Nvidia (ie GeForce) graphics card you will notice a massive speed up if you select "NVIDIA" at the boot options.


PCWorld had this for £99, is that a good price?

what is the full product name?

Is it A1 and Pegasos2 compatible?

Nvidia vs Radeon? will you eventually have Radeon support?
is it worth me waiting?


Quote

If you press Left-Win + Right-Win and Ctrl keys together AROS will reset (this avoids using the BIOS, so allows for a quicker reset).


ok, it was a usage-problem and not a bug,
I take it thats the left control key?

Is there any way I can boot to Windows XP with the
AROS CD still in the drive?

Quote

AROS can only read Amiga hard drives at the moment, so it can't see your Windows Hard drive. We need a FAT32/NTFS file system driver in order to read the drive.


can I reconnect my existing SCSI FFS drives to
my new PC SCSI interface and use them AS-IS?

Is there a risk factor as with WinUAE or is it
totally safe?

Quote

If you take out the Windows Hard Drive and put a blank drive in there, AROS can format the drive to the Amiga format and you can install AROS onto it.


You are saying that I shouldnt install AROS to this
current internal drive?

I want to try and only use external drives, so I can
selectively switch the power off as a virus precaution,

can I install AROS to some such external drive?
what is the best type of external drive to get?
(low cost + high speed),

Quote

Once you get a chance to play with the AROS applications and demos in the "Extras" dir of your AROS CD you will see why we are against a slower "big endien" x86 AROS :-) Once you get a taste of Raw CPU speed... you just want more :-D


It would give you parity with Windows XP,
probably you will even overtake Windows XP for speed,

Its certainly now the fastest Amiga in existence for
the home user, and just as fast as Windows XP,

furthermore its faster than all Macs,
hey everyone I overtook the Macs for under £300,
gloat, gloat, gloat, he he he, :-D

all those debates about Mac vanish,

2 questions on little-endian x86 AROS:

1. Have you a version that runs above Windows?
2. Have you a version of UAE that runs above
either even if its not integrated?

because I may then use that instead of WinUAE
for my 68k environment,

I have some really useful things which can only be
run in 68k,

I tried out some of the Extras programs which looked
very impressive, some of the Windowing is just as good
as Windows XP,

would it be possible to reintroduce an OS1.2 click to back
gadget? maybe via some Prefs program for standard gadgets,
I never liked having to click twice to move an  
in between window out of view on OS3,

I noticed your shell has tab completion via requester
 exactly the way I want it, is the shell King-con or
have you reimplemented it from scratch??

I didnt check whether you've fixed the square bracket
problem on King-Con, on King con if there are square
brackets in the shell output, if you scroll back to
them they vanish! Thats why I use () in the usage info
in my programs such as the above trackdisk.c,

I used the Prefs programs and managed to change the
background colour of the WB, I forget how I did it
but there were 2 colours with a gradient between these 2,
also you can rotate the direction of the gradient,
I removed the gradient by making the 2 colours the same,
as I dont like prettiness in my interfaces,

I like my interfaces to be rough, ready and functional,
thats why I like Memacs and the AROS editor,

The transparent window with a circle on it looked
really interesting, I want to see what the mechanism
for doing this, non rectangular windows should be now
possible,

Maybe I will write a graphics demo, just a bit of fun,
nothing major,

I want to learn what GPL is as well, is it
"graphics programming language" or what?

(not referring to the Gnu Public License also GPL)