It is currently Wed Jun 20, 2018 4:45 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

Do you like it?
Yes 29%  29%  [ 2 ]
No 0%  0%  [ 0 ]
Maybe 43%  43%  [ 3 ]
To make another suggestion 0%  0%  [ 0 ]
If this message cannot be understood 29%  29%  [ 2 ]
Total votes : 7
Author Message
 Post subject: Improved-PPMCK
PostPosted: Sun Jul 22, 2012 10:57 am 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 985
This is improved version of PPMCK. http://zzo38computer.org/nes_program/ppmck.zip (version 2)

New features includes:
  • #MACRO to make assembly macro
  • #CUSTOM-TUNING adjusts tuning tables, including the letters in the scale (which can be "a" to "j" now, not only "a" to "g"), and how many notes in one octave
  • #CUSTOM-NOISE to adjust noise table, to tell which noise is made from each note
  • #RAISE-VRC7 makes the VRC7 pitch higher but less relatively detuned from equal temperament
  • ? at the start of a line adds an assembly code to the output
  • * at the start of a line makes a preprocessor macro, which can be named by one letter, and called in a track or @ definition by * and the same letter
  • Xb set data begin of music
  • Xc call assembly code subroutine during playback
  • Xg branch the music to another point (even before Xb)
  • Xr to return from Xg
  • Xl make a label for use by Xg and by macros and assembly codes
  • Xm call a macro defined by #MACRO
  • ? in a track is a track questioning command
  • ' after a note letter (after - and + if there is any) to make one octave higher note
  • Some of the playback engine codes have been made tail recursion
  • K (transpose) can be used with all tracks
  • It will put "<?>" if #TITLE #COMPOSER #MAKER is not filled in (agrees with .NSF specification)
  • #PROGRAMMER is same as #PROGRAMER (both works same thing)
  • #EX-VRC-VII alias for #EX-VRC7
  • #EX-VRC-VI alias for #EX-VRC6
  • #EX-SUNSOFT5B alias for #EX-FME7
  • #EX-SUN5B alias for #EX-FME7
  • #EX-NAMCO163 alias for #EX-NAMCO106
  • Z is direct write to $4011 same as y$4011

Example of track questioning:
Code:
#EX-VRC7

GHI @@8 o3 t120 l2 v13
G K0
H K4
I K7

*x ?HK4?IK8?.
*+ ?HK4?IK7?.
*- ?HK3?IK7?.
*o ?HK3?IK6?.

; Play eight chords using white piano keys
GHI *+c*-de*+fg*-a*ob*+c'


Last edited by zzo38 on Tue Sep 18, 2012 12:37 am, edited 5 times in total.

Top
 Profile  
 
 Post subject: Re: Improved-PPMCK
PostPosted: Sun Jul 22, 2012 11:59 am 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 751
Location: Shelton, Washington.
Maybe, It shall be a yes under the following terms:

All ASM Routines shall be at least in 4k or less ROM Space at $8000-$BFFF for use as the main program. in case one is to use it in games,

Add a GUI if needed, It makes the features down there easier to control, like _mic's XPMCK.

Let the user select any features needed, So they could shave off some unnessicary routines that are not needed for games!

Add a Sound Effects engine, (see SMWCentral.net's Addmusic v4.05 program, This is what I need)

Less RAM is good for games too, at least keep several ram variables around $0300-$07FF, and about 10-16 (decimal) more zero page variables at $00-$FF

the choice of the RAM range is truly ours to choose that way.

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject: Re: Improved-PPMCK
PostPosted: Sun Jul 22, 2012 5:21 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 985
Hamtaro126 wrote:
Maybe, It shall be a yes under the following terms:

All ASM Routines shall be at least in 4k or less ROM Space at $8000-$BFFF for use as the main program. in case one is to use it in games,
I did not write the engine, although I have modified it. I could be able to make it smaller somewhat, and possibly with some features turned off makes more smaller. (I have not intended it to be used in games, although I don't know if the original author has intended this. Regardless, it is possible to use the data with different engines if you can understand it; you could write the engine to fit with the game, I suppose. The standard engine I have is intended for .NSF but may be usable with games too; I may be able to improve it to that point.)

Hamtaro126 wrote:
Add a GUI if needed, It makes the features down there easier to control, like _mic's XPMCK.
I won't add a GUI (others can add it if they want).

Hamtaro126 wrote:
Let the user select any features needed, So they could shave off some unnessicary routines that are not needed for games!
OK, perhaps they can either be automatically turned off or be activated/deactivated by a #FEATURE command.

Hamtaro126 wrote:
Add a Sound Effects engine, (see SMWCentral.net's Addmusic v4.05 program, This is what I need)
Can you explain it better? I don't know about this Addmusic program. But I can think that for sound effects, you could use channels which is not used by music. It is also possible to poke the memory variables the address for those channels by the address of sound effect for playing if it is not DPCM (if it is DPCM, just access them directly). (If it is .NSF player embedded in different software, rather than NES/Famicom game, then hopefully the player library has a command to poke values into the emulated memory. If it is NES/Famicom game, then the addresses can be set easily of course, you also have .)

Hamtaro126 wrote:
Less RAM is good for games too, at least keep several ram variables around $0300-$07FF, and about 10-16 (decimal) more zero page variables at $00-$FF
OK, I will try this.

Hamtaro126 wrote:
the choice of the RAM range is truly ours to choose that way.
OK

Thanks for the suggestions. If I make changes to the program I will post the information here. I will also post the codes here when ready.

_________________
.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 22, 2012 5:40 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 751
Location: Shelton, Washington.
Sound Effects are usually masked from music, creating effects of sound

on the NES, because people do not usually use expansion because of limits of the Euro and American NESes, only the original Famicom had such expansion hardware for sound!

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 23, 2012 12:42 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 985
I have posted the file now. http://zzo38computer.org/nes_program/ppmck.zip Including some additional features I have listed in the top message.

I have not yet added the feature you have suggested, but may do so later, but I may also accept patches.

_________________
.


Last edited by zzo38 on Tue Sep 18, 2012 12:37 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2012 12:14 pm 
Offline

Joined: Wed Apr 04, 2012 2:15 am
Posts: 24
I believe Jarhmander was in the process of adding some of his own improvements on ppMCK as well. Might be worth a shot communicating with him, see if you guys can team up or something so we don't end up with competing builds of ppMCK!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2012 5:55 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 751
Location: Shelton, Washington.
jrlepage wrote:
I believe Jarhmander was in the process of adding some of his own improvements on ppMCK as well. Might be worth a shot communicating with him, see if you guys can team up or something so we don't end up with competing builds of ppMCK!


Where is Jarhmander, for contact?

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject: Re: Improved-PPMCK
PostPosted: Tue Jul 24, 2012 6:26 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6342
Location: Canada
Hamtaro126 wrote:
All ASM Routines shall be at least in 4k or less ROM Space at $8000-$BFFF for use as the main program. in case one is to use it in games,

...

Let the user select any features needed, So they could shave off some unnessicary routines that are not needed for games!


The assembly source has always been included with PPMCK; removing features is very easy to do, and you can place the code at whatever address you need.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2012 10:49 pm 
Offline

Joined: Wed Apr 04, 2012 2:15 am
Posts: 24
Hamtaro126 wrote:
jrlepage wrote:
I believe Jarhmander was in the process of adding some of his own improvements on ppMCK as well. Might be worth a shot communicating with him, see if you guys can team up or something so we don't end up with competing builds of ppMCK!


Where is Jarhmander, for contact?

Ah, I thought he went by Jarhmander on these forums, my mistake. His profile is here, he is known as ~J-@D!~ on nesdev. :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2012 10:56 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 985
jrlepage wrote:
I believe Jarhmander was in the process of adding some of his own improvements on ppMCK as well. Might be worth a shot communicating with him, see if you guys can team up or something so we don't end up with competing builds of ppMCK!
Thanks for telling me about this. Let's them come on this thread too; perhaps we can combine these ideas with his ideas too.

_________________
.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2012 1:28 am 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 751
Location: Shelton, Washington.
jrlepage wrote:
Ah, I thought he went by Jarhmander on these forums, my mistake. he is known as ~J-@D!~ on nesdev. :)


Thanks.

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2012 9:28 am 
Offline
Formerly ~J-@D!~
User avatar

Joined: Sun Mar 12, 2006 12:36 am
Posts: 446
Location: Rive nord de Montréal
Thank jrlepage for the clarification: "~J-@D!~" and "Jarhmander" refer to the same guy (me). On #nesdev I'm "Jarhmnder" due to restrictions on the lenght of the account name

I already answered to zzo38's private message, but now that I have a bit of time I post a better answer here: yes I did some minor improvements on ppMCK. Here's what I did:

-Fixed some engrish in error messages
-Added "#EX-VRC-VII" : alias for "#EX-VRC7"
-Added "#EX-VRC-VI" : alias for "#EX-VRC6"
-Added "#EX-SUNSOFT5B" and "#EX-SUN5B" : alias for "#EX-FME7"
-Added "#EX-NAMCO163" : alias for "#EX-NAMCO106"
-Added MN<num> for XYZ tracks : it's like M<num> (Sunsoft 5B hardware speed) but produce tuned notes at NTSC speed.
-Added Z<num> : direct write to $4011 (like in FamiTracker)
-Added Y<num> : sample offset (like in FamiTracker, though because I never used the Y command in FamiTracker, I don't know if it does the exact same thing)
-Added @@<num> support for XYZ tracks, but results are not yet satisfying because of how the ppMCK driver handles the noise mode with notes.
-Added a weird hack (special looped mode) in DPCM code.

As you can see, they are rather simple improvements, if not simply "mods". The "weird hack" is only a change of the meaning of "IRQ DPCM mode" : it plays the sample in looped mode, but then immediately rewrite $4012 and $4013 with the last two bytes of the sample (added to that purpose) to change the loop points in the sound. Works on real hardware, but is likely not useful to anybody else. I can explain it more and post a demo of it in action when I have the time.

I'll come back with this when I finish my final exams and my project for the project course.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2012 1:05 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 985
~J-@D!~ wrote:
I already answered to zzo38's private message, but now that I have a bit of time I post a better answer here: yes I did some minor improvements on ppMCK. Here's what I did:....
OK, I have added these aliases and the Z command to my version too. The others I do not entirely understand.

Thank you for information.

_________________
.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2012 2:18 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6342
Location: Canada
~J-@D!~, on the subject of a loop point for DPCM samples, do you need to use an IRQ? Can you just rewrite $4012/4013 with the loop points immediately after starting playback?

I haven't tested this on hardware, but I would kind of expect that the hardware doesn't read the $4012/4013 register values except when starting playback or restarting the loop.

Or... were you saying that this does work, and you had replaced PPMCK's DPCM IRQ feature with it as a hack?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2012 3:31 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4050
rainwarrior wrote:
~J-@D!~, on the subject of a loop point for DPCM samples, do you need to use an IRQ? Can you just rewrite $4012/4013 with the loop points immediately after starting playback?

I haven't tested this on hardware, but I would kind of expect that the hardware doesn't read the $4012/4013 register values except when starting playback or restarting the loop.

Or... were you saying that this does work, and you had replaced PPMCK's DPCM IRQ feature with it as a hack?


If you try to change the loop point immediately, it may fail if there is a byte sitting in the DMC buffer. But it's safe to write the loop points one frame later. Need to wait for the remaining sample byte to drain, which can take up to 3500 CPU cycles.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


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