GBA program development 1

zhaozj2021-02-08  227

GBA program development

Introduction to GBA

Game Boy Advanced (GBA) is a 32-bit game console launched in Japan in 2001. It focuses on the portable game of the game, and is mainly 2D game (3D game is still good) .GBA has very high efficiency and hardware image Processing acceleration, GBA is basically a world-recognized best handheld game console.

GBA's hardware features. Its CPU is a 32-bit ARM CPU based on RISC. The main frequency is 16.78MHz. The screen has a maximum of 240x160 16-bit true color display. GBA in graphics also provides hardware acceleration, Support graphical rotation, zoom, alpha mix, Face In / Out fade out.

The software development of GBA is mainly based on C language, and the program is simple and very free. It is also this to attract many enthusiasts to do things on GBA (not necessarily a game). You can make it a PDA, Be a MP3 player (its sound processing skills are good), making a movie playing, making an electronic dictionary, etc., as long as you have the ability to design its software.

For example, Azhong's homepage http://huangyz2002abcd.nease.net/ There is a WordBoy dictionary software he wrote. There is a Music Player GBA music player that allows GBA transformation MP3 player .VideoGBA, you can convert images into GBA film tool. But it is a bit difficult to do it. It provides a piece of one that has been done, << Hacker Empire >> Download: http://213.30.21.181/web/down/show.asp? ID = 40 & down = 1

On http://readboy.nese.net/, you can also find ReadBoy, GBA's reading software, this software is very good, in addition to reading, or even browsing the picture.

Not to mention, we still look at how to develop GBA software. It should be said that you can enter the GBA development ranks in the CA. Write programs easier to write on the computer. .GBA is a single-bus design, that is, all internal hardware operations can be completed by simple read and write commands. The registers accessing the GBA are just as simple as accessing a memory, while all the features of GBA are through the read and write registers. Completed.

2. GBA program development preparation

The things you need for GBA development are mainly a compiler and a GBA simulator except for a computer.

With GBA simulator, you can run the GBA program on your computer .GBA simulator should be found everywhere. I recommend VisualBoyAdvance. You can download the latest version on www.gbadev.org. If you still want to play your program on the GBA machine, then there should be a ROM flash. For example, EZ-FLASH. With it to burn the ROM on your computer to GBA card belt On, then put it on the GBA. (A total of a GBA plus a 128MB EZ-Flash is about 1,000 yuan)

The GBA program development can be written in assembly language and C / C language, but the assembly language is more complicated, and it is not our usual use of 8086 compilation, but ARM compilation. Nintendo company may think that C program is too large, not recommended C language To develop, we all always as the first choice.

There are two main types of C language compilers used in GBA development, one is a free GCC, one is ARMSDT provided by ARM.

The GCC here is certainly not a simple Linux GCC, but ARM GCC. Simply, the GCC we usually transform the GCC generated by the ARM CPU code. Do you want to use the Linux operating system? In fact, we still do GBA development under Windows, although GCC is mainly in Linux, but we can also get GCC running under Windows from Cygwin (tools to simulate UNIX under Windows). You can under this Cygwin GCC, go to the ARM GCC yourself, you can also download a configured ARM GCC. For example, Devkitadv, you can go to http://www.gbadev.org to download this software. Devkitadv approximately more than 10 MB. Have It doesn't need to find any Cygwin (200-300MB) and configure what ARM GCC, Devkitadv has helped you do everything, you just need to install it. OK.

ARMSDT is a C language compiler that ARM is specially provided for ARM CPU development program. As mentioned earlier, GBA is a 32-bit ARM CPU, so this ARMSDT can be used to develop GBA programs. And because ARMSDT is ARM The official development kit, so its compilation speed and quality are high than the free GCC, but the support for C language is not good for GCC (GCC has become a C language compiler standard), the most critical problem Not free, but its free beta is still available. You can download Armsdt2.51 to ARM's website. Http://www.arm.com I also explain GBA program with GCC configured with Devkitadv. Development.

After installing Devkitadv, after extracting the download file with Winzip or WinRAR software, double-click DKA_SETUP.EXE, appear below, select the installation directory, then click "Install" to install it. The whole devkitadv is 49MB, it should be very small .

After the compiler and the simulator are installed, we need a group of small tools, mainly to help us convert images, sounds and other data. After compiling, you are usually a ROM file, image and sound and other data are included in the Lord. In the program. These tools can convert pictures or sound files on our computer into a * .h header file, and then construct in the main program. About this conversion tool is also a lot, I recommend the graphical conversion tool is KaleID_1 -2-3, upload it on http://www.gbadev.org, it can convert the BMP file us usually used. The sound conversion tool is Wav2gbac.exe, it is also available at http://www.gbadev.org, it You can convert the WAV files we usually use.

Ok, after downloading these two gadgets, prepare for work.

转载请注明原文地址:https://www.9cbs.com/read-3200.html

New Post(0)