It is currently Tue Oct 23, 2018 1:08 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Fri Jul 08, 2011 5:57 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 753
Location: Shelton, Washington.
Hello, I am doing the Magickit's NESASM to help convert SMBDIS to NESASM, to make a PCE version of SMB!

I almost got everything good and set for the NES version, the only thing preventing me is POINTERS that are using < and >, I wonder how I can bypass these without using hex values for pointers?

EDIT: If anyone made a better assembler that is compatible with ASM6/CA65, yet uses PC-Engine's HuC6280, which is a 65CS02 Variant, Post it here

(and Do NOT Say WLA-DX)

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
PostPosted: Fri Jul 08, 2011 6:13 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10914
Location: Rio de Janeiro - Brazil
Hamtaro126 wrote:
the only thing preventing me is POINTERS that are using < and >, I wonder how I can bypass these without using hex values for pointers?

LOW() and HIGH()?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 08, 2011 6:58 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 753
Location: Shelton, Washington.
Will try that, Thank you again Tokumaru!

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 09, 2011 5:17 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Code:
    lda      #(label%256)
    sta      pointerLo
    lda      #(label/256)
    sta      pointerHi


Quote:
(and Do NOT Say WLA-DX)

If PCEAS is just like NESASM, except for supporting the extra instructions of the HuC6280, then WLA-DX is a better assembler. Whether it's easier to use is a different matter..

Btw: SMB on PC-E. Dunno what the hell they did with the music. I guess they didn't have proper info on how the NES APU works.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 09, 2011 9:14 am 
Offline
User avatar

Joined: Sun Dec 12, 2010 10:27 pm
Posts: 324
Location: Hong Kong
I'm not sure, but I think the video was taken from the European (pirate) compilation PCE ROM. One problem with that conversion was that they're using a 50Hz PAL ROM, so the speed of the game (including the music) would be too fast. (AFAIK there was never a "50Hz" PAL PCE. The European TG16s were the same but included some circuit to convert the output signal to PAL50, so that games need not be reprogrammed for the PAL regions.)

For FC-PCE conversions, Tom had already done some awesome works on it (including SMB of course) and Rockman indeed played great!

Edit: The great thing is, he's included the sources and they're very educational. The way he mapped scratchpad RAM to both MPR 0 and 1 amazed me (I was wondering how he solved that Zero/Stack pages relocation problem without extensive patching before looking at the sources.)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 09, 2011 11:05 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Quote:
I'm not sure, but I think the video was taken from the European (pirate) compilation PCE ROM. One problem with that conversion was that they're using a 50Hz PAL ROM, so the speed of the game (including the music) would be too fast.

Well, the tempo is obviously too high. But I was referring mainly to the waveforms they used. (At least) one of the channels sounds completely wrong.

Quote:
For FC-PCE conversions,Tom had already done some awesome works on it (including SMB of course) and Rockman indeed played great!

Yup, he's done some really cool ports.

Quote:
The way he mapped scratchpad RAM to both MPR 0 and 1 amazed me.

The NSF player I wrote for the Turbografx maps MPR 0, 1, 2 and 3 to the WorkRAM so that the NSF playback code can access ZP RAM, normal RAM, SRAM and the NES APU I/O regs all at once. There are a few songs for which this causes problems, so the best thing is to have a console/cart with BRAM and map MPR 2 to it.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 09, 2011 11:52 am 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 753
Location: Shelton, Washington.
mic_ wrote:
Code:
    lda      #(label%256)
    sta      pointerLo
    lda      #(label/256)
    sta      pointerHi


Will also try this.

mic_ wrote:
If PCEAS is just like NESASM, except for supporting the extra instructions of the HuC6280, then WLA-DX is a better assembler. Whether it's easier to use is a different matter.


WLA DX is not that easy. Examples are differences in Syntax, You'd have to redo everything to make it work,

Examples are the .B/.W for opcodes, The linker is also what put most of us off, according to most members living with CA65/ASM6 syntax.

EDIT: LDY Labelname,x does not work, whereas in other assemblers, work fine, I have to substitute it with a .DB!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 09, 2011 8:46 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
mic_ wrote:
The NSF player I wrote for the Turbografx maps MPR 0, 1, 2 and 3 to the WorkRAM so that the NSF playback code can access ZP RAM, normal RAM, SRAM and the NES APU I/O regs all at once. There are a few songs for which this causes problems, so the best thing is to have a console/cart with BRAM and map MPR 2 to it.


BRAM needs to be accessed in slow cpu mode, else you run the chance of corrupt data. The fastest SRAM chip I've seen used for BRAM was 150ns (of the systems I've taken apart). Others are slower. But even at 150ns, you're pushing your luck. Populous is the only game hucard that has extra ram (32k sram). But that limits you to 4megabit rom on the flash card (mednafen doesn't care and will map rom after the SRAM address).

Quote:
If PCEAS is just like NESASM, except for supporting the extra instructions of the HuC6280, then WLA-DX is a better assembler. Whether it's easier to use is a different matter.


There are a number of things that PCEAS does better than WLA-DX, but it's been so long that I don't remember what they were. But it was a significant difference for me to switch back to PCEAS. MooZ also switched over from WLA-DX after running into a number of problems where he couldn't replicate that of PCEAS for special code setups.

Hamtaro126: Are you working with a table of pointers? Or just working with both? Low() and high() work fine, it's a pain if you have to type that out in tables. I modified PCEAS for .dbl and .dbh directives specifically for this, but it's not an official release.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 09, 2011 10:18 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 753
Location: Shelton, Washington.
tomaitheous wrote:
Hamtaro126: Are you working with a table of pointers? Or just working with both? Low() and high() work fine, it's a pain if you have to type that out in tables. I modified PCEAS for .dbl and .dbh directives specifically for this, but it's not an official release.


Yes, It uses < and > for pointers!

Can you give me both Binaries and Source? I'd like to replace my current version of PCEAS with that,

I might also add the DBL and DBH support to my NESASM!

Can I release them in my releases? The source packs are gonna be enhanced along the line.

My plan was to extend it with JJ and Jeff (or Ken Chan and Kato Chan) Music, But Midis are not happening, so PCE conversion seems to be an answer!

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 10, 2011 3:11 am 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
Ok, here are the links (use them at your own risk):

http://www.pcedev.net/pceas/bin/pceas_w32_07_10_2011.7z (binary)
http://www.pcedev.net/pceas/src/PCEAS_src_07_10_2011.7z (source)

Also, I didn't fix all the bugs in PCEAS. There's a bug with .DATA define. But just ignore it and don't use .DATA. It's a useless directive in PCEAS because you can include data (binary) anywhere inside of '.code" areas. Just start off with .code in your main asm file and be done with it. The only time you would need to define .code again, is if you used .ZP or .BSS or (and I think .RS is ok) since they have their own bank and counter define. I.e. if you have a library file with its defined variables using those directives, make sure to use .code afterwards in that file you're including.

I included an asm source file in the binary build to explain some of the new changes. Read the text comments.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Drakim 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