Re: [ql-users] Checking on Processor
The easiest way to distinguish between 68020+ and the others is: MOVEM.L A7,-(A7) CMPA.L (A7),A7 ADDQ.L #4,A7 ;Reset A7 and leave condition codes unaltered BEQ LOW ;Not 68020+ Interesting... this seems to be the opposite of what the M680x0 programmer's manual states: If the effective address is specified by the predecrement mode ... ... For the MC68020, MC68030, MC68040, and CPU32, if the addressing register is also moved to memory, the value written is the initial register value decremented by the size of the operation. The MC68000 and MC68010 write the initial register value (not decremented). Daniele ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
On Fri, 02 Mar 2007 11:04:30 -, George Gwilt [EMAIL PROTECTED] wrote: On 28 Feb 2007, at 16:56, Rich Mellor wrote: Is there an easy way under QDOS to check which chip is in use - if it is a 68000 or 68008 I would use 2 (or 4) MOVE.B commands instead? SMSQ does implement the processor in the system variables, but it is not present on QDOS alas. Here is what smsqe does: move#$3700,sr ! move.w sr,d1 cmp.w #$2700,d1; 68000? beq.s copy ; ... yes move.w #$2700,sr; ... no, reset to normal OK I should implement a similar routine to this. George also provided a solution, but this seems easier. The easiest way to distinguish between 68020+ and the others is: MOVEM.L A7,-(A7) CMPA.L (A7),A7 ADDQ.L #4,A7 ;Reset A7 and leave condition codes unaltered BEQ LOW ;Not 68020+ This method did not work on QPC2 until Marcel altered it. Of course now QPC2 is 68020+. To use either of these methods is OK with real 68xxx hardware (though the sr method does require to be carried out in supervisor mode). The trouble with emulators is that you need to be sure that sr or MOVEM.L quirks are programmed into the emulator. You are right - this does not work on q-emulator - what quirk of movem.l is this actually using? Daniele probably needs to make an amendment to get this to work. The SR method does not work with smsq/e on q-emulator alas as Daniele has to trick smsq/e into thinking that the aurora is available. I thought it safer to try a real 68020+ instruction, such as BFTST, to check the type of machine. This is much more likely to be a proper test for an emulator. Problem with this is the need to go through TRAPV - something I have long stayed clear of !! -- Rich Mellor RWAP Services URL:http://www.rwapsoftware.co.uk URL:http://www.rwapservices.co.uk ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
On 2 Mar 2007, at 14:14, Rich Mellor wrote: The easiest way to distinguish between 68020+ and the others is: MOVEM.L A7,-(A7) CMPA.L (A7),A7 ADDQ.L #4,A7 ;Reset A7 and leave condition codes unaltered BEQ LOW ;Not 68020+ This method did not work on QPC2 until Marcel altered it. Of course now QPC2 is 68020+. To use either of these methods is OK with real 68xxx hardware (though the sr method does require to be carried out in supervisor mode). The trouble with emulators is that you need to be sure that sr or MOVEM.L quirks are programmed into the emulator. You are right - this does not work on q-emulator - what quirk of movem.l is this actually using? Daniele probably needs to make an amendment to get this to work. MOVEM.L A7,-(A7) puts the value of A7 on the stack and decrements the stack pointer. In the 68020+ series the stack pointer is decremented AFTER the value of A7 is stored. For the other processors A7 is decremented BEFORE. George ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
On 2 Mar 2007, at 14:14, Rich Mellor wrote: I thought it safer to try a real 68020+ instruction, such as BFTST, to check the type of machine. This is much more likely to be a proper test for an emulator. Problem with this is the need to go through TRAPV - something I have long stayed clear of !! Once you have done this it becomes quite easy! Have a look at the start of GWASS in INIT_ASM. George ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
In message [EMAIL PROTECTED], Rich Mellor [EMAIL PROTECTED] writes On Wed, 28 Feb 2007 19:44:03 -, Tony Firshman [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Malcolm Cadman wrote: In message [EMAIL PROTECTED], Rich Mellor [EMAIL PROTECTED] writes Yes I could do this, but I wanted to ensure that the code would also work on a Gold Card for possible future projects - not just QWord. Still no-one has still reported whether it works on a Gold Card+aurora or not yet !! It needs the Aurora and a hard drive to test, as QWord is too large to fit on a floppy disk, obviously. Will it fit on 8mb Romdisq? Tony Yes it would :-) The Aurora version is actually distributed on a HD floppy disk, but needs to be installed onto a hard drive or Romdisq. Ahh ... that makes sense, then . :-) -- Malcolm Cadman ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
In message [EMAIL PROTECTED], Rich Mellor [EMAIL PROTECTED] writes Yes I could do this, but I wanted to ensure that the code would also work on a Gold Card for possible future projects - not just QWord. Still no-one has still reported whether it works on a Gold Card+aurora or not yet !! It needs the Aurora and a hard drive to test, as QWord is too large to fit on a floppy disk, obviously. -- Malcolm Cadman ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Malcolm Cadman wrote: In message [EMAIL PROTECTED], Rich Mellor [EMAIL PROTECTED] writes Yes I could do this, but I wanted to ensure that the code would also work on a Gold Card for possible future projects - not just QWord. Still no-one has still reported whether it works on a Gold Card+aurora or not yet !! It needs the Aurora and a hard drive to test, as QWord is too large to fit on a floppy disk, obviously. Will it fit on 8mb Romdisq? Tony - -- QBBS (QL fido BBS 2:252/67) +44(0)1442-828255 [EMAIL PROTECTED] http://firshman.co.uk Voice: +44(0)1442-828254 Fax: +44(0)1442-828255 Skype: tonyfirshman TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF5duDM3RzOs8+btoRAq5qAJ4ksk+hpvXCIFikpGGdUHUCqOJpsgCfRHVl AySHT8GDif4Z2ueNw7AlnRs= =hxJx -END PGP SIGNATURE- ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rich Mellor wrote: On Wed, 28 Feb 2007 19:44:03 -, Tony Firshman [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Malcolm Cadman wrote: In message [EMAIL PROTECTED], Rich Mellor [EMAIL PROTECTED] writes Yes I could do this, but I wanted to ensure that the code would also work on a Gold Card for possible future projects - not just QWord. Still no-one has still reported whether it works on a Gold Card+aurora or not yet !! It needs the Aurora and a hard drive to test, as QWord is too large to fit on a floppy disk, obviously. Will it fit on 8mb Romdisq? Tony Yes it would :-) The Aurora version is actually distributed on a HD floppy disk, but needs to be installed onto a hard drive or Romdisq. How much space does it need? I have an Aurora board so could test it if you want. Tony - -- QBBS (QL fido BBS 2:252/67) +44(0)1442-828255 [EMAIL PROTECTED] http://firshman.co.uk Voice: +44(0)1442-828254 Fax: +44(0)1442-828255 Skype: tonyfirshman TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF5e+2M3RzOs8+btoRAmzYAJ42ZivCe9e9p/THNeghQgLtHCVTygCfcEe7 blcyShuuUh/fMRvJkXxEMTU= =5LrM -END PGP SIGNATURE- ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
On Wed, 28 Feb 2007 21:10:14 -, Tony Firshman [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rich Mellor wrote: On Wed, 28 Feb 2007 19:44:03 -, Tony Firshman [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Malcolm Cadman wrote: In message [EMAIL PROTECTED], Rich Mellor [EMAIL PROTECTED] writes Yes I could do this, but I wanted to ensure that the code would also work on a Gold Card for possible future projects - not just QWord. Still no-one has still reported whether it works on a Gold Card+aurora or not yet !! It needs the Aurora and a hard drive to test, as QWord is too large to fit on a floppy disk, obviously. Will it fit on 8mb Romdisq? Tony Yes it would :-) The Aurora version is actually distributed on a HD floppy disk, but needs to be installed onto a hard drive or Romdisq. How much space does it need? I have an Aurora board so could test it if you want. Approx 2MB - I may send you a copy if I get chance - email be ok? -- Rich Mellor RWAP Services URL:http://www.rwapsoftware.co.uk URL:http://www.rwapservices.co.uk ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rich Mellor wrote: On Wed, 28 Feb 2007 21:10:14 -, Tony Firshman [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rich Mellor wrote: On Wed, 28 Feb 2007 19:44:03 -, Tony Firshman [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Malcolm Cadman wrote: In message [EMAIL PROTECTED], Rich Mellor [EMAIL PROTECTED] writes Yes I could do this, but I wanted to ensure that the code would also work on a Gold Card for possible future projects - not just QWord. Still no-one has still reported whether it works on a Gold Card+aurora or not yet !! It needs the Aurora and a hard drive to test, as QWord is too large to fit on a floppy disk, obviously. Will it fit on 8mb Romdisq? Tony Yes it would :-) The Aurora version is actually distributed on a HD floppy disk, but needs to be installed onto a hard drive or Romdisq. How much space does it need? I have an Aurora board so could test it if you want. Approx 2MB - I may send you a copy if I get chance - email be ok? Email is fine. I better make sure my GC works - I haven't used it for a while! Tony - -- QBBS (QL fido BBS 2:252/67) +44(0)1442-828255 [EMAIL PROTECTED] http://firshman.co.uk Voice: +44(0)1442-828254 Fax: +44(0)1442-828255 Skype: tonyfirshman TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF5fMHM3RzOs8+btoRAm4WAJ9JcIkh1eEgZ7ArnsjpKwPO9GlZrACcDBEj /Thp50fHjiQqTieSHY66WiE= =aKuQ -END PGP SIGNATURE- ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[ql-users] Checking on Processor
I need to make some amendments to my QWord program to get the code working on Q-emulator. The problem is because I use both MOVE.W (a1)+,(a3)+ and MOVE.L (a1)+,(a3)+ on both odd and even addresses. Now this crashes on a 68008 chip but I am not concerned as QWord needs a Super Gold Card ideally to run. However, I wonder whether it works on a Gold Card (not tested) - has anyone experience running QWord on a Gold Card, as the 68000 does not appear to acccept these commands on an odd address also. Anyway, in order to retain maximum compatability, q-emulator also generates an address error on these commands - it emulates a 68008 chip. Is there an easy way under QDOS to check which chip is in use - if it is a 68000 or 68008 I would use 2 (or 4) MOVE.B commands instead? SMSQ does implement the processor in the system variables, but it is not present on QDOS alas. Food for thought -- Rich Mellor RWAP Services URL:http://www.rwapsoftware.co.uk URL:http://www.rwapservices.co.uk ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [ql-users] Checking on Processor
Is there an easy way under QDOS to check which chip is in use - if it is a 68000 or 68008 I would use 2 (or 4) MOVE.B commands instead? SMSQ does implement the processor in the system variables, but it is not present on QDOS alas. Here is what smsqe does: move#$3700,sr ! move.w sr,d1 cmp.w #$2700,d1; 68000? beq.s copy ; ... yes move.w #$2700,sr; ... no, reset to normal There may be other ways, for example I think C68 has a CPU detection routine. However, another problem is that smsqe won't even check for the Aurora card on 68000 systems, i.e. 68000 + smsqe + aurora is not currently a possible combination. Easiest solution to your specific problem (QWord on Q-emuLator) would be to assume a 68000 CPU when running on Q-emuLator (as I believe you are already testing for this platform). The worst that could happen is that if in the future I start emulating a 68020 or 68040 in Q-emuLator, you would still use four MOVE.B instead of one MOVE.L and on the 10GHz CPU PCs that we'll have at that time your code will incur a penalty of perhaps a nanosecond ;) Daniele ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm