News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Black Screen when Emulating Room?

Started by Oi27, August 07, 2018, 01:27:02 PM

Previous topic - Next topic

Oi27

I made a new room using the SMILE RF tutorial, and it works fine in SMILE, but in emulation it just shows a black screen in SNES9x.
The door links also work fine in SMILE; I can go between the rooms there, but if I try to enter the room using the door in emulation, the door blocks on the other side just act like solid.
This is the second room I've made, and the first one worked fine. I can't figure out what gives. :p
Some screenshots:
https://imgur.com/kwx91OQ
https://imgur.com/kS4i7Ee

Smiley

The room most likely doesn't load because it has undefined enemies or PLMs. Make sure they're set to be visible and click Tools > Offscreen Enemies to Screen or Offscreen PLMs to Screen to make sure they aren't hiding offscreen. Red question mark boxes and knights mean undefined PLMs and enemies, respectively. Change them to actual things (arrow PLMs and Boyon enemies work fine for this) if there are any.

The door doesn't work in-game most likely due to bad door data. Since the doors work in SMILE, it's probably a bad direction or bitflag value.

Your doors also aren't centered, they're two tiles below the center of the screen. Doing that is fine, but the door cap spawn point needs to be tweaked so a cap spawns in the right location.

Oi27

#2
Quote from: SMILEuser96 on August 08, 2018, 07:06:11 AM
The room most likely doesn't load because it has undefined enemies or PLMs. Make sure they're set to be visible and click Tools > Offscreen Enemies to Screen or Offscreen PLMs to Screen to make sure they aren't hiding offscreen. Red question mark boxes and knights mean undefined PLMs and enemies, respectively. Change them to actual things (arrow PLMs and Boyon enemies work fine for this) if there are any.

The door doesn't work in-game most likely due to bad door data. Since the doors work in SMILE, it's probably a bad direction or bitflag value.

Your doors also aren't centered, they're two tiles below the center of the screen. Doing that is fine, but the door cap spawn point needs to be tweaked so a cap spawns in the right location.
I think it has something to do with the level data, since I've never been able to load it in emulation, even when it shared all its pointers with the room I copied it from. I've tried removing the doors entirely, there are no PLMs or enemies in the room, and playing around with the pointers doesn't seem to fix it. Right now it shares all its pointers with functioning rooms, except for level data.

Next I think I'll try filling all its data with free space and starting from square one. The next step would be starting with a new ROM - there are some other abnormalities with the one I'm using. All the rooms in the game with foreground liquids load as black with the liquid in front; everything behind the liquid layer works fine; and a bunch of random rooms that I haven't touched now play the intro music. Dunno how I messed those up. xP

EDIT: The liquid layer thing was the emulator; I reinstalled SNES9x with the most recent version and that fixed it. The music thing seeeems to be a SMILE bug? I took a fresh ROM and the music was working perfectly, then I opened the ROM in SMILE and it automatically changed the music to the intro, but only for some rooms. It was a consistent problem throughout the whole map, with about a 50/50 shot of any given room retaining the right music. It doesn't change anything if you don't save the room, but having it default to wrong music is inconvenient. SMILE Ver. 3.0.0.98

Smiley

The liquid thing was most likely because you had transparency or HDMA emulation turned off.

The music is because there's two settings for it  - the song set and the track to play. The former is a collection of samples and tracks that can be used/played, and the latter specifies which track to play. For some rooms, both are set to 00, which means no new music is loaded when the room loads. However, that is not valid if you load directly into a room with quickmet, so SMILE automatically changes the latter to 05 - No Change/Track 1, which means it'll play the first track of the currently loaded song set, which happens to be the intro set (because it's loaded when the rom boots), so the title theme plays. If the song set option is something other than 00, then the first track of whatever song set was chosen will play.
Tl;dr, the music thing is not a bug.

Level data thing sounds like it's missing the terminator byte, FF. Level data is compressed, so the game decompresses it when loading a room. It knows the compressed data ends with a FF, but it'll happily keep decompressing forever if the terminator is missing. SMILE doesn't decompress more than it needs to though, which probably is why the room works in SMILE but not in-game.
Easy to check: go to where the level data is in the rom, and see if it ends with a FF.

By the way, there is a Discord server. You can get help faster if you stop by. :)