Welcome, Guest. Please login or register.

Author Topic: newb questions, hit the hardware or not?  (Read 33343 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline psxphill

Re: newb questions, hit the hardware or not?
« Reply #119 from previous page: July 20, 2014, 07:40:46 AM »
Quote from: commodorejohn;769393
No, no, no, Thorham! You can't manage a large-scale project in assembler, therefore that doesn't exist!

It's a monolithic kernel and has little hardware support, yet it's taken 9 years. That sounds unmanageable to me, you seem to be confused between something being unmanageable and something existing. I'll give you the benefit of the doubt that you just don't understand the meaning of words rather than trying to bend the meaning on purpose (if you want an analogy: unmanageable hair doesn't mean you're bald).
 
http://www.osnews.com/story/1385/Comparing-MenuetOS-SkyOS-and-AtheOS/
 
Quote from: LiveForIt;769394
The issue is that Amiga500 does not have lot RAM, there is space for pre fetching blocks.
Instead the disk has rotate to correct sector read a block discard the rest, rotate to next sector read a block and discard the rest.

trackdisk.device only ever reads and buffers whole tracks.
 
If you read the abacus chapter you'll see that the trackdisk in 1.2 doesn't use the word sync to find where the track starts, it reads more than a track worth and then uses the cpu to search through the result. I think they might have stopped doing that in release 2.
 
The disk format wasn't optimal for the hardware either. For reading it would make more sense if there was just one $4489 per track, this wouldn't affect writing as you have to write an entire track even if you have only modified one byte anyway. It looks like they wanted to allow sector writing because paula can search for the sync word when writing, but it doesn't have any way of checking which sector it would be writing to. My guess is the disk format was decided on and code hacked to work on the hardware that existed but nobody had time, or thought it would be a good idea, to go back and review the design after the hardware was finished.
« Last Edit: July 20, 2014, 08:23:26 AM by psxphill »
 

Offline DamageXTopic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2005
  • Posts: 339
    • Show only replies by DamageX
    • http://www.hyakushiki.net/
Re: newb questions, hit the hardware or not?
« Reply #120 on: July 20, 2014, 08:25:38 AM »
Thanks for jacking my thread, LOL.
 

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show only replies by matthey
Re: newb questions, hit the hardware or not?
« Reply #121 on: July 20, 2014, 08:41:15 AM »
Quote from: DamageX;769408
Thanks for jacking my thread, LOL.


From 2006 no less :D.
 

Offline LiveForIt

Re: newb questions, hit the hardware or not?
« Reply #122 on: July 20, 2014, 09:21:39 AM »
Quote from: psxphill;769407
If you read the abacus chapter you'll see that the trackdisk in 1.2 doesn't use the word sync to find where the track starts, it reads more than a track worth and then uses the cpu to search through the result. I think they might have stopped doing that in release 2.

Well it has to read the RAW data, decode the MFM, after the MFM is decoded can know whats on it, to see what block that was requested.

Quote
The disk format wasn't optimal for the hardware either. For reading it would make more sense if there was just one $4489 per track

Sure more data if there are no gaps, but I think comes down to filesystem, you don't want a too big blocks because, then small files take larger space, but physical storage and filesystem blocks does not need to be the same I agree. On the other hand with no sectors, the be only one CRC for large block of 4489, so more data being lost if there was a read/write error, maybe diving it into sector made it more reliable I don't know.

Quote
It looks like they wanted to allow sector writing because Paula can search for the sync word when writing

Some floppy drives / disks did have a sync hole, maybe it was legacy.
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1149
    • Show only replies by Thorham
Re: newb questions, hit the hardware or not?
« Reply #123 on: July 20, 2014, 09:22:58 AM »
Anyone who says that managing big assembly language projects is impossible, is basically saying that we humans are too damned stupid for that. Speak for yourself, please.
 

Offline LiveForIt

Re: newb questions, hit the hardware or not?
« Reply #124 on: July 20, 2014, 09:29:13 AM »
Quote from: Thorham;769412
Anyone who says that managing big assembly language projects is impossible, is basically saying that we humans are too damned stupid for that. Speak for yourself, please.

Humans are good at poison the food they eat sure they are stupid, from time to time they do some thing smart, but that's not often.

Regards
The Gray Alien from planet X.
(I run to hide in my UFO.)
 

guest11527

  • Guest
Re: newb questions, hit the hardware or not?
« Reply #125 on: July 20, 2014, 09:44:10 AM »
Quote from: LiveForIt;769394
The issue is that Amiga500 does not have lot RAM, there is space for pre fetching blocks.

Actually, the trackdisk.device does prefetch entire tracks. Since ever.
 

guest11527

  • Guest
Re: newb questions, hit the hardware or not?
« Reply #126 on: July 20, 2014, 09:54:53 AM »
Quote from: psxphill;769407
If you read the abacus chapter you'll see that the trackdisk in 1.2 doesn't use the word sync to find where the track starts, it reads more than a track worth and then uses the cpu to search through the result. I think they might have stopped doing that in release.
This is correct, and indeed, they stopped this nonsense in kickstart 2.0. The reason for this "feature" in 1.3 was likely because there is a mis-documentation in the RKRMs Hardware book on how the sync-word feature works. According to the RKRMs, the sync word works by PAULA watching the incoming MFM stream and enabling DMA as soon as the pattern is detected. However, this is incorrect, PAULA does more than that. If the sync word is enabled, and DMA is running, PAULA *also* resynchronizes on every detected sync word. This makes an important difference in the track gap, where synchronization can be lost, and it is not clear that the start of the track aligns correctly to the end of it, bit-wise. From the RKRM description, you would have only gotten unaligned MFM data in the buffer after the track gap, and hence would need to re-align manually - which is what they did. However, PAULA is not that stupid. Whenever it sees the sync word, it restarts at a word-boundary from that sync-word on, discharging any incomplete or unsynchronized bits.
Quote from: psxphill;769407
The disk format wasn't optimal for the hardware either. For reading it would make more sense if there was just one $4489 per track, this wouldn't affect writing as you have to write an entire track even if you have only modified one byte anyway. It looks like they wanted to allow sector writing because paula can search for the sync word when writing, but it doesn't have any way of checking which sector it would be writing to. My guess is the disk format was decided on and code hacked to work on the hardware that existed but nobody had time, or thought it would be a good idea, to go back and review the design after the hardware was finished.

Actually, no. If you only had a single sync word, then PAULA had only a single chance of finding the sync word per track, i.e. in worst case, an entire track would have to be read twice: First, to detect the sync word - if you enabled PAULA right after the sync word is passing under the head - and second to get the full data. With the sector layout, the MFM reader will at most spoil an entire sector plus the track gap, which is a much smaller part of the track.

Some games, however, use the entire track to store data, with a minimal track gap, and thus squeeze more bytes into a track. Of course at the expense of possibly reading tracks slower by missing the sync word in the first rotation.

The PC floppy disk controller uses the reverse: It synchronizes on every sector, has a much larger inter-sector gap, and does no buffering, i.e. sectors are read and written individually. With the relatively short sector gap the Amiga trackdisk layout has, this would be rather impossible. The chance of overwriting the next sector would be very high. For the PCs, the uncertainty in write alignment is compensated with the higher inter-sector gap (i.e. the sector can overflow a little bit behind its natural location, then fills the sector gap without overwriting the next sector header).
 

guest11527

  • Guest
Re: newb questions, hit the hardware or not?
« Reply #127 on: July 20, 2014, 10:02:47 AM »
Quote from: Thorham;769412
Anyone who says that managing big assembly language projects is impossible, is basically saying that we humans are too damned stupid for that. Speak for yourself, please.

Again, you apparently haven't tried that yet. It is not a matter of stupidity. It is a game of chances and discipline. For every line of code you write, there is a certain chance to get it wrong. With higher languages, the compiler detects such things for you. In assembler, you don't. It is also a matter of flexibility and maintainability. A project does not start from the first line and then is written in one go to the last line. You typically get spec changes somewhere in the middle, let it be by your employer, let it be because you find that your initial design wouldn't work for some reason. In a higher language, it is easy to adapt. In assembly, it usually means that you have to rewrite major parts of the code because the interfaces no longer fit, and errors sneak into this process.

You know, (but probably haven't experienced this) a piece of software is more than a collection of instructions. It is a software *design*. You don't need to design small projects, but you do for larger projects. The more abstract tools you have for designing the code, the simpler it becomes to adopt and fix.

Anyhow, since you haven't gotten through this, I suggest that you just try. I would have had one or two assignments for you, to be written completely in assembler, *BY YOU*. If go you through this, and complete this in time, I stand corrected.  

Be warned, however. This will not be an easy untertaking. It is designed *not to be easy*, it is a "real life" project and not a toy project like your average demo.
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1149
    • Show only replies by Thorham
Re: newb questions, hit the hardware or not?
« Reply #128 on: July 20, 2014, 10:45:47 AM »
Quote from: Thomas Richter;769418
Again, you apparently haven't tried that yet.
You're right, I haven't. Doesn't mean it's impossible.

Quote from: Thomas Richter;769418
You know, (but probably haven't experienced this) a piece of software is more than a collection of instructions.
Obviously. A system is always more than the sum of it's parts.

Quote from: Thomas Richter;769418
Anyhow, since you haven't gotten through this, I suggest that you just try. I would have had one or two assignments for you, to be written completely in assembler, *BY YOU*. If go you through this, and complete this in time, I stand corrected.
I have some interesting things I've been wanting to do for a long time now. One of which is a new, written from scratch, modern GUI system for 68k Amigas. Another one is a new OS.

What are those assignments you have in mind?

Quote from: Thomas Richter;769418
Be warned, however. This will not be an easy untertaking. It is designed *not to be easy*, it is a "real life" project and not a toy project like your average demo.
Wouldn't have it any other way :)
 

Offline OlafS3

Re: newb questions, hit the hardware or not?
« Reply #129 on: July 20, 2014, 12:27:06 PM »
Quote from: Thorham;769421
You're right, I haven't. Doesn't mean it's impossible.


Obviously. A system is always more than the sum of it's parts.


I have some interesting things I've been wanting to do for a long time now. One of which is a new, written from scratch, modern GUI system for 68k Amigas. Another one is a new OS.

What are those assignments you have in mind?


Wouldn't have it any other way :)


A GUI system sounds interesting. Or you look at the existing systems and improve one of them? Partly sources are available.

I think we all talk of different things. "Realworld applications" like a word processor are difficult to develop just in assembler. Efficiency is very important and most developer would need much longer in assembler than in a high level language. Also you often have debugger and similar and outside amiga world you even have configurable components that make life much easier. Another problem assembler is not portable what is important for some projects and you have the problem to find another similar skilled developer if f.e. the main developer leaves. There are obviously much more developers with experience in C than in a certain assembler. That many people wrote in assembler many years ago was because of the lack of system ressources and not because most people liked it. And as I said I am right now aware of a number of different cores for FPGAs that are in development. It is not predictable if all cores are all identical (from dev view) so if you are a game developer hitting the hardware in assembler you have to test it on every core available (and UAE) if you want to be sure. Or you just make it for one core with the risk that it will not run everywhere. That might be ok for hobby development but is a no-go for potential commercial development. And if someone works on a application he will certainly not hit the hardware and use the OS.
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1149
    • Show only replies by Thorham
Re: newb questions, hit the hardware or not?
« Reply #130 on: July 20, 2014, 12:41:53 PM »
Quote from: OlafS3;769424
Or you look at the existing systems and improve one of them?
Sorry, but no. I want my own system that's more modern than what's available now for 68k. The idea is to start from scratch, and use the OS for user IO. And yes, that means it would only run on it's own screen.

Quote from: OlafS3;769424
That many people wrote in assembler many years ago was because of the lack of system ressources and not because most people liked it.
It's a hobby for me.

Quote from: OlafS3;769424
And as I said I am right now aware of a number of different cores for FPGAs that are in development.
I'm interested in writing Amiga software. If someone wants to run Amiga software, let them use an Amiga (or an emu)!
 

Offline OlafS3

Re: newb questions, hit the hardware or not?
« Reply #131 on: July 20, 2014, 12:59:22 PM »
Quote from: Thorham;769425
Sorry, but no. I want my own system that's more modern than what's available now for 68k. The idea is to start from scratch, and use the OS for user IO. And yes, that means it would only run on it's own screen.


It's a hobby for me.


I'm interested in writing Amiga software. If someone wants to run Amiga software, let them use an Amiga (or an emu)!


Ah ok

if you do not care if other people can run it then go

GUI system is something like intuition or triton for me, a library to create a GUI for applications and tools/utilities. If it not runs everywhere (or it is at least not certain that it works) noone else will use it.
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1149
    • Show only replies by Thorham
Re: newb questions, hit the hardware or not?
« Reply #132 on: July 20, 2014, 01:30:27 PM »
Quote from: OlafS3;769426
if you do not care if other people can run it then go
Maybe I put it a little too harshly. The intention is to write true Amiga software that goes further then what's currently available, especially on lower end 20s and 30s with some fastmem. If that's successful, it shouldn't be a big deal to add some chunky GFX support for GFX cards.

The emphasis is on OCS/ECS/AGA+20s/30s, because I believe these machines are capable of more than what we're seeing today. All that's available is old desktops and old GUIs, and this can be massively modernized without any crazy requirements (obviously some of the eye candy will be missing, but that's not what makes a modern GUI system modern).

All of the low level graphics code for this will be planar blitting routines, some c2p, and a hardware sprite for the mouse pointer. To get this stuff to work on GFX cards would require adding some code to access the GFX card functions, add chunky versions of the planar blitting routines (which are vastly easier to write than the planar ones) and to not use the c2p. Certainly not a massive task when you have an actual system running. It's just something I wouldn't do from the start if I would take on a project like this.

As for the 68k assembly language, that's not negotiable :D It's a hobby after all ;)
 

guest11527

  • Guest
Re: newb questions, hit the hardware or not?
« Reply #133 on: July 20, 2014, 01:34:57 PM »
Quote from: Thorham;769421
What are those assignments you have in mind?

Ok, here are a couple of ideas. Write a complete JPEG 2000 codec, from scratch, from the specs, in assembler. If that's not interesting enough, you can also start with HEVC (the latest MPEG standard), again from the specs. For the first project, I could give you help since I did this. For the second, I would be of no help since it's not exactly my branch.

The first project takes approximately 6 months in C++ (been there, did that). The second takes probably longer since it is more complex. In either case, it would be beneficial for the Amiga community, and both projects have *some* use for assembler - though it would be insane, as I said before, to write them in assembler completely. But again, you claim it's possible, so go ahead.

My bet is, you'll probably start, let it go for a month, then will loose interest because it is too complex. But, as said, it's your choice. Rule number 1 is not to give up, but that's easier to realize in C++ than it is in assembler.
 

Offline commodorejohn

  • Hero Member
  • *****
  • Join Date: Mar 2010
  • Posts: 3165
    • Show only replies by commodorejohn
    • http://www.commodorejohn.com
Re: newb questions, hit the hardware or not?
« Reply #134 on: July 20, 2014, 01:48:36 PM »
Quote from: psxphill;769407
That sounds unmanageable to me, you seem to be confused between something being unmanageable and something existing. I'll give you the benefit of the doubt that you just don't understand the meaning of words rather than trying to bend the meaning on purpose
And I'll give you the benefit of the doubt and assume that you're a robot from space who does not understand the thing we hu-mans refer to as a "joke."
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/MT-32/D-10, Oberheim Matrix-6, Yamaha DX7/FB-01, Korg MS-20 Mini, Ensoniq Mirage/SQ-80, Sequential Circuits Prophet-600, Hohner String Performer

"\'Legacy code\' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup