English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 25 September 2014, 12:20   #1
Skillion76
 
Posts: n/a
Floppy disk I need help with my intro... I´m learning...

Hello friends ...

I am learning to program DEMOS-INTROS-CRACKTROS and need help with a SOURCE ..

The problem is I can not find where is the error in my code, is a basic INTRO, with LOGO, STARFIELD, PLAY-ROUTINE and SCROLL ... The logo is displayed but not the SCROLL, the lower half of the screen it is black ...

Include working discs, one containing the CED MASTERDEVPAC and ... on the other (SOURCES) is my INTRO file called "example.s" ...

I use WinUAE with images .ADF so appreciate that help me modify the code and point out the mistakes to learn from them ...


I also wish someone would give me SOURCES in .ADF format with routines of PIC + SCROLL, effects and small intros to learn to use the COPPER and BLITTER...

PS: I know THE LEGACY, FLASHTRO .. I prefer SOURCES of people here, routines to learn ...

Thank you.

Last edited by Skillion76; 05 October 2014 at 20:21.
 
Old 25 September 2014, 12:46   #2
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,650
I have told you already what you need to do and where to look. Coding an intro involves work from your side and not just asking someone else to fix the source for you. That's not learning.
StingRay is offline  
Old 25 September 2014, 14:23   #3
Skillion76
 
Posts: n/a
I do not know you ... But thanks for commenting ... I understand that it takes work but no one can overcome obstacles without a little help ...
 
Old 25 September 2014, 19:03   #4
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
If you can explain more clearly exactly what you're doing, what results you're getting and what results you were expecting, then people can probably help you faster. Nobody wants to debug the source code of a whole demo.

Also, don't post your source code in an ADF image If you can narrow the problem down to a smaller amount of code, then de-tab the code and post it using
[CODE] [/CODE]
tags instead.
Leffmann is offline  
Old 25 September 2014, 19:23   #5
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,650
Quote:
Originally Posted by Skillion76 View Post
I do not know you ... But thanks for commenting ... I understand that it takes work but no one can overcome obstacles without a little help ...
You do know me, guess who fixed the source for you when you asked in the Amiga code facebook group.

Please do not think that "learning" is just asking other people to do the work for you. You won't learn much then.

And please don't call it "your" code as 99% of the code was done by someone else.
StingRay is offline  
Old 25 September 2014, 23:34   #6
Skillion76
 
Posts: n/a
Excuse me, but did not know him by that name ... You are right, Startup routine is not mine, although I have no knowledge to create your own, but I'm not interested in anyone else to do my work, I only intend to learn from the little information I have, not fluent in English language, as there is no information or books in my language, I hope that it has not bothered by my comments ... I just want to learn a little more about my hobby not mean to offend anyone I guess ... you also would look when he began the work of others to learn ... not born knowing ...

Thank you all for the comments ... I'll study on my own to improve in the future ... I hope no one is upset ... A big hug.

Last edited by TCD; 26 September 2014 at 10:08. Reason: Back-to-back posts merged.
 
Old 26 September 2014, 14:42   #7
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,908
There are several problems in the scroller code.

The logo seems to be at least 150 lines high, but for some reason you work with a single-plane buffer of 290 lines, although there may be only 100 left for the scroll text.
Code:
Picture                 DCB.B (290*46),0
The BPL1PT initialization for the scroller has two problems:
Code:
        MOVE.L   #Planes,A0                     Bpl OF SCROLL...?
        MOVE.L   #Picture,D0                    Picture Block
        MOVE.L   D0,Offset                      Save Screen Start Address
        ADD.L    #(200*46)-1,Offset             ;Pointer for Scroller POSICION
PlLp    MOVE.W   D0,6(A0)                       Load Low Word
        SWAP     D0                             Swap Words
        MOVE.W   D0,2(A0)                       Load High Word
1. An offset of 200 lines will be far below the bottom screen border. You won't see any manipulation there.
2. -1 is bad, as graphics pointers always have to be word-aligned.

The Blitter is used in Scroller to copy a region of 16 lines 4 pixels to the left. This is done by setting the destination one word left of the source and using a shift of 12. But it needs the descending mode of the Blitter, which you don't enable here in BLTCON1:
Code:
Scroller
        BTST    #$0A,$DFF016                    Test Right Mouse
        BNE.S   Nxt                             If Not Equal Carry on
        RTS                                     Else Pause!
Nxt     MOVE.L  #$C9F00000,$DFF040              A=D,12 bits Shift
        MOVE.L  #$00000000,$DFF064              Mod
        MOVE.L  #$FFFFFFFF,$DFF044              Masks
        MOVE.L  Offset,$DFF050                  Source
        MOVE.L  Offset,A1         
        SUBQ.L  #1,A1                           Subtract 16 Pxls
        MOVE.L  A1,$DFF054                      Destination
        MOVE.W  #23+64*16,$DFF058               BLTSIZE
The next bug is subtracting 1. One word left would be two bytes.

Also some problems when blitting the next character:
Code:
Blit    MOVE.W  #$09F0,$DFF040                  A = D Miniterm
        MOVE.L  Offset,A1                       Scroller pos on screen
        MOVE.L  #Font,A0                        Font
        ADD.L   D0,A0                           Add CharPos
        MOVE.L  A0,$DFF050                      A
        ADD.L   #44,A1                          Display in Modulo border
        MOVE.L  A1,$DFF054                      D
Assuming you would correctly enable the descending mode while scrolling you have to switch to ascending mode here again.
The character will appear at Offset, which is the last word in the last line of the scroller region. You better blit it to the last word of the first line.
phx is offline  
Old 27 September 2014, 04:36   #8
Hewitson
Registered User
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 38
Posts: 3,747
This is the problem with copying and pasting pieces of code together. Using examples is great, but instead of copying them, use them as a reference and make sure you actually understand what they're doing.
Hewitson is offline  
Old 27 September 2014, 10:03   #9
Skillion76
 
Posts: n/a
That I do friend, to understand the operation ... The sources there in magazines are public, for use in learning mode, I think anyone is free to cut and paste ... It's a way of learning, with examples of other ... Here it seems that everyone is an expert and no one has ever looked at an example to learn ...
 
Old 27 September 2014, 10:06   #10
Skillion76
 
Posts: n/a
Thanks phx ...

It is good to share knowledge and help each other without tossed in face or accuse others ...
I will review and revise your tips to debug the code, so I can learn ... That in the future to make my own STARTUPS ...
 
Old 27 September 2014, 17:36   #11
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 41
Posts: 1,924
Quote:
Originally Posted by Skillion76 View Post
Here it seems that everyone is an expert and no one has ever looked at an example to learn ...

Not everyone here is an expert. I have spent the last 5 or so years learning and improving my ASM skills, with help from the members here.

I suggest you take a look at some of the threads in the Tutorials sub-forum here: http://eab.abime.net/forumdisplay.php?f=73

I have learnt alot from those threads.
Lonewolf10 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
Learning AMOS - Beginners Guide Disks Peter Retrogaming General Discussion 15 28 October 2015 17:17
DiskImage: When learning to read proves futile. XDelusion support.Apps 19 20 October 2012 23:57
Suggestions for learning pmc Coders. Tutorials 248 20 October 2010 21:42
Playpower - 8 bit learning games for the developing world girv Retrogaming General Discussion 5 24 March 2009 22:00
Learning assembler bLAZER Coders. General 1 12 May 2007 05:00

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 09:23.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.08604 seconds with 15 queries