Advent Wreath Application For The VMU [HomeBrew]

Moderators: pcwzrd13, deluxux, VasiliyRS

wtetzner
noob
Posts: 1

Re: Advent Wreath Application For The VMU [HomeBrew]

Post#11 » Thu Dec 01, 2022 9:07 am

Hey Marble_Granite, awesome work!

For what it's worth, waterbear has built-in support for a bunch of that stuff.

You can generate a .vmi file from a .vms like this:

Code: Select all

waterbear vmi my-game.vms --game --copyright '2022 Marble_Granite'


For the game header, there are some helpful directives like .text, .string, and .include icon:

Code: Select all

  ;; Memory location 0 of ROM. Just jump to the starting instruction.
  .org 0
  jmpf start

  ;; Header
  .org  $200

  .text 16 "Cool Game"
  .text 32 "My Cool Game"
  .string 16 "waterbear"

  ;; Icon data
  .include icon "images/icon.gif" speed=16, eyecatch="images/eyecatch.png"

  ;; Main program
start:


There's also support for including image files in libPerspective's expected format:

Code: Select all

.include sprite "images/sprite.png"

User avatar
Falco Girgis
Developer
Posts: 105

Re: Advent Wreath Application For The VMU [HomeBrew]

Post#12 » Thu Dec 01, 2022 10:23 am

Marble_Granite wrote:So to start, I used the .VMI from Tyro's Chao Editor 2 Application, and changed my Output .VMS from WaterBear to be called "EDITOR2" to match. Blue Swirl, the Dream Explorer .CDI, and this awesome page from Sega-Dreamcast.Com also had some to offer. For the EyeCatch, Sebastian Mihai's Raining Squares offers an excellent explanation on how to make them manually in the "gamehdr.i" File. Generators for .VMI Files and Headers would be awesome Developer Features for EVMU for sure!
Damn, I didn't realize you guys had to go through so much and use so many disjoint tools just to do some of this stuff... For the most part right now, I'm just the guy decoding it, so I was wondering where it was coming from. :lol:

wtetzner wrote:You can generate a .vmi file from a .vms like this:

Code: Select all

waterbear vmi my-game.vms --game --copyright '2022 Marble_Granite'

Ah that's better. I had totally forgotten that you could do that with waterbear!

Funny story, you can at least get a boilerplate VMI file from EVMU that should work by just importing the VMS GAME file, autogenerating the VMI from it, then right-clicking on the File Manager and exporting the VMS and autogenerated VMI back to disk. lmao.

Wtetzner, so waterbear can generate VMS animations and eyecatches from animated GIFs and PNGs respectively? They just have to match the right size? That's really nice. I would leave that stuff all to you, but I wanted to let the user do the VMS header stuff like that for DATA files and not just game files... Hrrm... unless you wanted to. lol.

Marble_Granite wrote:I have indeed considered making a tutorial, and that's one of the main goals I've had with this project; I hopefully could start on that after finishing a couple of VMU Games to ensure a broad knowledge of the VMU's features (I can't get Sound to work at the moment, and I know nothing about Reading/Writing Flash Memory or Stack Management.).
That would be awesome! I know a bunch of people who would be all over it once you feel like you're at that point. Let us know if there's anything we can do to help out or support you working with any of this stuff.

Marble_Granite wrote:The Library is essential for Graphics (I don't even know how to Write to the Screen without it!), and the Example Code is clean and super well-written, not to mention an extremely impressive display of the hardware's capabilities.
Damn, that's good to hear. I was hanging out in Discord with Krensa when he wrote it, and I knew it was pretty good, but I hadn't heard any real feedback from other developers who were using it.

It's actually kind of comical how annoying it is to render to the VMU screen directly. XRAM is just a memory region, but it's split into 3 banks you have to swap between, and the rows for each pixel aren't even laid out contiguously... Every major AAA VMU game I've dissected has some form of abstraction for writing graphics sanely around it. A lot of games like the Chao Adventures seem to do all graphics in a staging buffer in WRAM that is laid out sanely then just blit the entire thing at once to XRAM when they're done drawing.

Marble_Granite wrote:There's also support for including image files in libPerspective's expected format:

Code: Select all

.include sprite "images/sprite.png"
WTF!? I totally missed that part. I didn't even realize you had worked libPerspective into the workflow like that. That's extremely convenient! Nice!!!

Marble_Granite wrote:Calendar has some issues, and exiting the Options Menu is not as responsive as it should be (a lot of presses of A and B might be required to get out of there...), but it does at least boot up, so VMU Users feel free to try it out!
Awesome! I just got a bunch of CR2032s, so I'll check it out on the actual device!

By the way, man, I've spent so much time working on input in ElysianVMU and worrying about responsiveness, that I've kind of created a mental list of games that handle it very well and responsively versus games that don't. Tbh I'm not sure exactly what technique the good ones are using versus the bad ones (polling vs interrupt driven), but it sounds like it might potentially be worth someone's time to run the good ones through waterbear's disassembler and see how they're handling it.

You know what seems to have like INCREDIBLY responsive input? Chao Adventure 2. Like you can especially tell in the text entry screen, rapidly pushing all dpad buttons how quickly it can respond to and detect multiple button presses. Not really sure what they're doing differently, though.

User avatar
fafadou
Gold Lion
Posts: 1650

Re: Advent Wreath Application For The VMU [HomeBrew]

Post#13 » Thu Dec 01, 2022 1:09 pm

@Falco :
It's quite easy to do a supply via USB for vmu if you have an old cable.
No needs to weld.
red wire on + black wire on -

User avatar
Falco Girgis
Developer
Posts: 105

Re: Advent Wreath Application For The VMU [HomeBrew]

Post#14 » Thu Dec 01, 2022 1:52 pm

fafadou wrote:@Falco :
It's quite easy to do a supply via USB for vmu if you have an old cable.
No needs to weld.
red wire on + black wire on -
Fiiiiiine. I'm going to finally go ahead and try to do the mod tonight. Darc did it the other day and has been trying to convince me to do it too, and especially with how many VMU batteries I go through and all the testing for ElysianVMU, I really don't have any good excuse for not doing it. :lol:

User avatar
Falco Girgis
Developer
Posts: 105

Re: Advent Wreath Application For The VMU [HomeBrew]

Post#15 » Thu Dec 01, 2022 2:06 pm

By the way, my dudes, while I have a bunch of VMU people here, especially if you have USB power...

I have a theory that I haven't gotten around to testing, but I'm pretty sure it will work and could potentially make for a crazy tech demo...

So like you know when the VMU is connected to the Dreamcast, it's actually swapping to a CF oscillator that is jumping to a whopping 6Mhz in the BIOS code so that it can keep up with the Maple protocol, implementing the whole stack in the BIOS in software...

Anyway, the oscillator configuration settings aren't documented anywhere, but I don't see why you wouldn't be able to swap to the 6Mhz CF oscillator in standalone game mode, executing from flash, without going through the BIOS. The register values don't need to be documented when you can easily disassemble or step through what the BIOS calls are doing. :D

Yes, this will probably DESTROY the poor batteries, but like... if you have that USB mod or just for a proof-of-concept demo, you would have a freaking VMU running at a whopping 6Mhz. Compare that to something like the GameBoy only running at around ~4Mhz with a less capable ISA (the VMU's is really impressive with stuff like dem hardware MUL and DIV instructions), and I think you would be able to make some amazing tech demo at very least doing something that has never been done before on the device.

Yeah, it's niche, but it would be hella badass to do. :lol:

Marble_Granite
shadow
Posts: 11

Re: Advent Wreath Application For The VMU [HomeBrew]

Post#16 » Sun Dec 04, 2022 11:03 pm

Wow, thanks WTetzner for the write-up on those File Generation Tools! WaterBear is such a fantastic Assembler and Disassembler, and hearing about these features makes it even sweeter; will definitely have to try them out! Automating the Sprite Generation in LibPerspective's Format is extremely cool, too.

Good to know that the Auto-Generated .VMI from EVMU can be saved too, it's very helpful! As for the input, I've noticed the same thing; even the VMU's OS itself can be a bit "slow" or "sticky" when Inputting the Date and Time for the Calendar.

Falco Girgis wrote: Let us know if there's anything we can do to help out or support you working with any of this stuff.


Great to know, I appreciate that very much!

bruce
noob
Posts: 1

Re: Advent Wreath Application For The VMU [HomeBrew]

Post#17 » Thu Dec 08, 2022 7:21 am

Marble_Granite wrote:Thanks!! The Ghosting Effect is awesome in EVMU, and the new Filter looks excellent! For the .VMI File, Marcus's VMI Files Page was beyond a huge help, and I was able to edit the Hex Values/Bytes in Visual Studio according to his table, which allowed me to get it through. EVMU is super user-friendly in this regard, as Dream Explorer won't show a .VMS File unless it has a matching, properly-formatted .VMI File in the Directory -- it doesn't matter what the Contents of that .VMI File are, as long as the Name matches. So to start, I used the .VMI from Tyro's Chao Editor 2 Application, and changed my Output .VMS from WaterBear to be called "EDITOR2" to match. Blue Swirl, the Dream Explorer .CDI, and this awesome page from Sega-Dreamcast.Com also had some to offer. For the EyeCatch, Sebastian Mihai's Raining Squares offers an excellent explanation on how to make them manually in the "gamehdr.i" File. Generators for .VMI Files and Headers would be awesome Developer Features for EVMU for sure!

I have indeed considered making a tutorial, and that's one of the main goals I've had with this project; I hopefully could start on that after finishing a couple of VMU Games to ensure a broad knowledge of the VMU's features (I can't get Sound to work at the moment, and I know nothing about Reading/Writing Flash Memory or Stack Management.). In the meantime though, Kresna's LibPerspective (both the library and the example code) are phenomenal ways for Beginners to get into VMU Coding. The Library is essential for Graphics (I don't even know how to Write to the Screen without it!), and the Example Code is clean and super well-written, not to mention an extremely impressive display of the hardware's capabilities.

I was able to get past that issue with the Header File as well, and have attached a Build that works on VMUs below. Lighting the Candles automatically on Boot-Up via the Internal Calendar has some issues, and exiting the Options Menu is not as responsive as it should be (a lot of presses of A and B might be required to get out of there...), but it does at least boot up, so VMU Users feel free to try it out!

Advent_W.VMI
Advent_W.VMS




Thanks for the links.
I'm having a look at getting into VMU development atm and I think the most frustrating thing is just trying piece all the information together.
Particularly looking at all the old resources while making use of a lot of the newer tools that have been released that although great are not as well documented. A tutorial would indeed be great.

Marble_Granite
shadow
Posts: 11

Re: Advent Wreath Application For The VMU [HomeBrew]

Post#18 » Mon Dec 12, 2022 3:48 pm

Welcome, Bruce!! Getting started is definitely difficult; it can really be overwhelming to get the ball rolling, but then the fun starts. Hopefully we'll be able to compile the currently-available resources and add some of our own! I just made an account on Discord and joined the Group that Falco linked on the Previous Page (and will be doing the same for the Simulant Group soon.); Please feel free to hit me up on there as well as here on Dreamcast-Talk. I'd love to help you get started any way I can!

  • Similar Topics
    Replies
    Views
    Last post

Return to “New Games”

Who is online

Users browsing this forum: No registered users