New 32x game in development!

Importante releases or news for the communauty

Moderator: KanedaFr

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Mon Mar 06, 2023 5:08 am

Update:

Been out for business past few days or so, but i have a minor update. After getting the Tiled map loadable within the editor I switched back to my export functionality. I currently have that halfway completed! Then ill switch back to looking at how to best organize all the functionality. For example, only load the map when editing map objects

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Mon Mar 13, 2023 4:34 am

Im still alive everyone. This past week work has had me extra busy so new true progress to report. Just a little more on my export functionality. It’s nearly done. Just cleaning up some bugs in it now. Nothing too exciting to show and tell yet :/

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Sun Mar 19, 2023 4:02 am

Update:

Smaller today, but MIGHTY. My exporter works! I had to chase down all the bugs, but now I can create and edit my game editor json file and then click a simple export button and it produces my gameworld.h file. I was able to load it up just fine within my game. I'm going to add a few more elements to the export. Such as my splash screen and title screen elements. Then I'm going to focus on making the UI look and function a little better.

For example, when I add a new sprite to a map. I want that sprite drawn in my editor and then i use the mouse to drag and drop it into the location I want for it's starting position (which will obviously reflect it's x and y location within the json file). I'll also adjust my tile map loading function to also load up any npc with their starting location as draggable picboxes to manipulate as well.

As of right now, I think the workflow and options will look like this

1) Launch game editor (file menu only)
2) Open or create new file option
3) If Open
3.a) Fill out tree of game assets and current world structure.
3.b) Context menu options to create/delete/ and (place in world) assets.
3.c) Context menu option on current world tree would be (remove asset).
3.d) Only draw map in editor when selecting map in tree
3.e) Only draw npc (in a preview window section) when selecting an npc from the tree.
4) If Create new
4.*) same as 3 but, lots to create :)
5) Save (saves current file, will prompt if file doesn't exist for a new file name)
6) Save as (save as a new file)
7) Export (will prompt with failure if any assets are missing images, or any other required fields that need values). But, exports as gameworld.h file

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: New 32x game in development!

Post by Chilly Willy » Sun Mar 19, 2023 12:54 pm

Sounds rather useful. Might attract some folks who'd rather concentrate on the game than on coding.

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Mon Mar 27, 2023 9:15 pm

Chilly Willy wrote:
Sun Mar 19, 2023 12:54 pm
Sounds rather useful. Might attract some folks who'd rather concentrate on the game than on coding.
Sorry for the late response! When it rains it poors when it comes to life and becoming busy :) Yes, my plan is that not only will I be able to benefit with how fast i can scale when it comes to creating content for this game by creating this; others can use this as well to focus less on code and more on content! The IDE won't be like a unity or unreal engine lol, but it's better than nothing for the 32x.

As for progress! I have managed to draw up the sprite and battlesprites that are present within the editor and when you select the corresponding NPC and or Player assets (within current world or just stored as assets) you will see the respective images. When you change the images on the fly the images are reflected as well. My next step is to get the npc image to show up on my map and allow users to drag and drop them to reflect their desired location within the map. Slow progress, but still going strong :) Work may keep me busy; but don't mistake my lack of responses lately as loosing any heart for my projects.

They will get done!
35.png
35.png (62.1 KiB) Viewed 54320 times

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: New 32x game in development!

Post by Chilly Willy » Wed Mar 29, 2023 8:20 pm

Don't worry about it. I think everyone here knows all about not being able to devote every second to your project. I certainly do. Real life often gets in the way. We're a patient sort, here, so just keep at it. We'll still be here.

AmateurSegaDev
Interested
Posts: 24
Joined: Sun Feb 27, 2022 3:27 am

Re: New 32x game in development!

Post by AmateurSegaDev » Sat Apr 08, 2023 2:03 am

Wow, this is awesome stuff!

Still wrapping my head around Genesis/Mega Drive, but would love to tackle the 32X one day.

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Wed Apr 12, 2023 3:39 am

Chilly Willy wrote:
Wed Mar 29, 2023 8:20 pm
Don't worry about it. I think everyone here knows all about not being able to devote every second to your project. I certainly do. Real life often gets in the way. We're a patient sort, here, so just keep at it. We'll still be here.
Thanks for the kind words good sir:) Some slow updates on my end below though!

I've got my NPC's to also draw on my map (in the right coordinates now...that was challenging). I can even drag and drop the NPC to a new x,y postion that will reflect within the JSOn file and ultimatly gets exported to the gameworld.h file (so i'm pretty pleased with that now!).

I've also made the background's of the sprite transparent....however...stupid windows forms don't really mean "transparent" they instead take the background color of the main form and apply that as the new background. while that works for the sprite images separately, that doesn't work so well when each picture box of an NPC is on top of other picture boxes that make up the tiles behind it (thus why you still see the background around the sprite within the map drawn). Now, if i set the transparentkey for the app to the background color of the image that then makes it so that the background of the sprite is completely transparent LOL...so essentially if those images are drawn the application has these holes in it that you can see other screens behind it. Very distracting and not what i'm wanting. So, ultimately i'm going to live with the background color as it is on the maps (for now).

I also have the maps being drawn only when you select the map (that way you're not waiting for a map to load when loading up the application). I was planning on having the map load async, but apparently that's taboo to draw things outside the main thread; so I have to live with that too (starting to not like winforms anymore....WPF maybe).

More to come! Enjoy the screen shot below :)
36.png
36.png (66.74 KiB) Viewed 54177 times

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Wed Apr 12, 2023 3:41 am

AmateurSegaDev wrote:
Sat Apr 08, 2023 2:03 am
Wow, this is awesome stuff!

Still wrapping my head around Genesis/Mega Drive, but would love to tackle the 32X one day.
Hello! Thank you for the very kind words:) Well, my hope is that this living thread will help anyone that starts the 32x journey. When I'm satisfied with this engine/sdk/ or whatever i'm calling it. I'll be posting up a github link for everyone to enjoy and build games!

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Thu Apr 27, 2023 3:32 am

Whelp it's time for another update! Past week i've been down the with plague (or a man sized cold...don't judge) head had been stopped up, didn't/couldn't really think :( However, i'm starting to think more and get back at it.

I switched back to the SDK build out (needed a breather from the editor...only so much time i can spend before i want to punch my screen because winforms). i wanted to finally sit down and build out some basic logic for muliple sound effects to be loaded. While i don't have a screenshot I kept this extremely simple. I've added my .wav files to my assets.h file and then within my marssound.c file i added my extern reference to those assets (so they should pull from the cart). Then I added a simple switch statement that is triggered off the sound_id that I pass in.

In my simple test on my battle screen, the hero's attack sends a sound_id of 2 and the enemy sends a sound_id of 3. The switch statement worked flawlessly and now I can add all my sounds into the game and just add them to the switch statement when needed.

Pretty simple, no need to make that complicated.

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Tue May 02, 2023 10:03 pm

Chilly Willy wrote:
Wed Mar 29, 2023 8:20 pm
Don't worry about it. I think everyone here knows all about not being able to devote every second to your project. I certainly do. Real life often gets in the way. We're a patient sort, here, so just keep at it. We'll still be here.
Hey Chilly! I have a few questions for you whenever you get a chance :)

First, I'll be demoing what i've built (thus far) on a twitch channel with my company coming up (so I plan on giving you and vic some credit with all the help the two of you have given me in this journey). With that said, I'm wanting to get a small demo of what i'm doing put together before June (sometime in June is when the twitch episode will launch). So, my two questions:

1) If I remember correctly, there was a certain build setting that I needed in the make file for my rom to play on real hardware (just in case the host of the show will be streaming this from his Sega). What's that build setting ?:) Below is a section of my MakeFile

Code: Select all

CCFLAGS = -c -std=c11 -g -m2 -mb
CCFLAGS += -Wall -Wextra -pedantic -Wno-unused-parameter -Wimplicit-fallthrough=0 -Wno-missing-field-initializers -Wnonnull
CCFLAGS += -D__32X__ -DMARS
LDFLAGS = -T $(LDSCRIPTSDIR)/mars.ld -Wl,-Map=output.map -nostdlib -Wl,--gc-sections --specs=nosys.specs
ASFLAGS = --big

MARSHWCFLAGS := $(CCFLAGS)
MARSHWCFLAGS += -fno-lto

release: CCFLAGS += -Os -fomit-frame-pointer -ffast-math -funroll-loops -fno-align-loops -fno-align-jumps -fno-align-labels
release: CCFLAGS += -ffunction-sections -fdata-sections -flto
release: MARSHWCFLAGS += -O1
release: LDFLAGS += -flto

debug: CCFLAGS += -O1 -ggdb -fno-omit-frame-pointer
debug: MARSHWCFLAGS += -O1 -ggdb -fno-omit-frame-pointer
2) I'm thinking of buying a krikzz mega drive x5 to do some local testing myself. Is this a good choice? something better that I should consider?

Thanks again, and I hope you are doing well :)!

cero
Very interested
Posts: 338
Joined: Mon Nov 30, 2015 1:55 pm

Re: New 32x game in development!

Post by cero » Wed May 03, 2023 7:07 am

Mega Everdrive X5 is probably enough for your use, the 8mb size limit and lack of usb port being the biggest lacks. Just be careful not to buy a chinese crap clone from amazon/etc, buy a real one from an official seller.

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Sat May 06, 2023 4:30 am

Small update:

So I forgot i had one of those retrostage blasters that i bought a few years back along with a sega cartridge and adapter. Thankfully it also accepts 32x roms and not just sega roms. I managed to hook everything up tonight after writing the demo rom to the cartridge and it plays!! Two issues that i noticed though:

1). My music works fine but none of my sound works. It seems 2 out of the 3 sound wave files make a click or a pop when they try to work and the 3rd just doesn’t do anything. But they all work just fine through emulation. So not sure whats up with that

2). When using just the yellow, white, red cables directly into my TV (its an older lcd so doesn’t lookas good as if it was on a crt) all the colors are just fine. But when i run that same cable through my retrotink 2x pro the edges all smooth out nicely but the colors are waaay off (might be just a cheap chines y,w,r cable that im using?)

Any thoughts?

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: New 32x game in development!

Post by Chilly Willy » Mon May 08, 2023 7:35 pm

For C/C++ code that directly bangs on the hardware, you need to compile it with NO MORE than optimization level 1. If you go with 2 or higher, you need memory fences around the hardware accesses, and gcc doesn't seem to have memory fences defined for the SuperH family.

What we do in D32XR is to define the optimization level on a per-function basis using function attributes, like this

Code: Select all

#define MARS_ATTR_DATA_CACHE_ALIGN __attribute__((section(".data"), aligned(16), optimize("O1")))

char Mars_UploadPalette(const uint8_t* palette) MARS_ATTR_DATA_CACHE_ALIGN;
or in the makefile for entire files like this

Code: Select all

MARSHWCFLAGS := $(CCFLAGS)
MARSHWCFLAGS += -O1 -fno-lto


marshw.o: marshw.c
	$(CC) $(MARSHWCFLAGS) $(INCPATH) $< -o $@

matthewnimmo
Very interested
Posts: 87
Joined: Thu Jan 07, 2021 8:04 pm

Re: New 32x game in development!

Post by matthewnimmo » Wed May 10, 2023 6:39 pm

Chilly Willy wrote:
Mon May 08, 2023 7:35 pm
For C/C++ code that directly bangs on the hardware, you need to compile it with NO MORE than optimization level 1. If you go with 2 or higher, you need memory fences around the hardware accesses, and gcc doesn't seem to have memory fences defined for the SuperH family.

What we do in D32XR is to define the optimization level on a per-function basis using function attributes, like this

Code: Select all

#define MARS_ATTR_DATA_CACHE_ALIGN __attribute__((section(".data"), aligned(16), optimize("O1")))

char Mars_UploadPalette(const uint8_t* palette) MARS_ATTR_DATA_CACHE_ALIGN;
or in the makefile for entire files like this

Code: Select all

MARSHWCFLAGS := $(CCFLAGS)
MARSHWCFLAGS += -O1 -fno-lto


marshw.o: marshw.c
	$(CC) $(MARSHWCFLAGS) $(INCPATH) $< -o $@
Hey Chilly! Thanks for all the help. I see that my release section of my makefile has the -01 in it. So im guessing all i need to do is run “make release” and it should pick up those extra release flags?

Also, any thoughts on why my sound keeps just popping and buzzing on real hardware? All files are now mono 8khz 8bit. So they sound just fine emulated but all that popping occurs on real hardware. Just for a sanity check I dumped my rom back from my cart just to ensure it wasn’t somehow a bad write to my programmable eprom. And the rom ran just fine dumped

Thoughts?

Post Reply