16 July 2010, 13:52 | #21 |
Global Moderator
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,300
|
Thanks for a mighty effort, Herpes! That's a fantastic job!
I guess this really ought to be uploaded to the EAB File Server too! |
16 July 2010, 17:38 | #22 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
|
16 July 2010, 18:56 | #23 |
Dazed and Confused
Join Date: Dec 2001
Location: portsmouth/uk
Posts: 242
|
Well done. That's an excellent bit of work!
|
16 July 2010, 19:31 | #24 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Nice work man
Thank you from the whole of EAB and those wanting to learn ASM |
16 July 2010, 22:02 | #25 |
... aka Amix73
Join Date: Jan 2009
Location: Austria
Posts: 87
|
Thanks guys!
|
28 July 2010, 11:55 | #26 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,734
|
Some selected babelfish quotes in the coding humor thread maybe hmm?
|
10 September 2010, 06:48 | #27 |
OT Whore
Join Date: Nov 2008
Location: Switzerland
Age: 41
Posts: 291
|
Wooooooow, just discovered this thread by chance, what a perfect timing!
Herpes, thank you so much for this awesome job. I'm diving into it right now! Bippy, this should be linked on top of your ASM Resources thread I think! This is probably the best and most complete source I've seen so far. What do you think? |
28 September 2010, 22:23 | #28 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
I just started and finished part 1. That small program (part 1, page 16) is very neat. I did fiddle around with it and have a rough idea of how it works, but I haven't looked up the register values which were set beforehand (I am assuming they just switched off unecessary stuff), though I know which registers they are for (INTENA and DMACON).
Anyone else doing this course and wish to share their experimentations? For example, for the program in part 1, page 16 change line 4 to any of the following: move.b $DFF006,$DFF180 move.l $DFF006,$DFF180 move.w #DFF006,$DFF180 Regards, Lonewolf10 |
29 September 2010, 10:05 | #29 |
OT Whore
Join Date: Nov 2008
Location: Switzerland
Age: 41
Posts: 291
|
Hey Lonewolf,
I had to quit the course for a while and was planning to get back to it this week but a pretty nasty virus kept me in bed for a full week...I will get back to it in the upcoming days for sure, maybe even today, and I'd be more than pleased to share thoughts and stuff with you Cheers! Nic |
29 September 2010, 23:06 | #30 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
That's a pity. I'm having problems with the 2nd example (part 2,page 16). The copperlist looks fine (it's a bunch of wait's and color00 changes), but nothing is displayed other than a grey background. I tried changing the copperlist so that it used colours 0 to 4 (trying to find which one workbench used as grey), with no success.
It only uses the DMACON and COP1LCH registers. DMACON has all the DMA disabled, then COP1LCH is set with address of the copperlist, and then copper DMA is set using DMACON ($8080). Can anyone point out what I am missing? *Just worked it out... forgot to disable FAST ram, so the copperlist (and program) weren't in chipmem. I'll add a seperate config purely for the course * (I did read the part about most of the examples not working, due to fast RAM being present, but that was yesterday. I didn't try example 2 until today, by which time I had forgotten about the fast RAM thing, doh!!) Also, after exiting the code all workbench graphical operations run at about 1/5 normal speed (perhaps slower). Is that intentional, or due to my setup? Setup: WinUAE as A600 (2MB chip RAM, kickstart 37.350, workbench ver. 37.71) Regards, Lonewolf10 |
29 September 2010, 23:36 | #31 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Just force the code into chipram within the program!
|
30 September 2010, 00:39 | #32 | |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Quote:
Also, make sure you locate your code and related data in public memory when it's final and you release your stuff. It's the best place for it and enables it to run faster if you have fastmem. The only data that must reside in chipmem is data that is to be directly accessed by the hardware, such as sprites and bitplanes, copper programs, blitter data etc. |
|
30 September 2010, 18:26 | #33 | |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
This is the code from the course (Part 2, page 16). I added the saving of the register values, but that doesn't make any difference. I tried compiling with them commented out (asterisks at start of both movem.l lines) and with them included. Code:
; ; Danish Assembler Course: Example 2 (part 2, page 16) ; Saving/restoring register values added by ADB ; Always compile WITHOUT fast RAM, so copperlist is in chip memory. ; movem.l a1/a6,-(sp) move.w #$01A0,$DFF096 ;DMACON (all DMA off) lea.l copperlist(pc),a1 move.l a1,$DFF080 ;COP1LCH move.w #$8080,$DFF096 ;DMACON (was $8080) wait: btst #6,$BFE001 ;wait for LMB bne wait move.w $0080,$DFF096 ;DMACON move.l $04,a6 move.l 156(a6),a1 move.l 38(a1),$DFF080 ;COP1LCH move.w #$81A0,$DFF096 ;DMACON movem.l (sp)+,a1/a6 rts copperlist: ;Translation dc.w $9001,$FFFE ;wait for line $90 (144) dc.w $0180,$0F00 ;Colour 0 to $F00 (red) dc.w $A001,$FFFE ;wait for line $A0 (160) dc.w $0180,$0FFF ;Colour 0 to $FFF (white) dc.w $A401,$FFFE ;wait for line $A4 (164) dc.w $0180,$000F ;Colour 0 to $00F (blue) dc.w $AA01,$FFFE ;wait for line $AA (170) dc.w $0180,$0FFF ;Colour 0 to $FFF (white) dc.w $AE01,$FFFE ;wait for line $AE (174) dc.w $0180,$0F00 ;Colour 0 to $F00 (red) dc.w $BE01,$FFFE ;wait for line $BE (190) dc.w $0180,$0000 ;Colour 0 to $000 (black) dc.w $FFFF,$FFFE ;wait forever (until next VBL) Perhaps it's glitchy as it is designed to be used with K-Seka? Regards, Lonewolf10 |
|
30 September 2010, 18:58 | #34 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
The code is quite bad because it doesn't restore the DMACON settings properly. Correct way to do it is like this:
- store current DMACON settings (read register DMACONR, $dff002) so you can - write this value back to DMACON ($dff096) upon exit (don't forget to set BIT #15 (SET/CLR) before) I don't give any code example because it is a good exercise for you to do it yourself. |
30 September 2010, 19:27 | #35 |
Lemon Curry ?
Join Date: Sep 2004
Location: Denmark
Age: 49
Posts: 4,158
|
|
30 September 2010, 23:29 | #36 | |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
Thanks. It took a while but I got it working properly now (I commented out the line "move.w #$81A0,$DFF096", added a dc.l to store the DMACONR value and a few other lines to store/retrieve it to/from there) Regards, Lonewolf10 |
|
01 October 2010, 19:36 | #37 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
I am continuing on with the course (currently on part 4), but something is starting to bug me. Some of the examples use...
blk.l 1,0 ...to reserve space and their pre-set value when compiled. Devpac 2 doesn't like this saying "instruction not recognised". I can replace it with "dc.w" which isn't too much hassle, but I was wondering why it doesn't like the above. Is it K-Seka specific? Regards, Lonewolf10 |
01 October 2010, 20:00 | #38 | ||
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Nice one.
Quote:
Quote:
|
||
01 October 2010, 21:00 | #39 | ||
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
Quote:
Of course, I'll have to add some move.l's and a dbra loop to do the same thing, as ds (define storage) doesn't seem to support the pre-set values (2nd part of blk.l) Regards, Lonewolf10 |
||
01 October 2010, 21:05 | #40 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Beginning Amiga Assembly Programming | Hewitson | Coders. Tutorials | 32 | 09 October 2012 18:25 |
Wanted: Amiga Assembly Books | Hewitson | Coders. General | 30 | 25 July 2010 10:56 |
New danish online Amiga & Commodore shop | Retroplay | News | 6 | 25 October 2008 08:55 |
Amiga Assembly sources - Please help! | W4r3DeV1L | Amiga scene | 21 | 16 July 2008 08:13 |
Amiga won at Assembly 2006 | Frog | Amiga scene | 47 | 04 February 2007 19:59 |
|
|