Page 1 of 1

BeverlyHills6502 - Development tools

Posted: Fri Mar 22, 2019 6:18 pm
by hjalmar
Whats good my dudes!

Creating a nes project has been on my mind for about 10 years and was a bit suprised when I was already registered here since 2013.
So im on day 3 of my development journey in trying to understand the system. Now I've been doing mostly webdevelopment for 15 - 20 years so nothing on the lower level really so I already feel my brain turn in to mush :mrgreen:

Since I'm a webdevloper my weapon of choice is html, css and javascript, node and bundle it all to an electron app.

day1-2
ca65 build file
Project skeleton set up.
Open and save projectfile.
Create, import, export, save colorpalettes.
Basic sprite tool

day3 - today
Trying to understand CHR files so i can parse and draw it with my own sprite tool. The sparse information I found was this https://simple.wikipedia.org/wiki/Chr.
I'm reading the file and getting uint8(0-255) values. Not sure if thats even right tho. :lol:

I find it easier to grasp things by doing the tools myself. Like if I would download and use someone else CHR tool i'd probably not care to much about how it actually works. Same with the palettes, which was pretty easy to implement and export.

The end goal right now isn't a full fledged game engine, but hopefully i can create enough tools for me to learn and eventually speed up any development process and come to a point where i actually manage to create an engine.

I always develop in silence and tend to lose motivation(I mean it's about ten years since I first wanted to create a game :P ) so i'm trying something new and putting my journey out there and have something to reflect and see progress on.

Anyways some screens and a small video of the progress so far.

Not sure whats prefered. External or upload directly to the forum?
https://drive.google.com/drive/folders/ ... FsRzCydboR

Re: BeverlyHills6502 - Development tools

Posted: Sat Mar 23, 2019 2:30 pm
by dougeff
Have you figured out the CHR format?

It's 2 bits per pixel, but each bit comes from a completely different byte.

tile #0 uses bytes 0-15 of a CHR file, but bytes 0-7 hold all the low bits, and bytes 8-15 hold all the upper bits. Then those bits are combined to determine which color each pixel uses.

https://wiki.nesdev.com/w/index.php/PPU_pattern_tables

Re: BeverlyHills6502 - Development tools

Posted: Sat Mar 23, 2019 7:16 pm
by hjalmar
dougeff wrote:Have you figured out the CHR format?

It's 2 bits per pixel, but each bit comes from a completely different byte.

tile #0 uses bytes 0-15 of a CHR file, but bytes 0-7 hold all the low bits, and bytes 8-15 hold all the upper bits. Then those bits are combined to determine which color each pixel uses.

https://wiki.nesdev.com/w/index.php/PPU_pattern_tables
Hey, thanks alot man.
Honestly i actually thought ppu pattern tables refered to something else. :| But i think i get it now, with the help you provided. :beer:

Re: BeverlyHills6502 - Development tools

Posted: Sun Mar 24, 2019 6:50 am
by hjalmar
dougeff wrote:Have you figured out the CHR format?

It's 2 bits per pixel, but each bit comes from a completely different byte.

tile #0 uses bytes 0-15 of a CHR file, but bytes 0-7 hold all the low bits, and bytes 8-15 hold all the upper bits. Then those bits are combined to determine which color each pixel uses.

https://wiki.nesdev.com/w/index.php/PPU_pattern_tables
I probably wasted 2h before i realized that combining != adding them together. :|

If anyone else has trouble understanding it.
If the low bit is 1 the value is 1. if the high bit is 1 it's 2. and lastly if they are both one it's 3. Giving you a color code from 0-3. So you don't actually add low + high bit together to get the result.

Re: BeverlyHills6502 - Development tools

Posted: Mon Mar 25, 2019 9:42 pm
by Erockbrox
I'm assuming that you are wanting to code the game from scratch?

You could always try NESmaker an another option.

Also I've been wanting to have a website for years, but don't understand how it all works. I might drop you a PM if you don't mind me asking some basic questions on how to get a webpage up.

Thanks and looks like a cool project that you are working on.

Re: BeverlyHills6502 - Development tools

Posted: Mon Mar 25, 2019 11:43 pm
by hjalmar
Instead of bumping my own thread all the time i just put some small clips on my drive if anyone follows the process. Sort it by date and you can see the progress.
Erockbrox wrote:I'm assuming that you are wanting to code the game from scratch?

You could always try NESmaker an another option.

Also I've been wanting to have a website for years, but don't understand how it all works. I might drop you a PM if you don't mind me asking some basic questions on how to get a webpage up.

Thanks and looks like a cool project that you are working on.
Yes i am going to do my own, and the tools to help me do it, from scratch. :)

They seem like fun characters and cool stuff what they are doing, but their software is not for me.

I don't mind at all. Also available on discord(mainly) and slack. But you can pm me first.

Re: BeverlyHills6502 - Development tools

Posted: Wed Jul 22, 2020 10:14 am
by hjalmar
Man oh man! I had to shelf this project for a year. But I'm now back and I have been able to put in a lot of work these past 2 months.

As I picket up the project again I instantly swapped from my custom frontend framework to somehthing open source since I have no ambition
continue on with that and it's also a waste of time for this project.

Also the system got totally action based. So anything it does is done via actions. And in turn these actions executes the task which
mean that anything and everything can have keyboard shortcuts. These shortcuts is also both global or whats currently active so that
different sections can have same shortcut but perform different taks. For instance 'Shift + N' can create a blank spritesheet while
on the palettes section it creates a blank palette.

The pixel editor is what has gotten the most love latly. There are some key features still yet to be implemented, like marquee selection tool,
tile rotation(for each 8x8 tile, not sure about rotating marquee selection), and most importantly the preview window which will preview an area with the option to have it repeating on the x,y or both axis.

I was thinking of only implementing an 'attributes table' tool on the tilmaps but the more im using the application the more I feel it needs to
be implemented on the spritesheets layer as well. The spritesheets only acts like layers and will be compiled/merged down with only
the used tiles upon build so the limits are not because of what the NES supports. But visually seeing how it will look I think I want to be there.

Some of these features requires the 'selected tool options bar'(area above the main view. where different tools have different options, like other graphics applications) to be implemented and refactored some before fully being able to work as intended.

With the tools currently available it's starting to feel usable. Now, having 6 ways to zoom the canvas might seem overkill but things should just work and feel intuitive even if you utilize shortcuts or simply prefer clicking the ui. :D

check out some of the new feature in this link
https://drive.google.com/file/d/1ArcC01 ... sp=sharing