Hey all I am writing a book for the Prizm. This is to learn C through a Prizm perspective. Here is the chapters so far.
Chapter 1: Setting up the SDK
-Explains what files you need and where you will get them
-I am having them download notepad++

Chapter 2: Hello World!
-Making your first add-in to familiarize yourself with the compiling process
-Explains very basic C code

I have these two planned out, and I need suggestions to what should come next, I don't want to go to fast. Any suggestions?

Edit by Merth: Removed [How To] from subject, since this isn't a how to. Moved to Your Projects section.
Let's see, I think a good way to do the next section, is to explain some common things in prizm, like text output, colors, etc. You can do a lot with putting characters on the screen, and having certain colors. I would then go over stuff like Getkey. That way, they can make at least a minimal game.

After that, I would have the book be a "dive in where you want" type thing, including topics such as file access, memory management, data structures, etc.

Don't assume they know nothing about programming, but don't assume they know too much. I can skip over sections that talk about what certain lines of code do usually, because I can usually understand it from the code itself, but I don't assume everyone can.
I was thinking of writing something like this at one point, so I'd be more than happy to contribute some chapters/sections, and look over it.
I would buy the book or at least download it
krazylegodrummer56 wrote:
I would buy the book or at least download it


Hmm, wait, is it actually intended to be a commercial book like that? If so, g'luck getting a publisher; that's going to be a very niche audience. The reason Kerm is able to get a publisher (and a decent one at that) is because the 84+ is well documented, and because it's for a very used language for it (TI-BASIC). C for the Prizm is still very hacky of a procedure, we don't even have a full standard library yet. I would suggest you start from the beginning with the expectation that it's going to be more of an "online, lengthy tutorial" than a paperback.
Ashbad wrote:
krazylegodrummer56 wrote:
I would buy the book or at least download it


Hmm, wait, is it actually intended to be a commercial book like that? If so, g'luck getting a publisher; that's going to be a very niche audience. The reason Kerm is able to get a publisher (and a decent one at that) is because the 84+ is well documented, and because it's for a very used language for it (TI-BASIC). C for the Prizm is still very hacky of a procedure, we don't even have a full standard library yet. I would suggest you start from the beginning with the expectation that it's going to be more of an "online, lengthy tutorial" than a paperback.

Hence the "at least download it" bit. because I know it will start off like info on how to program the TI-83/+/+SE and TI-84+/SE.
No..no..no. I intended it to be open to all Prizm coders and all who want to read it. I don't want to charge people.It will be an online tutorial.
zeldaking wrote:
No..no..no. I intended it to be open to all Prizm coders and all who want to read it. I don't want to charge people.It will be an online tutorial.


Okay, that makes a lot more sense to me. In which case, if you want my help, perhaps we should host the book on Google Documents and work on it there, sharing the link to the actual content?
Ashbad that would be great!! I would certainly accept your help. Just tell me (pm?) your email, and we can get started.
zeldaking wrote:
Ashbad that would be great!! I would certainly accept your help. Just tell me (pm?) your email, and we can get started.


Sure thing, just threw a PM with it at you. As for some ideas, I would consider popularizing Souvik's PrizmSDK GUI interface, since it now simplifies setting things up and creating projects. Will will definitely still need to explain how the old and new build chains work, and how to work with both Makefiles. In addition, we can go over mkg3a's input, possible errors you'll run into if you don't configure something correctly, etc. As for some more Chapter ideas:

Delving into some simple libfxcg routines
- Simple graphics like Bdisp_PutDisp_DD, Bdisp_PutDisp_DD_Stripe, Bdisp_AllCr_VRAM, DrawFrame, etc.
- Timing functions
- Key functions
- Memory manipulation
- Other misc. ones like PrintXY/Locate_OS

Interaction with the user
- Key functions
* GetKey
* PRGM_GetKey
* keydown
* debouncing and psuedo key-events

Working with Files
- Talk about how files work
- Bfile functions
- Main Memory file functions

Useful Routines
- Graphics
- Input
- Math
- Routines that wrap over the OS routines and make them easier to use

Working In Real Time
- Basically go in depth over how the Real Time Clock and internal timers work (using the registers AHelper documented)

Low Level Workings
- general specs of the Prizm's OS setup and resources
- explain ports (this will be a constant work in progress)
- Assembly-side of things (how syscalls work, what C code translates to on the Prizm's SH processor, quirks like the non-functional FPU)

Introduction to SuperH assembly
- very basic overview about how to use assembly with C, both inline and in separate *.s files and how to link them to your source
- explanation of the different registers, memory spaces, etc.


Just a few ideas, nothing is set in stone at this point.
I really like how you broke that into sections. Each sub-section will be a chapter(s), correct?
zeldaking wrote:
I really like how you broke that into sections. Each sub-section will be a chapter(s), correct?


Potentially, yes, unless we figure out another format. Any other ideas?
Hmmm, I always liked learning actual game examples. Also I was thinking: we could include something that teaches the 'correct' image format (meaning the unselected and selected) along those lines. Another thing, it seems by your outline that your assuming that the readers know C already. Which they should. Are we going to write this as if they haven't a clue about C, or that they know it? I would say they already know, since there are plenty of really good tutorials out there.
Indeed, in the preface we should point them to cprogramming.com's tutorial set, since writing a C from scratch tutorial is painful and will turn off people who already know it. The correct image format we should definitely teach, using JosJuice's guidelines. And finally, for a game example, I actually wrote a game for the Prizm for exactly that purpose, that's commented to the max: http://cemetech.net/programs/index.php?mode=file&id=701 I was planning on using it in the tutorial I was going to write; I suggest we use it in this set of tutorials.
This was Pong right, I agree that would be great.
Here's a general layout that zeldaking and I just finished drafting for the set of tutorials. We both implore everyone here to add suggestions to the layout, comments, and clarifications. We have the tutorial hosted on Google Documents only shared between us at the moment, but we can always open that up if someone wants to help out.

Lesson Layout

Section 1: Introduction
- Resources for learning the basics of C
- Setting up the SDK

Section 2: Basics
- Icon Design Guidelines
- Hello world -- familiarizing yourself with the compiling process
- General layout of a C program for the Prizm

Section 3: Simple libfxcg Routines
- Simple graphics
- Timing fuctions
- Memory manipulation

Section 4: User interaction/Input
- Basic user input
- Advanced

Section 5: File Management
- Working with file functions
- Main memory
- Storage memory and the main filesystem

Section 6: Useful Routines Reference and Documentation
- Graphical
- Input and Interactive
- Mathematical
- Overwrapped OS routines

Section 7: Your First Game
- Tying it all together
- Useful tools and design considerations
- Ping, Pong, code along
- Dashing through game development

Section 8: Low Level Workings
- The Prizm OS at a lower level
- Interfacing with the hardware directly
- Working in Real Time


Section 9: Intro to SuperH assembly
- Basic overview
- C to Assembly translation
- Inline Assembly in GCC
- Linking separate Assembly files
You have File Management before Your First Game? I question that ordering, but other than that, the outline looks good to me.
KermMartian wrote:
You have File Management before Your First Game? I question that ordering, but other than that, the outline looks good to me.


That's a good point you bring across. I'm still thinking of keeping it before the game examples, but after the useful routines. The Bfile operations seem difficult to use at first, but they're honestly quite easy to use once you read some proper documentation (as I assume you have found).
I actually think File Management should go after Your First Game, I question if you'll need files with a simple game (pong doesn't). Other than that it seems good.
zeldaking wrote:
I actually think File Management should go after Your First Game, I question if you'll need files with a simple game (pong doesn't). Other than that it seems good.


That's a good point as well; the only real use of files in simple games is highscores, which the Rainbow Dash Attack example will have. Perhaps I should just go over the highscores element of Rainbow Dash Attack in that chapter though, and ignore it in the earlier one.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 3
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement