Jump to content
IGNORED

IntyBASIC compiler v1.4.2: reloaded with new features


nanochess

Recommended Posts

I know I'll find out the answer to this by experimentation, but I thought I'd ask ahead of time and save some effort.

 

Does PLAY SIMPLE still play all the ECS channels, leaving only SOUND 2 available, or does it leave SOUND 7 available as well?  Would there then be 6 or 7 arguments for MUSIC?  Same goes for NO DRUMS.  Is it possible to have percussion for one sound chip and not the other?

 

I'm asking because I'm planning to have SOUND 2 be available to play both a tone and noise for a sound effect, while all the other channels and the other percussion are put to use.  Thank you for your time.

Link to comment
Share on other sites

Just noticed in the manual for IntyBASIC v1.4.1 that I did a mistake, I described BITMAP REVERSE, when the right thing is BITMAP INVERSE.

 

The compiler is right, the posts in this thread are right, but only the included manual has this slight mistake.

 

Just heads up. I know that no one ever reads the manuals :P

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

Regarding the PLAY function, does it somehow support having multiple songs and dynamically select which one to play? I see in the manual that label can be a 16-bits array for dynamically generated music but I don't think that is what I am trying to do.

 

Basically I have this code:

song_pointers:

  DATA VARPTR song1(0)
  DATA VARPTR song2(0)
  ...
  DATA VARPTR song9(0)

When I tried to use PLAY song_pointers(x), it would try to read the data at that address as music, not as an indirect pointer. In the mean time, I came up with a workaround:

  #ptr = song_pointers(x)
  ASM MVI var_&PTR,R0
  ASM CALL _play_music

which of course works with minimal overhead. Perhaps this is a use case nobody else would have use of? Not sure what it would be called, PLAY VARPTR?

Edited by carlsson
  • Like 2
Link to comment
Share on other sites

  • 5 months later...
On 6/12/2019 at 2:44 PM, nanochess said:

Update to version 1.4.1, check first post. :)

 

Changes, enhancements and fixes in v1.4.1:

 

o Added BITMAP NORMAL, BITMAP INVERSE and BITMAP MIRROR_X to ease reusing BITMAP statements in Color Stack mode.

o Optimizes POKE to direct address with a single MVO.

o Solved bug in local labels preceded with comma, it required a space.

o Solved bug compiling nn = (varptr sfx2_v(0)-varptr sfx2_n(0))-sfxstep

o Solved bug in MUSIC.PLAYING (relative to new music format)

o Solved bug in music player because new _ntsc interpretation.

o Solved crash bug in drums for ECS side of music player.

Is there an example of the BITMAP NORMAL/INVERSE/MIRROR statements I can try?

Thanks.

 

Link to comment
Share on other sites

@First Spear, it is not any more complex than this:

 

  BITMAP INVERSE

  BITMAP ".oo.oo.."
  BITMAP "ooooooo."
  BITMAP "ooooooo."
  BITMAP "ooooooo."
  BITMAP ".ooooo.."
  BITMAP "..ooo..."
  BITMAP "...o...."
  BITMAP "........"    

  BITMAP NORMAL

  BITMAP "...o...."
  BITMAP "..ooo..."
  BITMAP ".ooooo.."
  BITMAP "ooooooo."
  BITMAP "ooooooo."
  BITMAP "..ooo..."
  BITMAP ".ooooo.."
  BITMAP "........"

 

Basically it allows you to change a pattern at compile time so you can use foreground as background and vice versa. I don't think it is dynamic in any way, so you could flip an already defined GRAM, if that is something you'd want to do.

  • Like 2
Link to comment
Share on other sites

  • 2 months later...
On 8/19/2020 at 11:26 PM, nanochess said:

Just updated IntyBASIC to v1.4.2 in time for the new IntyBASIC 2020 Programming Contest!!! :)

 

 

Damn, just when I thought I quit.  ?

 

*sigh*  Updated IntyBASIC SDK coming out this week-end in time for the contest ...

 

Really, the things you make me do. :P

 

     -dZ.

  • Like 2
Link to comment
Share on other sites

Just in time for the programming contest, I've updated the IntyBASIC SDK to include the latest, bleeding edge IntyBASIC and development tools -- fresh off the oven!

This version includes a new "miniecs.bin" and the tools have been updated to include it automatically when loading the emulator, so you can run your ECS-enabled IntyBASIC.

 

     -dZ.

  • Like 2
Link to comment
Share on other sites

  • 3 months later...

I found a small Intybasic bug that I can't map at $c100. It doesn't show up in the .cfg file.  I used to be able to map data to that segment at $c100 using older version of Intybasic. Small work around is to map at $c200.  I'm not sure if I'm alone with the issue, I'm using the latest Intybasic version.

EDIT: I may be over in segment $A000-$BFFF, so that's why it's not mapping at $C100. 

EDIT2: It been confirmed I was over that segment.  It's now all fixed.

Edited by Kiwi
Running in circle.
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

I am trying to make some math involving VARPTR and DATA but I get errors...

 

Is there a way to define this

 

  DATA VARPTR #roomattr0(0)-8*20
  DATA VARPTR #roomattr1(0)-8*20
  DATA VARPTR #roomattr2(0)-6*20    
 

The expression in normal expressions is valid. Only DATA does not accept it!

Link to comment
Share on other sites

22 minutes ago, artrag said:

I am trying to make some math involving VARPTR and DATA but I get errors...

 

Is there a way to define this

 

  DATA VARPTR #roomattr0(0)-8*20
  DATA VARPTR #roomattr1(0)-8*20
  DATA VARPTR #roomattr2(0)-6*20    
 

The expression in normal expressions is valid. Only DATA does not accept it!

 

Use this:

 

DATA VARPTR #roomattr0(-8*20)

DATA VARPTR #roomattr1(-8*20)

DATA VARPTR #roomattr2(-6*20)

 

  • Like 1
Link to comment
Share on other sites

14 hours ago, Kiwi said:

I want to report a typo in the >>>>>>>>>>>>>>  Real number of variables allowed

It said, "Substract 26 if you use PLAY", but it takes 28 8-bit bytes.  Leaving the total of 200 bytes for the users.

 

 

I've updated the manual in the Git https://github.com/nanochess/IntyBASIC/blob/master/intybasic/manual.txt

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
3 hours ago, First Spear said:

I am trying to put a music gosub inside of a for...next loop to play the same segment 3 times. Has anyone tried to do that? I cannot get it to work.

Thanks.

 

MUSIC GOSUB is only of use inside a MUSIC block, cannot be mixed with IntyBASIC statements.

Link to comment
Share on other sites

You already have MUSIC JUMP, MUSIC GOSUB and MUSIC REPEAT. If you compose your music with a fixed number of repeats, you can unroll those.

 

For added complexity, I can imagine MUSIC QUEUE that would tell the player that once it reaches MUSIC STOP, it should immediately tag onto the next song, but I would imagine it has a rather limited use. You can of course PEEK through the music variables for added features.

 

Up till now, I still don't know anyone who has integrated Arnaud's tracker with IntyBASIC. I imagine me or DZ-Jay are most likely to do that, though the player uses a good amount of 16-bit variables so it could be a tight fit without CC3/JLP extension.

  • Like 1
Link to comment
Share on other sites

Question: is there an efficient way to do a function doing this 


YEvent:procedure	'YEvent(ys,ya)
	' input  ys,ya
	if (ya and 1) then 
		yr = #Interaction(ys*2 + ((ya/2) and 1))/256
	else
		yr = #Interaction(ys*2 + ((ya/2) and 1))and 255
	end if
end

I did this:

 

DEF FN XEvent(s,a)    = (#Interact(s*2 + ((a/2) and 1))/((a and 1)*255 + 1)) and 255

 

but it is way too slow for its purpose

Edited by artrag
Link to comment
Share on other sites

4 hours ago, carlsson said:

You already have MUSIC JUMP, MUSIC GOSUB and MUSIC REPEAT. If you compose your music with a fixed number of repeats, you can unroll those.

 

For added complexity, I can imagine MUSIC QUEUE that would tell the player that once it reaches MUSIC STOP, it should immediately tag onto the next song, but I would imagine it has a rather limited use. You can of course PEEK through the music variables for added features.

 

Up till now, I still don't know anyone who has integrated Arnaud's tracker with IntyBASIC. I imagine me or DZ-Jay are most likely to do that, though the player uses a good amount of 16-bit variables so it could be a tight fit without CC3/JLP extension.

The number of folks that have the mental agility and Inty expertise to do this are fairly low. :) Maybe 4 of you? 5? Anyway, it would be fun to have the extra functionality from Arnauld's tracker, maybe call it MUSIC2 or MUSICA commands? :)

 

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...