Welcome, Guest. Please login or register.

Author Topic: Line lengths.  (Read 2955 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline SoLo2Topic starter

  • Newbie
  • *
  • Join Date: Dec 2005
  • Posts: 6
    • Show all replies
    • http://www.geocities.com/thebitsclub
Line lengths.
« on: December 18, 2005, 05:28:52 AM »

  Hello!

  I am new to the Amiga World! :D
  Testing a little assembler I
  got to this code, that sets the
  screen I will be using.
  So, it seems like it _must_ be
  reinitialized at each screen refresh,
  true?
  That means that it can be initialized
  in the copper list, or otherwise in a
  separate routine,
  that writes directly to the registers.

  The problem arises when changing
  the "diwstrt" and "diwstop" registers.
  If I try using horizontal (x) start and
  end coordinates that are more to the
  left, for example $xx51 and $xx91,
  (this would start,stop at 079,145+256)
  then the effective visible line shrinks
  from 320 down to 272. The virtual line
  seems to remain the correct 320, but
  you   see   I set the modulo registers
  ($0108, $010a) to zero, to not have a
  bigger, virtual line...

  Why? who knows?

 
CopperList
  dc.w    $0100,$1200 ;bplcon0 set 1 plane, color
  dc.w    $0108,$0000 ;bpl1mod offset to next line
  dc.w    $010a,$0000 ;bpl2mod offset to next line
  dc.w    $008e,$3081 ;diwstrt start coords 048,129
  dc.w    $0090,$30c1 ;diwstop stop coords  304,449
  ; 320 (normal) visible line width
  dc.w    $0092,$0038 ;ddfstrt L margin normal (horz)
  dc.w    $0094,$00d0 ;ddfstop R margin normal (horz)
  ; to point to bitplane 1
  dc.w    $00e0       ;bitplane0 hi
hi0
  dc.w    $0000
  dc.w    $00e2       ;bitplane1 lo
lo0
  dc.w    $0000
  dc.w    $0182,$0ff0 ;color01



  I am using excellent UAE-0.8.21
  emulator under Linux. Great!

  SoLo2

 

Offline SoLo2Topic starter

  • Newbie
  • *
  • Join Date: Dec 2005
  • Posts: 6
    • Show all replies
    • http://www.geocities.com/thebitsclub
Re: Line lengths.
« Reply #1 on: January 26, 2006, 09:31:02 PM »
  Hello!


  Interesting is, to be able to have a
  virtual line length of at least double
  length the physical line length:
  physical=320, virtual=640 (lo-res);
  physical=640, virtual=1280 (hi-res)
  This is the best for horizontal scrolling.

  The physical screen (or line length) is
  the part of a very large screen (the virtual)
  shown to the player.
  Consequently, the virtual screen is "like"
  an extension of the physical, that makes it
  much larger.
  In fact only double as large.
  The virtual is more like an super screen
  that "contains" the visible screen.

  The physical part acts like a window that
  moves over the total screen width.
  It is incremented pixel by pixel, and then
  Word by Word (16 pixels), by de/incrementing
  registers $DFF102 BPLCON1 and $DFF0E0 to
  $DFF0F6 BPL?PTH/L, until a whole physical
  screen width has been scrolled.
  At this point the physical window position
  jumps back to the beginning, by resetting
  the screen base addresses BPL?PTH/L.

  In this example we increment by 2 pixels,
  to make the drawing shorter:

================== frames
|physical########| 0,1
==================
|#physical#######| 2,3
==================
|##physical######| 4,5
==================
|###physical#####| 6,7
==================
|####physical####| 8,9
==================
|#####physical###| a,b
==================
|######physical##| c,d
==================
|#######physical#| e,f
==================
|########physical| 0,1
==================

  flip both window parts
  and we are at the start:

==================
|physical########| 0,1
==================



  Always after scrolling 1 whole Word, the
  program has to fill 1 Word column at the
  new border of the screen, and 1 Word column
  in the just disappeared border of the screen.
  This column painted at the disappeared border
  is a column of a whole screen "to come"
  (in the future of the scrolling).
  This is an "amortized" way to cope with the
  big jump, when the physical is resetted to
  the beginning of the virtual screen.
  This way we avoid a frame that takes longer
  to paint, because it has to refill the whole
  window with "tiles".


  The question is:
  Is it possible to have such a big virtual
  screen with Amiga's hardware?


  SoLo2