How to code a sine scroll on Amiga (4/5)

This article is the fourth of a serie of five about how to code a one-pixel sine scroll on Amiga, an effect commonly used by coders of demos and other cracktros. For example, in this this intro by Supplex (so beautiful, so vintage):
Sine scroll in an intro by Miracle
In the first article, we learned how to install a development environment on an Amiga emulated with WinUAE, and how to code a basic Copper list to display something on the screen. In the second article, we learned how to set up a 16×16 font to display the columns of pixels of its characters, and to use triple buffering to display the pictures on the screen without any flickering. In the third article, we learned how to draw and animate the sine scroll, first with the CPU then with the Blitter.
In this article, we shall add some bells and whistles to the sine scroll, namely a shadow and a mirror – this doesn’t cost much CPU time cycles because the Copper makes this happen. Also, we shall try to give control back to the OS as cleanly as we can.
Click here to download the archive of the source and data of the program hereby explained.
If you’re using Notepad++, click here to download and enhanced version of the UDL 68K Assembly (v3).
NB : This article may be best read while listening to the great module composed by Nuke / Anarchy for the diskmag part of Stolen Data #7, but this is just a matter of personal taste…
Cliquez ici pour lire cet article en français.
Continue reading “How to code a sine scroll on Amiga (4/5)”
How to code a sine scroll on Amiga (4/5)

How to code a sine scroll on Amiga (3/5)

This article is the third of a serie of five about how to code a one-pixel sine scroll on Amiga, an effect commonly used by coders of demos and other cracktros. For example, in this cracktro by Supplex:
Sine scroll in a cracktro by Supplex
In the first article, we learned how to install a development environment on an Amiga emulated with WinUAE, and how to code a basic Copper list to display something on the screen. In the second article, we learned how to set up a 16×16 font to display the columns of pixels of its characters, and to use triple buffering to display the pictures on the screen without any flickering.
In this third article, we shall go to the heart of the matter by learning how to draw and animate the sine scroll, first with the CPU, then with the Blitter.
Click here to download the archive of the source and data of the program hereby explained.
If you’re using Notepad++, click here to download and enhanced version of the UDL 68K Assembly (v3).
NB : This article may be best read while listening to the great module composed by Nuke / Anarchy for the diskmag part of Stolen Data #7, but this is just a matter of personal taste…
Cliquez ici pour lire cet article en français.
Continue reading “How to code a sine scroll on Amiga (3/5)”
How to code a sine scroll on Amiga (3/5)

How to code a sine scroll on Amiga (2/5)

This is the second of a serie of five articles about how to code a one-pixel sine scroll on the Amiga, an effect commonly used by coders of demos and other cracktros on this machine… until it was outmoded when Red Sector Inc. (RSI) made it possible for any lamer to create its own with the famous DemoMaker:
The DemoMaker by Red Sector Inc. (RSI), for lamers only
In the first article, we learned how to install a development environment on an Amiga emulated with WinUAE, and how to code a basic Copper list to display something on the screen.
In this second article, we shall transform a 16×16 font to easily display its columns of pixels, precompute the values of the sine table required to deform the text by modifying the ordinates of those columns, and set up a triple buffering to avoid flickering when switching the picture that is displayed.
Click here to download the archive of the source and data of the program hereby explained.
If you’re using Notepad++, click here to download and enhanced version of the UDL 68K Assembly (v3).
NB : This article may be best read while listening to the great module composed by Nuke / Anarchy for the diskmag part of Stolen Data #7, but this is just a matter of personal taste…
Cliquez ici pour lire cet article en français.
Continue reading “How to code a sine scroll on Amiga (2/5)”
How to code a sine scroll on Amiga (2/5)

How to code a sine scroll on Amiga (1/5)

One of the most cherished effect used by MC68000 assembly coders on the Amiga has been the sine scroll, the scroll of some text deformed by changing the ordinate of its consecutive columns of pixels along a sine curve, as in this intro by Falon :
A cool sine scroll by Falon on Amiga 500, but not a 1 one-pixel one
The best of its kind is the one-pixel sine scroll, where each column of pixels is displayed at a given ordinate. However, as it will be shown here, this kind of sine scroll requires too much CPU cycles when drawn only by the CPU. For performance improvement, we shall lighten the CPU workload by relying on two graphic coprocessors: the Blitter and the Copper.
This article may be read by anyone, having been written for those who have never coded in MC68000 assembly language, even less metal-bashed the hardware of the Amiga. It has been translated by the author from the french version, published in Programmez! #214-218 between 2017 and 2018. Sorry for the poor english: suggestions for improvements are welcome here.
Click here to download the archive of the source and data of the program hereby explained.
This archive contains several sources :
  • sinescroll.s is the basic version which we will code until we decide to optimize it;
  • sinescroll_final.s is the optimized version of the previously mentioned basic version;
  • sinescroll_star.s is an enhanced version of the optimized version.
If you’re using Notepad++, click here to download and enhanced version of the UDL 68K Assembly (v3).
This article is the first of five. We shall learn how to install a development environment on Amiga emulated with WinUAE, and how to code a basic Copper list to display something on the screen.
NB : This article may be best read while listening to the great module composed by Nuke / Anarchy for the diskmag part of Stolen Data #7, but this is just a matter of personal taste…
Cliquez ici pour lire cet article en français.
06/16/2018 update: StingRay / Scoopex helped to correct misprints, adjust the vocabulary, add some details regarding comptability. Thanks, dude!
Continue reading “How to code a sine scroll on Amiga (1/5)”
How to code a sine scroll on Amiga (1/5)

Are PHP references C/C++ pointers?

To the C/C++ coder, PHP references are bit challenging to understand. Are they pointers?
Regardless of the way references do truly work, what confuses the C/C++ coder is that it seems that PHP references are not like pointers because of the syntax:
int i, *p;
i = 0;
p = &i;
std::cout << *p;	// In PHP, you would write p and not *p
As in :
$i = 0;
$p = &$i;
echo ($p);	// See: that's $p as if it was like $i
So, how should the C/C++ coder understand how references do work in PHP ? The purpose of this article is to cast some light on this. More broadly speaking, anyone who intends to use references in PHP should find something interesting here - most notably to clarify the relationship between reference and unset ().
Ciquez ici pour lire cet article en français.
Continue reading "Are PHP references C/C++ pointers?"
Are PHP references C/C++ pointers?

How settings do work in PhpStorm 2017

PhpStorm 2017 is eminently configurable. You can adjust more or less any aspect of the IDE. In particular, the user interface (UI) can be very finely tuned to fit your needs.
Configuring the code syle for PHP in PhpStorm 2017.3
Sadly, the way settings work can turn you crazy. The are no less than three ways to tune the settings at any time :
  • at the welcome screen, the Configuration button, then Settings ;
  • if a project is opened, the File menu, then Settings ;
  • if a project is opened, the File menu, then Default Settings.
Moreover, in some cases, a setting may be tuned by telling PhpStorm that its value should be related to a “profile” ou a “scheme”…
The main problem with settings in PhpStorm is that the entry point for tuning settings does not talk to the user. How to tune a setting and apply the new value to a set of projects ? How to tune a setting so that the new value should only apply to projects to come ? The user has to work it by himself to find answers to such basic questions.
Since nobody ever published a good in-depth explanation about how settings do work in PhpStorm 2017, let’s explore the possibilities of PhpStorm 2017.3 to understand how all of this may be achieved.
Ciquez ici pour lire cet article en français.
Continue reading “How settings do work in PhpStorm 2017”
How settings do work in PhpStorm 2017