It is currently Mon Dec 10, 2018 4:11 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Get Amiga Config [680x0 ASM]
PostPosted: Fri Sep 15, 2006 12:23 am 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 20, 2005 12:48 pm
Posts: 1104
I found some old stuff from our group for the 680x0 amiga... Dont know if following stuff will directly work with PB amiga... maybe you have to modify... otherwise the routine should work like a dream :)

Code:
*******************************************
*** Get Amiga Config              ***
*******************************************

; determines               output in
;      - ChipSet OCS/ECS/AGA       d0
;       - Kickstart version/VideoFreq   d1
;      - CPU version (z.b. "$68000")   d2
;      - FPU version (e.g. "$68882")   d3
;      - Free ram (Chip)      d4
;      - Free ram (Fast)      d5
;      - Max ram (Chip)      d6
;      - Max ram (Fast)      d7

; kills:   d0-d7/a6

GetConfig:
   move.l   a6,-(a7)
   move.l   $4.w,a6         ; get execbase
   move.l   #$20002,d1      ; largest Chip
   jsr   -216(a6)      ; AvailMem()
   lsr.l   #8,d0         ; /1024
   lsr.l   #2,d0
   move.l   d0,d4

   move.l   #$20004,d1      ; largest Fast
   jsr   -216(a6)      ; AvailMem()
   lsr.l   #8,d0         ; /1024
   lsr.l   #2,d0
   move.l   d0,d5
   
   move.l   62(a6),d0      ; Max Chip
   lsr.l   #8,d0         ; / 1024
   lsr.l   #2,d0   
   move.l   d0,d6

   moveq   #4,d1         ; Max Fast
   bset    #19,d1   
   jsr     -216(a6)      ; AvailMem()
   lsr.l   #8,d0         ; / 1024
   lsr.l   #2,d0   
   move.l   d0,d7
   
   bsr   GetGFX
   
   move.l   $4.w,a6         ; get execbase
   moveq   #0,d1
   move.w   $14(a6),d1      ; KS version (1.3 = version 34)
   swap   d1
   move.b   530(a6),d1      ; VBlank Frequency
   
   move.l   $4.w,a6         ; get execbase
   moveq   #0,d2
   move.b   $129(a6),d2
   bsr   GetFPU
   bsr.b   GetCPU
   move.l   (a7)+,a6
   rts


GetCPU   btst   #7,d2
   bne.b   .68060
   btst   #3,d2
   bne.s   .68040
   btst   #2,d2
   bne.s   .68030
   btst   #1,d2
   bne.s   .68020
   btst   #0,d2
   bne.s   .68010

.68000   move.l   #$68000,d2
   rts
.68010   move.l   #$68010,d2
   rts
.68020   move.l   #$68020,d2
   rts
.68030   move.l   #$68030,d2
   rts
.68040   move.l   #$68040,d2
   rts
.68060   move.l   #$68060,d2
   rts
   
GetFPU   moveq   #0,d3
   btst   #7,d2
   bne.b   .68060i
   btst   #6,d2
   bne.b   .68040i
   btst   #5,d2
   bne.b   .68882
   btst   #4,d2
   bne.b   .68881
   rts

.68881   move.l   #$68881,d3
   rts
.68882   move.l   #$68882,d3
   rts
.68040i   move.l   #$68040,d3
   rts
.68060i   move.l   #$68060,d3
   rts
   
GetGFX   moveq   #0,d1
   move.b  $dff07d,d1
   cmp.b   #$f8,d1
   beq.b   .AGA
   cmp.b   #$fc,d1
   beq.b   .ECS
   moveq   #0,d0
   rts

.AGA   moveq   #2,d0
   rts
.ECS   moveq   #1,d0
   rts

_________________
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 15, 2006 9:27 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 06, 2003 7:13 pm
Posts: 670
Location: France
Sweet :)
It is pity that the PB AmigaOS port is no longer supported :(

_________________
"Qui baise trop bouffe un poil." P. Desproges

http://karlkox.blogspot.com/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 25, 2006 12:03 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Feb 13, 2004 12:45 am
Posts: 2769
Location: Bergen, Norway
Can an admin/mod delete Dickderten0's post?
It's got a link to a site that tries to download a virus PCK/NSIS.M

EDIT: Thanks Fred :)

_________________
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!


Top
 Profile  
Reply with quote  
 Post subject: Re: Get Amiga Config [680x0 ASM]
PostPosted: Thu Jan 13, 2011 7:49 am 
Offline
New User
New User

Joined: Thu Jan 13, 2011 7:44 am
Posts: 1
Hello guys

I am getting into Amiga 6800 assembly language and I would like to know if I can code programs by my PC and use a PC programs that generate amiga executables to run with winuae o a real amiga!

any suggestion?

_________________
Test King , mcsa practice test , mcse dumps , mcts exam


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye