I first released this over a year ago, but never got around to making a thread for it. So, here it is!

CE-NICCC is a port of the Oxygene ST-NICCC 2000 3D polygon demo to the TI-84 Plus CE.

You can download it here: https://www.cemetech.net/downloads/files/2389/x3122

The latest version adds a half-resolution, filled-polygon variant of the program that offers greatly improved performance compared to the previous filled-polygon variant. Currently, there are three variants of the program:
- CENICCC has filled polygons at full resolution. This is the slowest variant, but is closest to the original demo.
- CENICCCH has filled polygons at half resolution and uses the calculator's 4 bits-per-pixel (16-color) mode to greatly improve performance compared to the full-resolution variant.
- CENICCCW has wireframe graphics. This is the fastest variant.

Please feel free to share your comments and feedback!


I remember downloading this when it first came out and being very impressed!
This is really awesome stuff!

Even at full res the speed is still very impressive Smile
I did some experimenting with ZERICO2005's excellent PortCE toolkit (https://cemetech.net/forum/viewtopic.php?p=307420) and was able to port CE-NICCC to run on my Mac with minimal changes.



I probably won't release this port, but I figured that I would make a guide on how I ported it for others who might be interested in porting their own C programs.

For the purposes of this guide, I am assuming that you:
* are on either macOS or Linux
* are using git for source control
* have a working C compiler and CE C toolchain
* have cmake installed (on macOS, install with Homebrew using brew install cmake)
* and have some basic familiarity with the terminal.

0. Read the PortCE README (https://github.com/ZERICO2005/PortCE/blob/master/README.md) to understand what is available and whether your program is eligible.

1. Add PortCE as a git submodule: git submodule add https://github.com/ZERICO2005/PortCE/

This lets you pull updates to PortCE directly from its repository, since PortCE is a work in progress and changes are constantly being made (as of writing this, the last commit was two weeks ago).

2. Make sure all submodules are up to date: git submodule update --init

3. Make a symlink as follows. In the root directory of your repository (*not* in src/), execute this: ln -s ./PortCE/src_PortCE/ src_PortCE

This makes a shortcut pointing to the src_PortCE directory in the submodule. To the compiler, this does the same thing as copying the src_PortCE directory to the root of your repository, while allowing you to track and update it using git. Note that creating a regular shortcut (or alias on macOS) will not work; you must create a symlink using the ln command.

4. Copy (don't symlink) the CMakeLists.txt and PortCE.config files from the PortCE repository to the root of yours. Edit the CMakeLists.txt for your project (namely, change the project name to match what you want the output executable to be named).

5. Follow the PortCE README instructions (https://github.com/ZERICO2005/PortCE/blob/master/README.md) to modify your source code to add the appropriate PortCE functions.

Quote:

Aside: macOS specific build stuff

You'll need to make sure that you have the SDL2 and SDL2_mixer libraries installed. You can do that using Homebrew (https://brew.sh) by running brew install SDL2 SDL2_mixer . (Run brew search sdl2 to see the complete list of SDL2 libraries.)

Then, make sure the compiler can link against the libraries by adding the following line to the end of your .bash_profile or .zshrc (for bash or zsh, respectively, or to the corresponding dotfile for your shell of choice):

export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"

Finally, add this line to your CMakeLists.txt after the "find_package(SDL2 REQUIRED)" line to make sure the compiler can see the SDL2 headers:

include_directories(${PROJECT_NAME} ${SDL2_INCLUDE_DIRS})



6. To build and run your program, follow PortCE's instructions. I found it convenient to put them into a shell script so I could run one command to do everything. Note that I have made it so that it deletes the build directory every time for a fresh build; if you are on lower powered hardware, you might want to remove this part.

I called this file portce-make.sh and made it executable with chmod +x ./portce-make.sh . It should be in the root of your repository. Then, you can run it simply by calling ./portce-make.sh .


Code:
#!/usr/bin/env bash

# Delete build directory if it already exists.
rm -rf $(dirname $0)/build

# Make a new build directory.
mkdir -p $(dirname $0)/build

# Go into the build directory and create required files for cmake and ninja.
cd $(dirname $0)/build
cmake -G Ninja ..

# Do It
ninja


7. Make updates to your code as needed. In my case, I found that there were a couple quirks that I had to work around before my program could run properly. Since PortCE is a work in progress, these can change at any time. It's best to verify yourself before implementing a workaround.

1. os_GetCSC() seems to always return a non-zero value, even when no key is pressed
2. gfx_FloodFill is not implemented yet
3. ti_Read will sometimes return an incorrect number of bytes read after seeking to the end of an appvar

8. To make the build/run cycle easier, I made a second script (that I called run-portce.sh) which calls my make script and then runs the compiled program. My program uses appvars, so I have it cd into that directory first so the program can find the files. You'll need to remove that part and edit the relative paths if your program doesn't do this.


Code:
#!/usr/bin/env bash

# cd into appvar directory so the program can find the appvars.
cd $(dirname $0)/appvar

# make
../portce-make.sh

# run
../build/bin/ce-niccc

# done
cd $(dirname $0)


Feel free to share any feedback on this guide. Also, major kudos to zerico2005 for their work on PortCE!
For some reason, I watched the wire-frame one all the way through, and when it ended, my calc showed a blue screen and none of the buttons do anything. can someone please help?
HemeGlych wrote:
For some reason, I watched the wire-frame one all the way through, and when it ended, my calc showed a blue screen and none of the buttons do anything. can someone please help?


Have you tried resetting your calculator? Use a pencil or pen to push the reset button on the back. That should get it back to a working state.

Once you've done that, make sure that you have transferred all the provided appvars to the calculator. There are ten in total, starting with scene1.8xv and ending with scene1i.8xv. Make sure that you transfer them to the Archive, not the RAM.

Also, check to make sure you have the latest version of the CE C libraries installed. You can get them at https://github.com/CE-Programming/libraries/releases/latest; download clibs.8xg from that page and transfer it to your calculator.

Additionally, could you tell me what OS version your calculator is running? You can check that by pressing [2nd] [+] [1] from the home screen. The OS version will be listed on the second line under "TI-84 Plus CE."
  
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 1
» 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