PokeMini Development Package

PM development, programming, hacking and all that fun stuff.
Post Reply
JustBurn
Team Pokémé
Posts: 90
Joined: April 14th, 2011, 19:07

PokeMini Development Package

Post by JustBurn » May 21st, 2012, 04:25

Most of the delay of the PokeMini 0.5.2 release was due to the time spent to organize better libs, tools and a nice & functional package for developing into the Pokémon-Mini.

Everything still is a release-candidate since it may contain bugs but everyone is free to try it out and give they own opinion... and have some fun!

The best way to get started is just to open the examples... using a template to start your own ROM is also a good idea.

For linux users there's a nice gedit lang & theme under "gedit_lang" directory.
For windows users there's Programmer's Notepad under "pn" directory which is already setup to give a nice syntax highlight and a list of externals commands, I've actually used this IDE to program all the examples.

There's 3 groups of code:
Legacy - Old version of the libs, supported by older PMAS and emulator
Normal - Regular code without anything fancy, it needs PMAS 0.20 because of a few new directives needed by pm_init.s
CStyle - Experimental layer to give a little of high level feel, includes a set of standard functions and libraries, requires PMAS+ 0.20 for some magic

Included in the package:
PokeMini 0.5.2 RC1, Image Converter 1.1 and Music Converter 1.1 are included.
PMAS+ is also included, it's PMAS with customizable multipass support and tons of new directives required by the cstyle layer.
Modified PokeFlash v1.1 included, the mod does not wait for keypresses which is bad for Programmer's Notepad stdout capture, it requires Lupin FlashCard Rev 2 and drivers, Linux executable untested.
pm_cstyle and co. which is the main purpose of this package.
PokeMini 0.5.2 RC1 documentation that includes all the information you'll need.

Available examples:
LNC = Available in all groups, NC = No legacy, C = Only for cstyle libs
template -LNC- If you have to start your own project, use this as your base!
framebuffer -LNC- Teach about VRAM access and LCD contrast manipulation
sound_tst -LNC- Teach about PMMusic mainly, the rest of the source is a little messy
bouncing -NC- Teach about grayscaling graphics, background, sprites and some very basic physics, make sure to learn about fixed-point arithmetic first!
mapview -NC- Teach mainly about scrolling large maps, it uses fixed-point for camera position
infodebug -C- Teach how to output text on emulator and screen and provide some arithmetic results
timers -C- Teach how to work with timers and how to measure how long a certain block of code takes to execute in cycles

If there's any problem or suggestion please tell me before going into an official release.

Edit: Too late now, RC1 files are now removed and files were released as "as-is"...

JustBurn
Team Pokémé
Posts: 90
Joined: April 14th, 2011, 19:07

Re: PokeMini Development Package

Post by JustBurn » June 3rd, 2012, 18:09

This is the PMAS+ features taken from the patch
Note that pm_init already take care to setup the all the .option

-----------
PMAS patch:

Case insensitive macros names
Case insensitive symbols names
Temporary unnamed labels

New directives:
.macroicase - for case insensitive macros names
.equicase / .seticase / .defineicase - for case insensitive symbols names
.ram - for defining RAM space
.ifstring / .ifnstring - to detect if symbol is a string
.option ram_base - to setup RAM base
.option symoutput - to set type of symbols list output
.localprefix - force prefix out of macros
.error - Print error
.warning - Print warning

New reserved symbols:
__FILE__ - Current source file (String)
__LINE__ - Current line (Integer)
__RAMBASE__ - Current RAM base (Integer)
___PMAS___ - Current PMAS version (Integer)

------------
PMAS+ patch:

New directive:
.option multipass - override number of extra passes

New reserved symbols:
__PMASP__ - Current PMAS+ version (Integer)

Poke-dro
Posts: 24
Joined: March 13th, 2011, 00:22

Re: PokeMini Development Package

Post by Poke-dro » June 10th, 2012, 20:16

Cool! I've been toying with the idea of coding something simple for the PM but I'm totally intimidated as I've only ever written code in 8 bit BASIC about 20 years ago!

Hopefully, this'll ease me in a little into the ways of modern coding (I thought an IDE was a hard drive connection :P).

Thank you for your dedication to this lovely wee system. :)

JustBurn
Team Pokémé
Posts: 90
Joined: April 14th, 2011, 19:07

Re: PokeMini Development Package

Post by JustBurn » June 11th, 2012, 06:29

Heh, starting from PM might be a little challenging... 8-bits architecture, slow CPU, very limited registers set, non-orthogonal instruction set...
On a good side it can do quite some 16-bits operations and it has hardware multiplication/division! sadly only 8-bits MUL/DIV but better than nothing!

I'll recommend to start by learning arithmetic & bitwise operations firsts, it can be a complex subject but you'll have troubles to do something complex without them... Learn the basics such as using binary shifts to do multiplications/divisions by power of 2, even in High-level language that knowledge can still be very useful.

IDE is actually PATA controller for HDD (Integrated Drive Electronics), but in software development it means Integrated Development Environment :P

If you have any question regarding about PM development feel free to ask in the forum ... or in our IRC channel, i'm usually around there.

Poke-dro
Posts: 24
Joined: March 13th, 2011, 00:22

Re: PokeMini Development Package

Post by Poke-dro » June 11th, 2012, 15:23

Thanks very much for the informative reply. I think I'll mess around with some other high level language to begin with just to, as you suggest, get the basics under my belt.

I'm thinking of going for something like Pascal as I have a vague understanding of it's syntax and it's a little less procedural than BASIC which might help me get to grips with a slightly more lateral way of coding.

Also, thanks for the offer of help. I'll no doubt get stuck learning this stuff so it's nice to know that someone is there who knows what they're talking about! :)

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: PokeMini Development Package

Post by zoranc » June 12th, 2012, 10:53

If you want higher level language take look at C. There is a limited feature port for this architecture. It might have some bugs too but I'm here to help in any case.

Post Reply