Freeplaytech Forum

Full Version: New Development Framework for NGPC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello there,

A few days ago, taking a look at this forum, I found here a development post where the user shicky256 invite another user to download a compatible version of T900 with modern O.S

For me was a new and awesome notice because I never listen about this version and I always try to develop something for NGPC in a virtual machine with WinXp. This is so hard and uncomfortable because has your IDE configured, software, emulator and other things needed to do it in a virtual machine, well..not is the best (for me).

So, I downloaded this new T900 version and try it on Win10 o.s and works perfectly and at that momment I have a idea, do a ngpc auto configurable development workspace.

This workspace has the next elements
  • The last knowed development framework v4.0 for NGPC made by Dark Fader / BlackThunder (If I'm not wrong)
  • The T900 binaries for the Toshiba T900 chip (by versions)
  • The EmuHawk emulator to throw the compiled games (for me, the best emulator that works perfectly without glitches in sounds and graphics)
  • The NeoTile editor
  • A UI  for wav to c tool
  • Thor NGPConverter (updated in 2016 by Thor) to convert images in .c files for NGPC.
  • project generator (A tool to do new code projects auto configured).
  • An auto compiler for your code projects to run and execute on the fly.
DOWNLOADS

[Image: ngpc-f-win-xp.png] [Image: ngpc-f-win-7810.png]
Win Xp version and Win 7, 8, 10 version

USER MANUAL

Then, this are the steps to install and use this workspace for develop games for NeoGeo Pocket & NeoGeo Pocket Color.

  1. Download your compatible version for your operative system.
  2. Unzip the .7z file on C:\ (recomended, but you can use another directoy). When you unzip it, the path looks like this: C:\ngpcbins\<sub_directories>
  3. It's time to set the environment paths. The way to do it, depend of your operative system (you can search how to edit environment paths on internet). You want to do the next with the environment paths:
    • In the "System vars" section, edit the PATH var and add a new entry with the binaries of the T900 chip instalation path, eg: C:\ngpcbins\T900\bin
    • Add a new entry in "System vars" with the path C:\ngpcbins\T900 named THOME
  4. [OPTINAL] If you want to use an IDE to add your lines code, you will be able to use any IDE, but in this case, I recomend Visual Studio Code. It's free, fast and compatible with C code language. Also has an integrated command line console that it's very useful to compile and launhc the game. We will use this after.
CREATING YOUR FIRST PROJECT

So you can see how it works, lets go to create your first proyect with the tool ngpc-f-c-project.exe in the C:\ngpcbins root path.

Execute it and you will see this window:

[Image: ngpc-f-maker.png]

You can have it on hand. This tool create a new configured Neo Geo Pocket code proyect.


In the top, you have a section called "Environment Paths" that indicate if you have the NGPC binaries installed correclty. (step 3) If you have created correctly, you will se the text paths, in other case, you will se the word No.

Just before, a notification section.

Down, the basic data of your proyect, Author name, Project name (12 characters only) and the Proyect path.

So, lest do an example:

  1. Put your name and project name (something like ngpctest or anyelse).
  2. Click on the folder button and select the destination path, something like C:\Dev\ngpc\ngpcolortest
  3. Click on Create project
This will create a configured group of files that you can use for begin your game. You will see something like this:


[Image: make-project-1.png]

You have your new directory created now. So, open your Visual Studio Code and go to File > Open Folder and select the folder that you just created. You will see all files at the left like this.

[Image: maker-vsc-01.png]

Now, select the main.c file and click with the right mouse button on it and select the Open in terminal option, displaying a command line console in the botton section of the code.

[Image: maker-vsc-02.png]

As you see, you have a terminal where you launch all windows commands like dir, move, copy, etc.

COMPILATION AND EXECUTION

Click on the terminal section and write compile.bat and press Enter or Intro

[Image: maker-vsc-03.png]

All code will be sended to the T900 compiler and display on this window if all was correct. If all is right, the game will be launched on the EmuHawk emulator. In case of error, you will se the errors on this terminal too.

[Image: maker-vsc-04.png]


AN EXAMPLE



EXTRA TOOLS

In the root path of C:\ngpcbins\ you will be able to see 4 .exe files

ngpc-f-imgconv - Maked by Thor in java. It's for convert images files to ngpc .c code that you will be able to include on your project.
ngpc-f-neotile - A simple NeoTile v0.3 launcher by Sonft'n Fuzzy 2002. It's a Tile and Sprites editor tool.
ngpc-f-wav2c - A graphic UI (user interface) to convert .wav files to .c files for your game, that you can implement with the ngpc bins SoundDriver libraries.

VERSION NOTES

v5.0
  • I called tihs version the number 5.0 because the last knowed version was the 4.0 (in 2003 more or less)
  • I want to fix some little errors on the tools, for example on ngpc-f-wav2c crash when select a different folder of the .wav file to save the .c file
  • I want to include more tools or examples to improve the user knowledge

PS: Sorry about my English.

Regards, I hope that this will be util for someone.
For the emulator, I assume that you meant BizHawk? That's what Google turned up, anyway. http://tasvideos.org/BizHawk.html

Their Neo Geo Pocket page (http://tasvideos.org/Bizhawk/NGP.html) says, "Neo-Geo Pocket emulation is done via porting the core from mednafen."

The Mednafen Neo Geo Pocket page (https://mednafen.github.io/documentation/ngp.html) says, "Mednafen's Neo Geo Pocket emulation is based off of NeoPop.
The Neo Geo Pocket (Color) emulation in Mednafen is not very accurate in terms of low-level details; BIOS is HLE'd, CPU instruction timing is totally fubared, and some CPU instructions are likely emulated incorrectly. It's sufficient to play most of the commercially released games fairly well, but if you want to do NGP© homebrew development, you're better off at looking at something like MAME."

I know that Loïc likes NeoPop for its debugger features, so using it directly could be nice for that.

I think that MAME uses the Neo Geo Pocket core from MESS. If I am correct, that core was mainly developed by jdg (Judge is a member here https://forum.freeplaytech.com/member.ph...ile&uid=72) who also did the main emulation work on RACE and MHE. I think his would be the most accurate, but his cores don't get ported like NeoPop does. This is something that should be rectified. NeoPop is very easy to port to other platforms, but it is both inaccurate and slow.

I actually didn't mean to post here to discuss emulation. I started out wondering about "EmuHawk" and then got into all that detail.

I'm super happy that you have taken the time to build out this utility and tutorial for future Neo Geo Pocket homebrew developers, KeiDash. This has been a huge problem for the development community for many years. The lack of proper tools and the barriers of entry for people have kept the new developments to a minimum. I hope this helps to rectify that!
(10-25-2018, 01:48 AM)Flavor Wrote: [ -> ]For the emulator,.............

Hi Flavor,

Thanks for your reply and personal opinion.

Talking about the configured emulator, you are right. The qualities of NeoPop are the Debug mode, something that another emulator doesn't has. Against, has the worst audio emulation. I tryed Mednafen, Race, NeoPop and BizHawk and for me the best are this last one. Run graphics and sounds correctly, in opposition, not has a debug mode.

My idea with this framework is improve it. My next step on it is add an option parameter on NeoGeo Pocket Project Maker to the user will be able change the default emulator and add another one.

I'm happy too, I think that this can help at anyone that want to do a tinny or big game for ngpc.

As SNK was saying, the future is now.

PD: I put here a video uploaded by me on YouTube. In edition mode, this is visible but when I finish and publish the post, the forum display the next:
Code:
[video=youtube]https://youtu.be/loDBw7M4_Qo[/video]
Hello, I am kentosama, I am very interested in the development of games on NeoGeo Pocket.

I am very happy to have found this forum and a recent development kit !

My goal is to create complete games on this machine that I love enormously. I would like to know if it's currently possible to do this with this development kit.

I am more familiar with Mega Drive thanks to excellent SGDK by Stephane Dallongeville, but I am very motivated to master the NeoGeo Pocket and provide many quality games.

Can we expect updates in the future?

Thank you very much for making the development possible on this console.
Hello kentosama - welcome to the forum and welcome to NGPC development.

I haven't experimented with keidash's tools yet, but broadly, yes, everything you need to create fully functioning games is in there. Post here with any specific queries and I'm sure we'll be able to get you running.

There are a few of us tinkering with the C Framework, but (personally) I do this on a project by project basis so not sure whether there will ever be a specific v5. You never know though.
(05-21-2019, 01:20 AM)kentosama Wrote: [ -> ]Hello, I am kentosama, I am very interested in the development of games on NeoGeo Pocket.

I am very happy to have found this forum and a recent development kit !

My goal is to create complete games on this machine that I love enormously. I would like to know if it's currently possible to do this with this development kit.

I am more familiar with Mega Drive thanks to excellent SGDK by Stephane Dallongeville,  but I am very motivated to master the NeoGeo Pocket and provide many quality games.

Can we expect updates in the future?

Thank you very much for making the development possible on this console.

Hi Kentosama. 

Yes, will be updates sure. I'm working in something more strong with the same base.

You will be able to do all as you want but this "framework" (between quotation marks) it's a tool that complain another tools made by me and other scene users. 

This tool it's only a helper for begin and convert some files for your game. All code and game logic must be implemented by you.

My idea it's make a dev plattform with this utilities and some extra like docs or examples, but this never will be something like rpgmaker or unity...
Hello! I'm trying to get into NGPC dev and this is a great resource.

However, I seem to be having trouble getting roms made with this framework to work on real hardware via neo flash masta. First I had to fill in empty space with 0xFF till the ROM was 16MiB to get NeoLinkMasta to flash the file without crashing, and even then I can't seem to get the ROM to actually boot on a real machine. (regular roms work fine).

Any tips/experience with getting homebrew made this way working on hardware?

EDIT: for starters I'm just using the simple 'hello world' included in OP.
(08-11-2019, 12:15 AM)Nnnn Wrote: [ -> ]Hello! I'm trying to get into NGPC dev and this is a great resource.

However, I seem to be having trouble getting roms made with this framework to work on real hardware via neo flash masta. First I had to fill in empty space with 0xFF till the ROM was 16MiB to get NeoLinkMasta to flash the file without crashing, and even then I can't seem to get the ROM to actually boot on a real machine. (regular roms work fine).

Any tips/experience with getting homebrew made this way working on hardware?

EDIT: for starters I'm just using the simple 'hello world' included in OP.

Hi,

for the flashmasta part, your rom size must be either 4, 8, 16 or 32 Mbits.
Did you used KeiDash framework ? did you tried to compile some of the given examples then to flash them ?
One possible issue is that the watchdog timer isn't reset in the VBLank function, but he framework should take care of this part.

If you can't manage to find the issue, maybe you should post your sources here.

Loïc
Thanks for the reply Loïc!

Good to know that you can use any of those file sizes! I assumed it was set at 16/32.

I did use KeiDash framework. I tried flashing the precompiled ngp files in the Examples folder, and some of them did work without issue. Others just booted to BIOS. I tried to compile some of them, but looking at the makefiles it seems many of them require java...? So I also tried downloading ngcollector, and was able to compile this one and get it running in an emulator. However, after flashing to a real machine, it would boot to a blank white screen. (the hello world included in OP also goes to BIOS, no white screen.)

As for the source, I am just using the helloworld from OP.

Sorry for the trouble, but thank you for your help.
Apologies for the double post, but after searching for source code + build that works on hardware, I got it working so I thought I'd share my results.

(I used shicky256's krezrobo as an example -- the source both builds effortlessly and there's a download of the ROM that works with flashmasta. Thanks!!)

The solution was simpler than I expected -- the framework works fine, but when filling up the ROM with empty space, bytes of 0xFF (like I see on most official SNK roms, and what people said to use elsewhere?) seemed to boot to BIOS, but bytes of 0x00 let the game boot properly.

Not sure if this would lead to errors with other methods of flashing the ROM than neo flash masta, but this seems to work for now.
Pages: 1 2