AmigaCompProg.pdf
(
1377 KB
)
Pobierz
Guide to Amiga Compatible
Programming
for AmigaOS3.x, AmigaOS4.x, MorphOS and AROS
Amiga programming becomes with passing of years a black magic because
documentation about this system is not updated and new system like AmigaOS4,
MorphOS and AROS haven't a really guide to beginner. This guide tries to introduce
the reader through Amiga Programming following modern tecniques avaiable into
new Amiga flavours and permit to know what is the Amiga platform today.
Code license:
Content license:
Artistic License/GPL
Creative Commons 3.0 BYSA
http://code.google.com/p/guidetoamigacompatibleprogramming/
SVN Rev. 35, 20100915
Table of Contents
Chapter 1: Introduction.....................................................................................................................1
1.1 Problems to face when programming on Amiga........................................................................1
1.2 Past and modern philosophies: reset course...............................................................................1
1.3 What is the Amiga platfrom today? Hints to code portability....................................................2
Chapter 2: Development environments............................................................................................4
2.1 Development environments to write Amiga programs..............................................................4
2.2 Windows cross compilers...........................................................................................................4
2.3 Compilation on AmigaOS3.x (GCC).........................................................................................5
2.3.1 Preconfigured 68k GCC environment.....................................................................................9
2.4 TextEditors to write programs on Amiga...................................................................................9
2.5 Amiga documentation: historical books...................................................................................10
2.5.1. Amiga documentation: the electronic format.......................................................................11
2.5.2 Autodoc or Robodoc..............................................................................................................11
2.6 Debugging on Amiga: how to find errors in our programs......................................................11
2.6.1 Amiga: a system without memory protection.......................................................................12
2.6.2 Enforcer and Amiga compatible systems..............................................................................12
2.6.3 MungWall / MemGuard / WipeOut......................................................................................13
2.6.4 Sashimi and the serial port....................................................................................................14
2.6.5 AmigaOS4, GrimReaper and addr2line................................................................................14
Chapter 3: Basic knowledge for Amiga programming.................................................................16
3.1 Excursus (discussion) on Amiga OS........................................................................................16
3.2 Inside AmigaOS.......................................................................................................................16
3.3 Using Amiga functions.............................................................................................................17
3.3.1 AmigaOS4 interfaces and Amiga OS's preprocessor symbols..............................................19
3.4 Differences between various Amiga OS types.........................................................................21
3.5 AROS, variable passing............................................................................................................22
3.6 Programs, tasks and processes..................................................................................................22
Chapter 4: Interaction between programs and users on Amiga: GUI........................................23
4.1 Tools to use to get a graphical interface on Amiga..................................................................23
4.1.1 Pills of object oriented programming....................................................................................23
4.2. BOOPSI and MUI: some history.............................................................................................24
4.3 BOOPSI programming.............................................................................................................25
4.3.1 Instantiating a BOOPSI class................................................................................................27
4.3.2 BOOPSI: adding an object to another object........................................................................27
4.4 From BOOPSI to MUI.............................................................................................................28
4.4.1 MUI: overview......................................................................................................................29
4.4.2 MUI: An example of a simple graphical interface................................................................30
4.5 MUI: Notifications...................................................................................................................32
4.5.1 MUI: Notifications with callback hook.................................................................................32
4.5.2 MUI: closing window and the old notify method with ReturnID.........................................34
4.5.3 Zune and MUIM_Application_Execute................................................................................34
4.6 Il cuore di una classe BOOPSI/MUI: il Dispatcher..................................................................35
4.6.1 Implementazione di una classe MUI privata.........................................................................36
4.6.2 Implementazione del metodo OM_NEW e dei tag esterni....................................................37
4.6.3 Utilizzo di una classe privata.................................................................................................41
4.7 DoSuperNew() e le funzioni varargs........................................................................................47
4.8 MUI: notifica mediante metodi pubblici di classi private........................................................47
4.8.1 MUI: notifica mediante attributi notificabili.........................................................................51
4.8.2 MUI: catene di notifiche........................................................................................................52
4.8.3.1 Pericoli con le catene di notifiche su Zune.........................................................................54
4.9 MUI: sincronizzazioni, MUIM_Application_PushMethod e
MUIM_Application_KillPushMethod...........................................................................................55
4.10 MUI: chiarimento sugli hook (metodi privati coinvolti in notifiche).....................................56
4.11 Le macro shortcuts di MUI.....................................................................................................57
Chapter 5: The Communication between tasks on Amiga...........................................................58
5.1 Different kinds of interaction...................................................................................................58
5.2 An introduction to signals........................................................................................................58
5.3 Ports and Messages...................................................................................................................59
5.3.1. Messages on Amiga OSes....................................................................................................59
5.3.2 Creation, search and removal of Port in Amiga OS's............................................................59
5.3.3 - Amiga OS's Message Handling...........................................................................................60
5.3.4 IPC synchronous communication step-by-step.....................................................................61
5.3.5 MUIM_Application_AddInputHandler and MUIM_Application_RemInputHandler..........62
5.4 Introduction to Sub-processes..................................................................................................64
5.4.2 Asynchronous Communication, a practical example............................................................66
Chapter 6: Methodology for planning............................................................................................71
6.1 Defining a problem to solve.....................................................................................................71
6.2 Analysis and specification requirements..................................................................................72
6.2.1 Levels of requirements definition..........................................................................................73
6.2.2 Use Cases in colloquial language..........................................................................................73
6.2.3 UML and use cases................................................................................................................74
http://en.wikipedia.org/wiki/Unified_Modeling_Language...........................................................74
6.3 Design.......................................................................................................................................74
APPENDIX B: Subversion on Amiga.............................................................................................75
Plik z chomika:
Amiga2509
Inne pliki z tego folderu:
AmigaCompProg.pdf
(1377 KB)
Darkfiction2ADF.lha
(601 KB)
DarkfictionADF.lha
(620 KB)
DarkPortal1ADF.lha
(371 KB)
DarkPortal3ADF.lha
(500 KB)
Inne foldery tego chomika:
Amiga Future Everywhere
Amiga Future Exclusiv
AmiKit
Anleitungen
Audio
Zgłoś jeśli
naruszono regulamin