RevEng Posted October 23, 2022 Share Posted October 23, 2022 33 minutes ago, splendidnut said: Wouldn't you want to use (data & 0x30) and (data & 0x03) for the IF conditions? Because, unless I'm mistaken, Color data (in 160B) uses the values of 0,4,8,C for the transparent pixels... so long as the bottom two bits aren't 0, the value in lineRAM should be overwritten. Yep, good point! Well spotted. 1 Quote Link to comment Share on other sites More sharing options...
+wavemotion Posted October 23, 2022 Author Share Posted October 23, 2022 You guys are some of the finest people to grace the planet! 8 1 Quote Link to comment Share on other sites More sharing options...
RevEng Posted October 23, 2022 Share Posted October 23, 2022 Excellent! Good job all around, folks! 2 1 Quote Link to comment Share on other sites More sharing options...
+wavemotion Posted October 23, 2022 Author Share Posted October 23, 2022 (edited) My code is quite a bit modified from the original ProSystem... but in case someone comes looking for the answer and doesn't have time to work through the 2 pages of thought process... The original ProSystem 1.3g or the Wii port has this as the "wide" (not sure why they call it that) or "write mode" version of StoreCell. The highlight is not correct... I think it should just be looking at the low for the 160B mode (which, for this original ProSystem code is the lower 2 bits shifted into position by the caller... also can't stand the use of decimal masking so for the love of all that is good please hexify those for future generations!) // ---------------------------------------------------------------------------- // StoreCell // ---------------------------------------------------------------------------- static inline void maria_StoreCell(byte high, byte low) { if(maria_horizontal < MARIA_LINERAM_SIZE) { if(low || high) { maria_lineRAM[maria_horizontal] = maria_palette & 16 | high | low; } else { byte kmode = memory_ram[CTRL] & 4; if(kmode) { maria_lineRAM[maria_horizontal] = 0; } } } maria_horizontal++; } Edited October 23, 2022 by llabnip 5 Quote Link to comment Share on other sites More sharing options...
RevEng Posted October 23, 2022 Share Posted October 23, 2022 5 minutes ago, llabnip said: [...] also can't stand the use of decimal masking so for the love of all that is good please hexify those for future generations! [...] You'll get no arguments here. 3 Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted October 23, 2022 Share Posted October 23, 2022 4 hours ago, RevEng said: Palette 0 for 160B really means P0+P1+P2+P3. Oh, I thought you were saying the Robber uses just P0C1, P0C2, P0C3. Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted October 23, 2022 Share Posted October 23, 2022 41 minutes ago, RevEng said: You'll get no arguments here. Honestly, BINARY and's are the best though if you are working on 8 or 16 bit systems. 3 Quote Link to comment Share on other sites More sharing options...
RevEng Posted October 23, 2022 Share Posted October 23, 2022 59 minutes ago, Ecernosoft said: Honestly, BINARY and's are the best though if you are working on 8 or 16 bit systems. Sure, but C and most of it's descendant languages don't support binary literal values, so that's not possible here. 2 Quote Link to comment Share on other sites More sharing options...
+splendidnut Posted October 23, 2022 Share Posted October 23, 2022 Whatever works in a given situation is what's best. No need for a religious war over number systems. I could argue that y'all should be using named CONSTANTS in these situations.... but I really don't see anyone complaining about these 'magic numbers'... so I must be in the minority. 1 4 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted October 23, 2022 Share Posted October 23, 2022 @RevEng Mike, thanks for the insights @llabnip Thanks for updating your emulator for Koppers, I do use it when I'm travelling to tinker with 7800 stuff (and of course play Pokemon!) 3 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted October 23, 2022 Share Posted October 23, 2022 39 minutes ago, RevEng said: Sure, but C and most of it's descendant languages don't support binary literal values, so that's not possible here. I would also avoid binary constants for portability purposes, but FWIW GNU compilers support 0b notation for binary constants. 2 Quote Link to comment Share on other sites More sharing options...
RevEng Posted October 23, 2022 Share Posted October 23, 2022 2 minutes ago, Karl G said: I would also avoid binary constants for portability purposes, but FWIW GNU compilers support 0b notation for binary constants. Yeah, it's there in a few compilers unofficially, and in C++14 officially. 2 Quote Link to comment Share on other sites More sharing options...
+wavemotion Posted October 23, 2022 Author Share Posted October 23, 2022 17 minutes ago, Muddyfunster said: @llabnip Thanks for updating your emulator for Koppers, I do use it when I'm travelling to tinker with 7800 stuff (and of course play Pokemon!) Cool! This is actually the highlight of this thread for me! I also fixed the Pokey sound in E.X.O. and added a bunch of user configuration so future homebrews can be tweaked to run right. The new build is up at https://github.com/wavemotion-dave/A7800DS 3 1 Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted October 23, 2022 Share Posted October 23, 2022 1 hour ago, RevEng said: Sure, but C and most of it's descendant languages don't support binary literal values, so that's not possible here. Oh. Bummer. Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted October 23, 2022 Share Posted October 23, 2022 Just installed 3.7. Plays great 4 Quote Link to comment Share on other sites More sharing options...
+wavemotion Posted October 24, 2022 Author Share Posted October 24, 2022 11 hours ago, Muddyfunster said: Just installed 3.7. Plays great Glad to hear! Last night I optimized the memory usage on the DS/DSi and the next release will support 1MB (1024K + 128b header) games. So... um... feel free I've only been able to find one tech demo for a 1MB 7800 rom... Frankie never sounded so sweet! I assume the practical limit of 512k is due to things like the Concerto and similar carts ... obviously that's a HUGE amount of space relatively speaking. 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted October 24, 2022 Share Posted October 24, 2022 4 minutes ago, llabnip said: I assume the practical limit of 512k is due to things like the Concerto and similar carts ... obviously that's a HUGE amount of space relatively speaking I think Dragonfly supports 1024k and I think GD7800 will support at least that. 1 Quote Link to comment Share on other sites More sharing options...
Eagle Posted October 24, 2022 Share Posted October 24, 2022 There’s few 1MB demos for Covox. https://forums.atariage.com/topic/232487-atari-7800-homebrews-and-hacks-thread/#comments 1 Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted October 26, 2022 Share Posted October 26, 2022 On 10/22/2022 at 10:40 PM, RevEng said: For the write-mode graphic modes, you should only be using the top bit of the palette. I'm not that familiar with your source, but I think I have this right... static inline void _maria_StoreCells4(byte data) { if((maria_horizontal) < MARIA_LINERAM_SIZE) { byte *ptr = &(maria_lineRAM[maria_horizontal]); #ifdef KANGAROO_MODE_SUPPORTED if (memory_ram[CTRL] & 4) { if (data & 0x03) *ptr-- = (maria_palette & 0x10) | (data & 0x03); else *ptr-- = 0; data = data >> 2; if (data & 0x03) *ptr-- = (maria_palette & 0x10) | (data & 0x03); else *ptr-- = 0; data = data >> 2; if (data & 0x03) *ptr-- = (maria_palette & 0x10) | (data & 0x03); else *ptr-- = 0; data = data >> 2; if (data) *ptr = (maria_palette & 0x10) | (data); else *ptr = 0; } else #endif { if (data & 0xC0) *ptr++ = (maria_palette & 0x10) | ((data & 0xC0) >> 6); else ptr++; if (data & 0x30) *ptr++ = (maria_palette & 0x10) | ((data & 0x30) >> 4); else ptr++; if (data & 0x0C) *ptr++ = (maria_palette & 0x10) | ((data & 0x0C) >> 2); else ptr++; if (data & 0x03) *ptr++ = (maria_palette & 0x10) | (data & 0x03); } } maria_horizontal += 4; } i.e. all references to "maria_palette" in the original h_maria_StoreCells4() should be "(maria_palette & 0x10)" ...my guess now is the 160B robber object has a palette index that's neither 0 nor 4, but some other number. You check for 8 and 12 right? Those are also transparent. Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted October 26, 2022 Share Posted October 26, 2022 On 10/24/2022 at 7:37 AM, llabnip said: Glad to hear! Last night I optimized the memory usage on the DS/DSi and the next release will support 1MB (1024K + 128b header) games. So... um... feel free I've only been able to find one tech demo for a 1MB 7800 rom... Frankie never sounded so sweet! I assume the practical limit of 512k is due to things like the Concerto and similar carts ... obviously that's a HUGE amount of space relatively speaking. Oh, I see you'vde fixed it. Quote Link to comment Share on other sites More sharing options...
+splendidnut Posted October 26, 2022 Share Posted October 26, 2022 8 minutes ago, Ecernosoft said: You check for 8 and 12 right? Those are also transparent. You missed the boat... Problem is already solved. Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted October 26, 2022 Share Posted October 26, 2022 1 minute ago, splendidnut said: You missed the boat... Problem is already solved. ; Yeah, I know. Quote Link to comment Share on other sites More sharing options...
+splendidnut Posted October 26, 2022 Share Posted October 26, 2022 2 minutes ago, Ecernosoft said: ; Yeah, I know. We posted at the same time. Oh well. Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted October 27, 2022 Share Posted October 27, 2022 @raz0red I think the same "black box" glitch is present in js7800, maybe the fix is similar given the respective roots of the emulator? 4 Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted October 27, 2022 Share Posted October 27, 2022 21 hours ago, splendidnut said: We posted at the same time. Oh well. It's ok. 😃 7 hours ago, Muddyfunster said: @raz0red I think the same "black box" glitch is present in js7800, maybe the fix is similar given the respective roots of the emulator? Well, @raz0red, we have a patch for you to implement! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.