Minimig Discussion Forum

Discussing the Open Source FPGA Amiga Project
It is currently Wed Jan 24, 2018 7:53 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Setting CPU speed from Amiga OS, is it possible?
PostPosted: Tue Mar 19, 2013 2:18 pm 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
This idea came to my mind after seeing that many games and demos require 7MHz 68000 while most games and demos run WAY better with the fast aproximate 50MHz mode.
Note I run everything on the Minimig on a very peculiar way: I just use AmigaDOS via a simple CLI shell, with a minimal startup-sequence, so I can run almost every game from HD via native installs or Whdload installs. A 4MB Minimig is enough for 99% of the games in such a setup!
So, a small AmigaDOS CLI program to set the CPU into 7MHz mode before running some games would be interesting: I could include it in each game's launch script and then it would run transparently at the right CPU speed.

I suppose it should be pretty easy, if I knew how. For this kind of thing I tend to search Aminet for C sources of programs that do something similar to what I'm trying to do, modify them and do what I want, but there's no example Amiga code to access whatever sets the CPU speed from AmigaDOS, if possible at all.
So, are there any libs, functions, or memory addresses I could poke in a barbaric way to set the CPU speed from a C program?


Top
 Profile  
 
 Post subject: Re: Setting CPU speed from Amiga OS, is it possible?
PostPosted: Tue Mar 19, 2013 2:49 pm 
Offline

Joined: Mon Dec 01, 2008 10:11 am
Posts: 197
gaula92 wrote:
So, are there any libs, functions, or memory addresses I could poke in a barbaric way to set the CPU speed from a C program?

No.


Top
 Profile  
 
 Post subject: Re: Setting CPU speed from Amiga OS, is it possible?
PostPosted: Tue Mar 19, 2013 3:19 pm 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
yaqube wrote:
gaula92 wrote:
So, are there any libs, functions, or memory addresses I could poke in a barbaric way to set the CPU speed from a C program?

No.


Ok.

:oops:


Top
 Profile  
 
 Post subject: Re: Setting CPU speed from Amiga OS, is it possible?
PostPosted: Tue Mar 19, 2013 4:38 pm 
Offline

Joined: Mon Dec 01, 2008 10:11 am
Posts: 197
I'm going to add similar functionality to the Minimig AGA core so it will be possible to change most OSD settings from Amiga environment. :D


Top
 Profile  
 
 Post subject: Re: Setting CPU speed from Amiga OS, is it possible?
PostPosted: Tue Mar 19, 2013 6:13 pm 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
@yaqube: And will you backport the changes to the Minimig V1.1 board so it's possible to change OSD settings from Amiga enviroment on the Minimig V1.1 board if I have your ARM controller too?

NOTE: I also have MikeJ's FPGA Arcade, but I'd love to see the Minimiv V1.1 board progress along with it. It's a very special board: my first FPGA Amiga computer.


Top
 Profile  
 
 Post subject: Re: Setting CPU speed from Amiga OS, is it possible?
PostPosted: Tue Mar 19, 2013 7:06 pm 
Offline

Joined: Mon Dec 01, 2008 9:58 pm
Posts: 1568
Location: .de
In a "playtime Core" I had implemented such things to the MinimigV1.
It was possible to change all OSD function via "reserved" chipset register.

But this may cause trouble with some old Demo and Game title.
Those coder often poke value into unused register for unknown reason.
This may the Minimig go wild and would be of no use.

Its also possible to use memory addresses like for RAMSEY, DMAC or other chips not present in the Minimig core. Problem may stay the same with some kickstarts or software.

In current release the CPU speed is easy to set via 3 keys or the OSD even via Joystick control.

_________________
_____________________________
JMP $00000BED ; will guru-meditation until next morning


Top
 Profile  
 
 Post subject: Re: Setting CPU speed from Amiga OS, is it possible?
PostPosted: Tue Mar 19, 2013 8:29 pm 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
Quote:
Its also possible to use memory addresses like for RAMSEY, DMAC or other chips not present in the Minimig core. Problem may stay the same with some kickstarts or software.


This sounds very reasonable to me: after all, V1.1 board isn't very expandable so these elements are definitively out of the scene. Re-using one single obscure register for CPU speed setting from the AmigaDOS side would be logical. I would test such a core any day of the week :D


Top
 Profile  
 
 Post subject: Re: Setting CPU speed from Amiga OS, is it possible?
PostPosted: Tue Mar 19, 2013 9:06 pm 
Offline

Joined: Tue May 12, 2009 5:38 pm
Posts: 15
Location: Somewhere in the UK
boing4000 wrote:
In a "playtime Core" I had implemented such things to the MinimigV1.
It was possible to change all OSD function via "reserved" chipset register.

But this may cause trouble with some old Demo and Game title.
Those coder often poke value into unused register for unknown reason.
This may the Minimig go wild and would be of no use.


Why not require a unlock sequence to be written to the register before allowing CPU speed change?


Top
 Profile  
 
 Post subject: Re: Setting CPU speed from Amiga OS, is it possible?
PostPosted: Wed Mar 20, 2013 10:35 am 
Offline

Joined: Mon Dec 01, 2008 9:58 pm
Posts: 1568
Location: .de
Hojo Norem wrote:
Why not require a unlock sequence to be written to the register before allowing CPU speed change?


Yes definitely would help. At this time I only was playing arround with those functions ;)

_________________
_____________________________
JMP $00000BED ; will guru-meditation until next morning


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Translated by Xaphos © 2007, 2008, 2009 phpBB.fr