Kirk_Johnston Posted July 3, 2023 Author Share Posted July 3, 2023 2 hours ago, jeffythedragonslayer said: So, back to the 9-bit sprite X positions... did you guys know it's illegal to put a SNES sprite at x=100h? See caution #7 https://archive.org/details/SNESDevManual/book1/page/n104 Anyone wanna try it and see how long it takes for the Nintendo police to show up? I don't understand what that means? Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 3, 2023 Share Posted July 3, 2023 (edited) 43 minutes ago, Kirk_Johnston said: I don't understand what that means? The "h" in "100h" means "hexadecimal," which is probably the system that aliens who have 16 fingers would count in. But in decimal, it's x=256. So that would be a sprite that is just barely completely off the right-hand side of the screen (one that you can't see at all anymore, not one that is mostly still on-screen). Nintendo doesn't want you to put sprites at that horizontal location. I wonder why... Edited July 3, 2023 by jeffythedragonslayer Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 3, 2023 Author Share Posted July 3, 2023 6 hours ago, jeffythedragonslayer said: The "h" in "100h" means "hexadecimal," which is probably the system that aliens who have 16 fingers would count in. But in decimal, it's x=256. So that would be a sprite that is just barely completely off the right-hand side of the screen (one that you can't see at all anymore, not one that is mostly still on-screen). Nintendo doesn't want you to put sprites at that horizontal location. I wonder why... I wonder if it's because it potentially still counts towards the max sprites per scanline limit or something like that, and if you're not going to see it anyway, maybe they'd want you to position somewhere else in that case? Or possibly there's some issue with sprites looping to the other side of the screen if they're in that position, so they want you to avoid it in that case? Dunno, but just speculating. Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 4, 2023 Share Posted July 4, 2023 11 hours ago, Kirk_Johnston said: I wonder if it's because it potentially still counts towards the max sprites per scanline limit or something like that, and if you're not going to see it anyway, maybe they'd want you to position somewhere else in that case? Or possibly there's some issue with sprites looping to the other side of the screen if they're in that position, so they want you to avoid it in that case? Dunno, but just speculating. Yeah, I figure they wouldn't bother telling us about it if it didn't screw up something like sprite evaluation in some way. Here's another similar problem that's mentioned on the page before the recommended register clearings: https://sneslab.net/wiki/Revision_1_PPU1_Time_Over_Bug 1 Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 19, 2023 Share Posted July 19, 2023 Does anyone know of any examples of BG3 High Priority in Mode 0? 1 Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 19, 2023 Author Share Posted July 19, 2023 15 hours ago, jeffythedragonslayer said: Does anyone know of any examples of BG3 High Priority in Mode 0? I've asked about this and apparently you can't do BG3 high priority in Mode 0. I have no idea why such an option would be available in Mode 1 and not also in Mode 0, but this is Nintendo so I'm not surprised. If someone does discover you can in fact set BG3 to high priority on Mode 0 too, well that would be cool to know and let everyone else in the community know also, because everyone I've talked to is convinced it can't be done--or at least that's what I've been told to date. Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 19, 2023 Share Posted July 19, 2023 (edited) 16 minutes ago, Kirk_Johnston said: I've asked about this and apparently you can't do BG3 high priority in Mode 0. I have no idea why such an option would be available in Mode 1 and not also in Mode 0, but this is Nintendo so I'm not surprised. If someone does discover you can in fact set BG3 to high priority on Mode 0 too, well that would be cool to know and let everyone else in the community know also, because everyone I've talked to is convinced it can't be done--or at least that's what I've been told to date. Well, that's funny. The official manual is quite clear that you can do BG3 High Priority in Mode 0: Quote HIGHEST PRIORITY DESIGNATION FOR BG-3 Make BG3 highest priority during BG Mode 0 or 1 (page A-19) 0: OFF 1: ON page 2-27-3 of Book I It seems Doug tested this and it didn't work for him: https://forums.nesdev.org/viewtopic.php?p=281634#p281634 Maybe it's the kind of thing that's broken on some board revisions but not others? Edited July 19, 2023 by jeffythedragonslayer 1 Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 19, 2023 Author Share Posted July 19, 2023 6 minutes ago, jeffythedragonslayer said: Well, that's funny. The official manual is quite clear that you can do BG3 High Priority in Mode 0: page 2-27-3 of Book I It seems Doug tested this and it didn't work for him: https://forums.nesdev.org/viewtopic.php?p=281634#p281634 Maybe it's the kind of thing that's broken on some board revisions but not others? Very strange. And the fact it literally says it in the manual is now even weirder. Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 19, 2023 Share Posted July 19, 2023 15 minutes ago, Kirk_Johnston said: Very strange. And the fact it literally says it in the manual is now even weirder. I have tested the following ROMs from that max overlapping layers thread in Mesen: * Face0.sfc * FaceB.sfc * Face0_C.sfc None of them are even setting the BG3 High Priority bit: So, it appears we don't have a publicly available ROM that actually tests whether BG3 High Prio is possible in Mode 0. Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 19, 2023 Author Share Posted July 19, 2023 2 minutes ago, jeffythedragonslayer said: I have tested the following ROMs from that max overlapping layers thread in Mesen: * Face0.sfc * FaceB.sfc * Face0_C.sfc None of them are even setting the BG3 High Priority bit: So, it appears we don't have a publicly available ROM that actually tests whether BG3 High Prio is possible in Mode 0. Curiouser and curiouser. Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 19, 2023 Share Posted July 19, 2023 (edited) Do you happen to have the source code to a Mode 0 demo lying around, something that displays all four layers? In hexadecimal, the low nibble of that BGMODE register should be 8 if we are testing correctly. Mesen wasn't allowing me to hack an 8 into that register at runtime easily. I tried using the built-in assembler and typing it into the memory viewer at $2105, neither worked. But when I sacrified a couple instructions that were scrolling the background and changed them to this in the debugger instead: LDA #$08 STA $2105 The BG3 High Priority flag went on. But, I still need a way to save that hacked ROM to an SFC file so I can test it on a real SNES. Edited July 19, 2023 by jeffythedragonslayer Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 19, 2023 Author Share Posted July 19, 2023 (edited) 6 minutes ago, jeffythedragonslayer said: Do you happen to have the source code to a Mode 0 demo lying around, something that displays all four layers? In hexadecimal, the low nibble of that BGMODE register should be 8 if we are testing correctly. Mesen wasn't allowing me to hack an 8 into that register at runtime easily. I tried using the built-in assembler and typing it into the memory viewer at $2105, neither worked. But when I sacrified a couple instructions that were scrolling the background and changed them to this instead: LDA #$08 STA $2105 The BG3 High Priority flag went on. But, I still need a way to save that hacked ROM to an SFC file so I can test it on a real SNES. I don't think so. All I have is the playable demos I was sent by LMPuny of the Mode 0 bridge level I was working on that I can test in an emulator, which you can download from the SNESdev chat you linked to earlier. Those aren't source code, right? I don't really understand that part to be honest. Edited July 19, 2023 by Kirk_Johnston Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 19, 2023 Share Posted July 19, 2023 1 minute ago, Kirk_Johnston said: I don't think so. All I have is the playable demos I was sent by LMPuny of the Mode 0 bridge level I was working on that I can test in an emulator, which you can download from the SNESdev chat you linked to earlier. Those aren't source code, right? I don't really understand that part to be honest. No, those are .SMC files. SMC stands for "Super Magicom," an old copier that would give ROMs those extensions. I prefer to name my ROMs ending in .SFC because that's what Nintendo recommends. Assembly source code typically will have file extension .asm or .s If you could ask LMPuny for the source code, that would be a big help. 1 Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 19, 2023 Author Share Posted July 19, 2023 (edited) 8 minutes ago, jeffythedragonslayer said: No, those are .SMC files. SMC stands for "Super Magicom," an old copier that would give ROMs those extensions. I prefer to name my ROMs ending in .SFC because that's what Nintendo recommends. Assembly source code typically will have file extension .asm or .s If you could ask LMPuny for the source code, that would be a big help. We've not chatted for a while, and I think this was just a mod of his own project that he might be a bit protective of, so I'm not sure I'll be able to get that, but I'll ask. Edited July 19, 2023 by Kirk_Johnston Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 19, 2023 Share Posted July 19, 2023 13 minutes ago, Kirk_Johnston said: We've not chatted for a while, and I think this was just a mod of his own project that he might be a bit protective of, so I'm not sure I'll be able to get that, but I'll ask. I can try to find a Yoshi's Island romhacker who can enable the bit in the Kamek room too. 1 Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 19, 2023 Author Share Posted July 19, 2023 (edited) Does the attached file help? And he also said "the BG priority part is one of the simplest parts of the code iirc. of interest might be this part of the code for that purpose: ;> Format: ; ¬ 1: Layer 1 ; ¬ 2: Layer 2 ; ¬ 3: Layer 3 ; ¬ 4: Layer 4 ; ¬ S: Sprites ; ¬ MainScr SubScr ; ¬ ---S4321 ---S4321 ScreenHax: db $7C,%00010011,%00001100 ; db $7F,%00010101,%00001010 ; db $00 "at the first frame it just sets up a HDMA channel to read that table. for register $212C tha handles main & sub screen priorities via bit-by-bit configuration. this is the code of the macro that sets up the table to be read, it's called in init": macro BiGUploadHDMA(Adress,Offset,Register,Mode,Channel) lda #$0000+(<Register>&$00FF<<8)+<Mode> sta $4300+(<Channel><<4) lda.w #<Adress> if <Offset> != 0 clc : adc $0E endif sta $4302+(<Channel><<4) lda.w #$0000+<Adress>>>16 sta $4304+(<Channel><<4) endmacro Hopefully that all makes sense to you alongside the attached file. And he said "i just hope i didn't lose that code" Nothing above or attached makes sense to me at all though, as I can't write code for SNES. LOL message.txt Edited July 19, 2023 by Kirk_Johnston Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 19, 2023 Share Posted July 19, 2023 20 minutes ago, Kirk_Johnston said: Does the attached file help? And he also said "the BG priority part is one of the simplest parts of the code iirc. of interest might be this part of the code for that purpose: ;> Format: ; ¬ 1: Layer 1 ; ¬ 2: Layer 2 ; ¬ 3: Layer 3 ; ¬ 4: Layer 4 ; ¬ S: Sprites ; ¬ MainScr SubScr ; ¬ ---S4321 ---S4321 ScreenHax: db $7C,%00010011,%00001100 ; db $7F,%00010101,%00001010 ; db $00 "at the first frame it just sets up a HDMA channel to read that table. for register $212C tha handles main & sub screen priorities via bit-by-bit configuration. this is the code of the macro that sets up the table to be read, it's called in init": macro BiGUploadHDMA(Adress,Offset,Register,Mode,Channel) lda #$0000+(<Register>&$00FF<<8)+<Mode> sta $4300+(<Channel><<4) lda.w #<Adress> if <Offset> != 0 clc : adc $0E endif sta $4302+(<Channel><<4) lda.w #$0000+<Adress>>>16 sta $4304+(<Channel><<4) endmacro Hopefully that all makes sense to you alongside the attached file. And he said "i just hope i didn't lose that code" Nothing above or attached makes sense to me at all though, as I can't write code for SNES. LOL message.txt 8.31 kB · 1 download That doesn't help much. There's no instructions on how to assemble it. Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 19, 2023 Author Share Posted July 19, 2023 26 minutes ago, jeffythedragonslayer said: That doesn't help much. There's no instructions on how to assemble it. Ah, okay. Well, I don't really know what else to do. Sorry aboot that. Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 20, 2023 Share Posted July 20, 2023 17 hours ago, Kirk_Johnston said: Ah, okay. Well, I don't really know what else to do. Sorry aboot that. No worries. If a lot of people want to know the answer it will motivate me, but this is becoming a lot of work to figure out how a single bit behaves in one particular mode. Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 20, 2023 Share Posted July 20, 2023 If you could ask LMPuny what assembler, that would help too. Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 20, 2023 Author Share Posted July 20, 2023 2 hours ago, jeffythedragonslayer said: If you could ask LMPuny what assembler, that would help too. He says he uses asar, if that helps. 1 Link to comment Share on other sites More sharing options...
jeffythedragonslayer Posted July 20, 2023 Share Posted July 20, 2023 32 minutes ago, Kirk_Johnston said: He says he uses asar, if that helps. A little, but not enough: $ ./asar /cygdrive/c/lmpuny/mode0.s /cygdrive/c/lmpuny/mode0.s:12: warning: (Wmissing_org): Missing org or freespace command. [BGCityBridge:] /cygdrive/c/lmpuny/mode0.s:19: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:46: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:59: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:62: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:64: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:70: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:73: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:80: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:81: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:87: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:89: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:91: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:92: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:95: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:97: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:99: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:100: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:103: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:105: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:107: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:108: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:108: error: (Elimit_reached): Over 20 errors detected. Aborting. A fatal error was detected while assembling the patch. Assembling aborted. Your ROM has not been modified. We are missing some code. There are defines that asar can't find. If you manage to convince them to take a look at this thread that would probably be easiest. Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted July 20, 2023 Author Share Posted July 20, 2023 54 minutes ago, jeffythedragonslayer said: A little, but not enough: $ ./asar /cygdrive/c/lmpuny/mode0.s /cygdrive/c/lmpuny/mode0.s:12: warning: (Wmissing_org): Missing org or freespace command. [BGCityBridge:] /cygdrive/c/lmpuny/mode0.s:19: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:46: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:59: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:62: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:64: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:70: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:73: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:80: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:81: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:87: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:89: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:91: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:92: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:95: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:97: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:99: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:100: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:103: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:105: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:107: error: (Edefine_not_found): Define 'addr' wasn't found. /cygdrive/c/lmpuny/mode0.s:108: error: (Edefine_not_found): Define 'ParallaxRAM16' wasn't found. /cygdrive/c/lmpuny/mode0.s:108: error: (Elimit_reached): Over 20 errors detected. Aborting. A fatal error was detected while assembling the patch. Assembling aborted. Your ROM has not been modified. We are missing some code. There are defines that asar can't find. If you manage to convince them to take a look at this thread that would probably be easiest. Yeah, I've already told him to check out the thread and given him the link. Dunno if he'll come in though. Link to comment Share on other sites More sharing options...
Kirk_Johnston Posted August 5, 2023 Author Share Posted August 5, 2023 (edited) On 5/29/2023 at 11:12 AM, Kirk_Johnston said: And another little test using Mode 3 or Mode 4: The description should tell you the rest. Because I realised I'd actually used the only half-converted image in the GM concept test build I'd recorded in the footage above, I just wanted to upload the fully-converted version of the image here to show it using the proper 8bpp 256-colours as intended, just so it's clear that either way it still looks basically identical for all meaningful intents and purposes--so close that only plonkers are wasting my time debating it imo--hence why I'm fine with not uploading another video of what amounts to the same thing: It's here now, less anyone else on YouTube tries to pretty much imply I'm just duping people or whatever like TurboXray hardcore PC Engine lover and long-time objector to all things I have to say about, suggest, or do on SNES basically did a moment ago, albeit in a nice a polite manner of course. It's real clear that some people just don't want to allow the SNES to go great things, and certainly not if that means something more impressive than you would see on the likes of Genesis and PC Engine, and I get the impression they will try everything to dismiss its capabilities rather than simply accept it can indeed do some awesome stuff when utilised fully. I mean, seriously, how threatened and desperate does someone need to be to call out the honestly anal tiny differences here rather than just admit that what they're seeing actually looks dang impressive no matter how you cut it. Edited August 5, 2023 by Kirk_Johnston 1 Link to comment Share on other sites More sharing options...
Cris1997XX Posted August 12, 2023 Share Posted August 12, 2023 On 8/6/2023 at 1:02 AM, Kirk_Johnston said: Because I realised I'd actually used the only half-converted image in the GM concept test build I'd recorded in the footage above, I just wanted to upload the fully-converted version of the image here to show it using the proper 8bpp 256-colours as intended, just so it's clear that either way it still looks basically identical for all meaningful intents and purposes--so close that only plonkers are wasting my time debating it imo--hence why I'm fine with not uploading another video of what amounts to the same thing: It's here now, less anyone else on YouTube tries to pretty much imply I'm just duping people or whatever like TurboXray hardcore PC Engine lover and long-time objector to all things I have to say about, suggest, or do on SNES basically did a moment ago, albeit in a nice a polite manner of course. It's real clear that some people just don't want to allow the SNES to go great things, and certainly not if that means something more impressive than you would see on the likes of Genesis and PC Engine, and I get the impression they will try everything to dismiss its capabilities rather than simply accept it can indeed do some awesome stuff when utilised fully. I mean, seriously, how threatened and desperate does someone need to be to call out the honestly anal tiny differences here rather than just admit that what they're seeing actually looks dang impressive no matter how you cut it. I know you're Inceptional, so it's about time you drop this bullshit. As I've already told you on youtube...I get you love the SNES and anything, I think it's a great console too. But if you really want it to have more homebrew, you either re-consider your priorities or you learn how to program. Very few people will bother learning 6502 assembly, so they'd rather work on the Sega Mega Drive or whatever other console with modern support. In that case you'll need to start coding and discover how to make most out of the SNES' hardware. As a wise person once said..."Be the change you wish to see in the world" 1 Link to comment Share on other sites More sharing options...
Recommended Posts