It is currently Wed Dec 13, 2017 5:44 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Jul 28, 2011 1:15 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
PCE related (who would have guessed? :P) I upgraded MMC1 emulation for me NES2PCE projects, to support dynamic changing/updating of the tilemap mirror layout. Now supports H or V or single screen. And thus, I've started work on Megaman 2 for PCE, and have plans for Metroid soon.

Does Megaman 2 use more APU 'features' than Megaman 1? 'Cause I need to upgrade the APU emulation and something desirable to work with/on. I can't wait to be playing MM2 on PCE :D


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2011 3:35 pm 
Offline

Joined: Sun Mar 19, 2006 9:44 pm
Posts: 924
Location: Japan
Cool stuff. Any plans on doing tile colour boosting on any of your PCE projects?

MM2 uses the same short-period noise channel effect in its music, just as MM1 did. I think they use the same (similar) music drivers anyway, since neither of them turns off the frequency sweep registers upon startup.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2011 4:23 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
Quote:
Any plans on doing tile colour boosting on any of your PCE projects?


Yes, actually. Both tiles and sprites. And palettes too:

http://www.pcedev.net/nes2pce/mm/mm_sprite2.PNG

Code:
    NES OAM attribyte byte:
   
          76543210
          ||||||||
          ||||||++- Palette (4 to 7) of sprite
          |||+++--- Extended
          ||+------ Priority (0: in front of background; 1: behind background)
          |+------- Flip sprite horizontally
          +-------- Flip sprite vertically
         
          Extended:
                  D2 = High palette bit
                  D4-D3: Sprite size
                        00b = 8x8   NES flipping based on 8x8
                        00b = 16x16 Native PCE flipping  (if upper palette bit set)
                        01b = 32x16 Native PCE flipping
                        10b = 16x32 Native PCE flipping
                        11b = 32x32 Native PCE flipping


I extended the functionality of the NES OAM table to include some PCE support. Makes it easier to hack the original game routines/code. In the MM1 example, I only started upgrading Megaman sprites (32x32, 15 color frames). I was also adding some 'dma' like modes (just subroutines) that would copy the extra pixel information to the extended bit planes or normally unused palette data entries. I figured, keep it like it's add on feature of the NES - keeping the PCE layer invisible. I dunno. I figured it would be easier if anyone else was going to change such maps/tiles/sprites.

Note: Using any of the upper palette slots results in the sprite flipping to be based on a 16x16 sprite cell, not 8x8 (which normally get's offsets added to get flipped correctly since PCE doesn't support 8x8 sprite cells).


Top
 Profile  
 
PostPosted: Thu Jul 28, 2011 6:34 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 748
Location: Shelton, Washington.
I can't even use NESASM or PCEAS without trouble and compatibility issues,

What about making a ASM6-compatible PCE assembler and upgrading your PCE Projects, That would make it so you can use SMBDIS as an upgrade!

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 29, 2011 1:41 pm 
Offline
Formerly 65024U

Joined: Sat Mar 27, 2010 12:57 pm
Posts: 2257
Well if you use NESASM3 your problems will be solved, as it's pretty good to me. No errors that I know of....

But anyway, very cool project! I dunno if I like the new MM sprite, but it's okay I guess. Good luck!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 29, 2011 2:12 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 748
Location: Shelton, Washington.
3gengames wrote:
Well if you use NESASM3 your problems will be solved, as it's pretty good to me. No errors that I know of....

But anyway, very cool project! I dunno if I like the new MM sprite, but it's okay I guess. Good luck!


But then... There is no PCEAS version for NESASM3, What Files do I need to put in to make it PCEAS Compatible?

I am still terrible at C/CPP stuff, so I dunno...

Tom: I would like to have your source of the example code, I am also porting SMB2 to MMC1-Compatible with CHR-RAM, so for PCE, This will be a good chance to do my old hack again!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 29, 2011 11:20 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
Quote:
I can't even use NESASM or PCEAS without trouble and compatibility issues,

What about making a ASM6-compatible PCE assembler and upgrading your PCE Projects, That would make it so you can use SMBDIS as an upgrade!


I use specific PCE opcodes and address modes that the 6502 just doesn't have, to get a little more speed from the backend/emulation library. I could have written the emulation code in pure 6502 for the PCE and used pretty much any compatible assembler, but there isn't any advantage in doing that - that I can see. PCEAS works fine for me and others in the scene, so I have no plans make or use another PCE/TG16 assembler. For the time it takes to write a "better" assembler, and from scratch no less, I could be doing something else that's more enjoyable to work on ;)


I hope you don't missunderstand, I have no source code for Megaman or any of these projects. I'm just simply assembling over the original binary to convert the port read/writes to JSRs. The emulation itself is source code, but that's irrelevant. The game code has no idea it exists and thinks it running on the original platform. It's not like using the SMB 1 source code to rebuild the game for PCE. It's nothing like that at all.

And in that respect, you can hack the rom as if it were on the NES platform. Well, taking into account there's 16k of code/data at the beginning of the binary that now offsets the rom by that much. And that's why I making the 'upgrades' as a layer that would be part of the NES. As best I can. So on a hacking level, it would be more like hacking an NES game rather than writing specific PCE code and specific pce hardware interfacing (which a NES asm hacker probably isn't really familiar with). It doesn't give you full access to the PCE hardware/advantages. If that's what someone needs, then they need to write the game (engine/simulator) from scratch. That's not to say you can't at least have some nice benefits though. I have a build of Megaman that has hooks for the music routine, and plays Red Book audio instead. Sound FX still PSG, but I had planned on adding ADPCM support for them too.

Quote:
But anyway, very cool project! I dunno if I like the new MM sprite, but it's okay I guess. Good luck!


Thanks :) The MM sprite was just a place holder to show off the extra colors in a sprite. I had all the megaman sprite frames converted to 32x32 cells, but they were still the original colors/pixels. I needed something to show off something that wasn't quite obvious from those cells.

Quote:
But then... There is no PCEAS version for NESASM3, What Files do I need to put in to make it PCEAS Compatible?


I'm a bit confused. What do you need from NESASM3 in order to write PCE code, that makes PCEAS not a choice/option?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 30, 2011 6:57 am 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 748
Location: Shelton, Washington.
Still, PCE Opcodes are allowed, Just there is not much assemblers

None of them are that compatible with ASM6 or CA65. That is what the problem is today with the two availible syntax-wise, (PCEAS and WLADX)

I tried doing so, but I could not do C/C++! I may ask QBRADQ or the creator of CA65 to fix it up!

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 30, 2011 8:25 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3487
Location: Indianapolis
A google search indicates that Huc6280 support was added to CA65 almost 6 years ago.
http://www.cc65.org/mailarchive/2005-09/5201.html
http://www.cc65.org/doc/ca65-2.html#ss2.2 (--cpu type)

Always check the docs, the CC65 kit has a lot of features.

BTW that is a very cool NES emulator/porting thing. If anyone writes an NES game and wants to port it with this, I can supply a TG16 card (takes a surface-mount ROM in PLCC package). I designed it a while back, I would need to order more at this point, but would be happy re-order them if it can help someone.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 30, 2011 1:15 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2806
tomaitheous wrote:
I have a build of Megaman that has hooks for the music routine, and plays Red Book audio instead. Sound FX still PSG, but I had planned on adding ADPCM support for them too.


Do you think eventually we might see Mega Man 1 (or 2) with fully enhanced graphics and remixed CD audio? That really would be fantastic to see.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 30, 2011 1:35 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19342
Location: NE Indiana, USA (NTSC)
Mega Man Powered Up for PSP is a huge graphical upgrade to Mega Man 1.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 30, 2011 4:50 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2806
I know. My point was to see what the PC Engine could do for Mega Man. I am a fan of the PCE, an under appreciated system from a great era of gaming.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 31, 2011 8:40 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
MottZilla wrote:
Do you think eventually we might see Mega Man 1 (or 2) with fully enhanced graphics and remixed CD audio? That really would be fantastic to see.


I do. I've thought about this for a while. I have quite a few NES projects like this, but the motivation just really isn't there to do too much with them. But I love MM 1 and 2. Both games are dear to me, so I've decided to give these my focus instead of trying juggle other games too. And enough focus to upgrade these games too. Sprites, tiles, colors, music, fx, etc. I'd love to do a MM 1 and 2 compilation. I've already had some other features in mind. Like 'easy' mode stuff/features for gamers that suck at Megaman <snicker>. :D Saving to bram, etc.

I'm looking for some help, once that is the main focus (it is for Megaman 1 currently, so I could use some for that one).

Hamtaro126L: I'm still confused. What is it about PCEAS that prevents you from using it? Or liking it?

Memblers: What about thin PCBs like that of the original turbo chips? The plastic itself is deep enough for surface mount rom. And in fact the SCD system card just has stock surface mount ram for memory chips. I just need to find a place that can not only mold and provide me a plastic casing - but also to be able to print something on it (unless decals are easier).


Quote:
Mega Man Powered Up for PSP is a huge graphical upgrade to Mega Man 1.


I played the hell out of that (and the megaman x remake for the psp too). But this is just... different. I dunno. Having the original game engine still intact and running is just awesome :D I guess it would be easier to just do this on a PC, but where's the fun in that? Retro console coding is where it's at.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 31, 2011 9:14 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 748
Location: Shelton, Washington.
tomaitheous wrote:
Hamtaro126L: I'm still confused. What is it about PCEAS that prevents you from using it? Or liking it?


Well the Syntax is not that good right now, if I use your PCEAS:

the BANK problem is not fixed, it is still in the 8k limit, at least for source files!

Opcode B4 (LDY NameofLabel,X) is not availible? Wow!

NESASM v3.1 fixed these issues, so maybe a new version of your PCEAS can implent these?

Even then, Macros are hard to come by for this. so maybe making sure there is a new macro library for PCEAS soon, so maybe it can be more easier for homebrewers or hackers to implent thier NES games/hacks to PCE, or even thier own PCE homebrews!

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 31, 2011 9:51 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
Hamtaro126 wrote:
tomaitheous wrote:
Hamtaro126L: I'm still confused. What is it about PCEAS that prevents you from using it? Or liking it?


Well the Syntax is not that good right now, if I use your PCEAS:

the BANK problem is not fixed, it is still in the 8k limit, at least for source files!

Opcode B4 (LDY NameofLabel,X) is not availible? Wow!

NESASM v3.1 fixed these issues, so maybe a new version of your PCEAS can implent these?

Even then, Macros are hard to come by for this. so maybe making sure there is a new macro library for PCEAS soon, so maybe it can be more easier for homebrewers or hackers to implent thier NES games/hacks to PCE, or even thier own PCE homebrews!


Opcode $B4 assembles just fine.

I think you're just not familiar enough PCEAS. All ZP addressing modes that are not indirect, need the "<" operator preceding the address or label. LDY <label,x or LDY <$00,x etc. The only time you don't need it, is when you use an indirect mode. lda [label] or lda [$00].

The problem with bank issue with PCEAS isn't that you can't write more than 8k of code, it's that it errors out if an opcode crosses a page boundary. If you're writing code from scratch, it's pretty easy to fix/over come. But yeah, if you're porting code then it can be a potential pain in the ass. But the new PCEAS source and binary I release/posted fixes this:

http://www.pcedev.net/pceas/bin/pceas_w32_07_10_2011.7z
http://www.pcedev.net/pceas/src/PCEAS_src_07_10_2011.7z

Like I mentioned in the other thread, it has some new directives as well.

The high level logic in PCEAS is pretty good IMO. Any kind of high level math that any other good assembler has support for. The MACRO support in PCEAS is top notch too. I've seen too many assemblers with poor or lacking macro support. No good.

I guess I should do a real manual for PCEAS, since there really isn't anything out there for it. It took me a while to figure out how to use SIZEOF() correctly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group