English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. General (http://eab.abime.net/forumdisplay.php?f=37)
-   -   I need help with my intro... I´m learning... (http://eab.abime.net/showthread.php?t=75222)

Skillion76 25 September 2014 12:20

I need help with my intro... I´m learning...
Hello friends ...:help

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 ...:banghead

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 ...:great

Thank you.

StingRay 25 September 2014 12:46

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.

Skillion76 25 September 2014 14:23

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 ...

Leffmann 25 September 2014 19:03

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 :guru If you can narrow the problem down to a smaller amount of code, then de-tab the code and post it using
tags instead.

StingRay 25 September 2014 19:23


Originally Posted by Skillion76 (Post 977699)
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.

Skillion76 25 September 2014 23:34

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.

phx 26 September 2014 14:42

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.

Picture                DCB.B (290*46),0
The BPL1PT initialization for the scroller has two problems:

        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:

        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:

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.

Hewitson 27 September 2014 04:36

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.

Skillion76 27 September 2014 10:03

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 ...

Skillion76 27 September 2014 10:06

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 ...

Lonewolf10 27 September 2014 17:36


Originally Posted by Skillion76 (Post 977985)
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.

All times are GMT +2. The time now is 04:58.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.06959 seconds with 11 queries