English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 08 October 2015, 19:32   #41
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Quote:
Originally Posted by dissident View Post
Good to know. If I understand it correctly the clock chip detection of the clock resource is fooled by random values.
Problem is that they are not random values. Most of the time.

Usually reading floating data bus returns whatever data CPU accessed previously but it is not guaranteed. I am not sure how it exactly works because it is not really defined and can depend on mainboard revision, used chip types etc..

For example if I dump first 200 or so bytes from 0xDC0000 (without clock), I get 100% repeatable results (seems to return last CPU's prefetched instruction word) except 1-2 bits that randomly change in random addresses.

Quote:
Would that error also happen with my code?
It is possible.
Toni Wilen is offline  
Old 08 October 2015, 21:38   #42
dissident
Registered User
 
Join Date: Sep 2015
Location: Germany
Posts: 256
Quote:
Originally Posted by Toni Wilen View Post
Problem is that they are not random values. Most of the time.

Usually reading floating data bus returns whatever data CPU accessed previously but it is not guaranteed. I am not sure how it exactly works because it is not really defined and can depend on mainboard revision, used chip types etc..

For example if I dump first 200 or so bytes from 0xDC0000 (without clock), I get 100% repeatable results (seems to return last CPU's prefetched instruction word) except 1-2 bits that randomly change in random addresses.
Thanks for your information Toni
dissident is offline  
Old 09 June 2016, 02:05   #43
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Bumping this thread.

After some time has passed does anyone have any recommendations as to which is the best of the solutions discussed ?
alpine9000 is offline  
Old 09 June 2016, 17:42   #44
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
The best solution is to not kill the OS at all
meynaf is offline  
Old 09 June 2016, 20:00   #45
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by meynaf View Post
The best solution is to not kill the OS at all
Indeed
Thorham is offline  
Old 09 June 2016, 20:57   #46
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
The best solution is to not kill the OS at all
That's no fun. The best thing about the Amiga is you are free to do whatever you like, including "pausing" the OS.

Anyway I ended up using one of the TOD solutions as it seemed to be the most compatible across various hardware/software configurations.
alpine9000 is offline  
Old 09 June 2016, 21:07   #47
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by alpine9000 View Post
That's no fun. The best thing about the Amiga is you are free to do whatever you like, including "pausing" the OS.
You can bang on the hardware and still leave the OS alive. You just have to be polite and ask before using
meynaf is offline  
Old 09 June 2016, 21:18   #48
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
You can bang on the hardware and still leave the OS alive. You just have to be polite and ask before using
I prefer to tell rather than ask
alpine9000 is offline  
Old 09 June 2016, 22:29   #49
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by alpine9000 View Post
That's no fun.
Depends on the application. For demos and games it's not a big deal, but for other programs it's definitely a big no-no.
Thorham is offline  
Old 09 June 2016, 22:40   #50
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by Thorham View Post
Depends on the application. For demos and games it's not a big deal, but for other programs it's definitely a big no-no.
Sure - in my case I took my track loaded game that was designed to run on my unexpanded A500, wrapped the code with someone else's "startup" code and it pretty much worked.

I didn't initially plan on doing a workbench version. Because it was so simple to build both versions I decided to keep the OS "compatible" version in the mix.

Trackloaded ADF is still my preferred medium. Works on all Amigas, including people running various UAEs that only have access to the AROS roms.
alpine9000 is offline  
Old 10 June 2016, 00:02   #51
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by alpine9000 View Post
Trackloaded ADF is still my preferred medium. Works on all Amigas, including people running various UAEs that only have access to the AROS roms.
Doesn't work on Amiga's without a floppy drive, unless the track loader uses the OS
Thorham is offline  
Old 10 June 2016, 00:29   #52
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by Thorham View Post
Doesn't work on Amiga's without a floppy drive, unless the track loader uses the OS
touché

I guess that group of people will need to run the workbench version.
alpine9000 is offline  
Old 10 June 2016, 18:09   #53
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by meynaf View Post
You can bang on the hardware and still leave the OS alive.
Not really. This is the absolute worst way to do it and will cause the most problems. A sign of bad software, IMHO.

Either you use the OS or take over the hardware completely. There is nothing in between.
phx is offline  
Old 10 June 2016, 18:40   #54
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by phx View Post
Not really. This is the absolute worst way to do it and will cause the most problems. A sign of bad software, IMHO.

Either you use the OS or take over the hardware completely. There is nothing in between.
Nope.
The OS has primitives to take over everything you need : screen, sound, blitter, cia timers, whatever.

There IS sometimes the need to touch the hardware under OS, f.e. try to play Protracker modules with audio.device alone - simply impossible.
meynaf is offline  
Old 10 June 2016, 18:46   #55
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
It is never that black and white.

It depends what you want to do, if you want to do anything useful with basic A500, you really want to take over the system but if you target something higher, it is usually possible to keep system mostly working.

Trouble can still come when user has odd expansion(s) that take random amount of CPU (interrupt) time just when it shouldn't..
Toni Wilen is offline  
Old 10 June 2016, 23:52   #56
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by meynaf View Post
The OS has primitives to take over everything you need : screen, sound, blitter, cia timers, whatever.

There IS sometimes the need to touch the hardware under OS, f.e. try to play Protracker modules with audio.device alone - simply impossible.
Ok, you're right. Seems I misunderstood you.

The same would be to call OwnBlitter() and program the Blitter registers. But this is still a legal, OS-conforming program for me. I thought about writing hardware registers while the OS is still alive and not aware of it, like in a bad Seka assembler source of 1988.
phx is offline  
Old 11 June 2016, 02:12   #57
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
Nope.
The OS has primitives to take over everything you need : screen, sound, blitter, cia timers, whatever.

There IS sometimes the need to touch the hardware under OS, f.e. try to play Protracker modules with audio.device alone - simply impossible.
The other need to touch the hardware directly is because it's fun, interesting and different from the sort of boring programming that most programmers do for a living.

Calling OS APIs is sleep inducing in it's boringness :-)

The minimum calls required before I am in full control the better.
alpine9000 is offline  
Old 11 June 2016, 09:29   #58
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by phx View Post
I thought about writing hardware registers while the OS is still alive and not aware of it, like in a bad Seka assembler source of 1988.
That's indeed more than a little bad


Quote:
Originally Posted by alpine9000 View Post
The other need to touch the hardware directly is because it's fun, interesting and different from the sort of boring programming that most programmers do for a living.
Yea but it ain't funny to debug.
File i/o is also quite painful.
So ok it's fun for learning things and all, but i wouldn't do it for any serious project.


Quote:
Originally Posted by alpine9000 View Post
Calling OS APIs is sleep inducing in it's boringness :-)
Then design your own APIs. This is (more or less) what i did for my programs.


Quote:
Originally Posted by alpine9000 View Post
The minimum calls required before I am in full control the better.
Perhaps you'd be better off by just writing $7fff to $dff096+$dff09a and never return
meynaf is offline  
Old 11 June 2016, 09:43   #59
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by meynaf View Post
Yea but it ain't funny to debug.
File i/o is also quite painful.
So ok it's fun for learning things and all, but i wouldn't do it for any serious project.
The UAE debugger makes things a lot easier (and fun) to debug compared to a real Amiga. It would be less fun without that.

Is anyone doing any serious projects still on the Amiga ?
alpine9000 is offline  
Old 11 June 2016, 09:58   #60
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by alpine9000 View Post
Is anyone doing any serious projects still on the Amiga ?
If by "serious" you understand "business" then no (hopefully ?).

Else, yes, maybe.
I mean, while demos and some games can be satisfied with os killing stuff, utilities and large projects (like a big game over 100MB in size) need to run under os.
Are there such projects now ? Well, there are a few game projects here and there. My personal current intent is to write a multi-format audio player. If i get some nice incentive i may eventually be porting another Atari ST game as well.
meynaf is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
startup/system takeover sidewinder Coders. General 15 28 February 2016 16:33
time clock prob a2000 source Hardware mods 11 07 August 2011 13:16
A1200 Real Time Clock Eclipse support.Hardware 4 22 March 2011 02:18
App to update Amiga System time from web time?? DDNI request.Apps 2 31 December 2007 07:21
Reading the Real Time Clock girv Coders. General 5 04 September 2007 18:30

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:04.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10211 seconds with 14 queries