User:Ahelper

From WikiPrizm
Jump to navigationJump to search

I am AHelper, and I am a function, tutorial, or something, please do panic.

In-Development Pages

I am in the process of creating pages as I conduct research. These pages are not complete and have raw research dumped into them, and therefore should not be updated by others. Here is a list of my in-dev pages:

C++

Add-in code can be created using C++ as well as C. C add-ins don't have many issues when compiling generic code, however g++ expects many built-in functions and variables that aren't available in a library. This article is meant to help solve linking errors that come up when compiling C++ code.

Undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info'

This is caused by g++ wanting to RTTI. This feature isn't supported as the dependencies are missing. To fix this, add

-fno-rtti

to your compiler flags.

Prizm CPG

The CPG uses the 32KHz oscillator in the RTC unit (the same one that run the 64 HZ counter) as the FLL input. The CPG is able to get input from an external source as well, but there is no hardware attached. The FLL is the base multiplier and divider. The frequency output by the FLL (max is ~40MHz iirc) is sent to the PLL. The PLL then multiplies the frequency, controlled by FRQCR1. That frequency is then sent out to the many divider circuits in the CPG for each individual hardware group. FRQCR1 and FRQCR2 control the divider values. These dividers must be in set in proper ratios or else the hardware will fall out of sync and fail.

The CPU has a max operating frequency of 500MHz. The max tested freq. that didn't cause hardware failure was 470MHz.

These values were provided by Renesas and calculated using the CPG circuit multiplier and dividers. Actual magnitude in speed change will be less due to the peripheral divider being very low (1/16 of the CPU speed iirc. This is the fastest speed to satisfy ratio requirements).

Using the PrizmSDK

The Include Folder

This folder contains required headers for C/C++ programs. It is known that the headers are a bit chaotic and a rebuild of the headers is being done.

The Common Folder

The common folder is home of two files, prizm.ld and prizm_rules. prizm.ld is a file that is used by the linker when compiling to provide information about the prizm, how data and ram is laid out, and where to put stuff. prizm_rules is a Makefile that is included by Makefiles in the project folder. This file defines common settings and is needed for building.

The Project Folder

This folder is set up to simplify storing and building your Prizm projects.

Makefiles

If you do not know what these are, please read the GNU Make page. The Makefiles used in each subproject are pre-made and require little modification. The file's purpose is simply to build all source files under src/ and make a .g3a.

mkg3a and g3a's

mkg3a is a utility to convert a binary, along with the selected and deselected icons, into a .g3a, executable on the Prizm.