First Spear Posted January 29, 2015 Share Posted January 29, 2015 I am enjoying this a lot. I am looking for a way to make the music volume much lower than the sound effects, how should I set that? Thanks. Hi everyone. [snip] Edit: (Jan/25/2015) More enhancements for IntyBASIC v1.0.2 [snip] Quote Link to comment Share on other sites More sharing options...
+nanochess Posted January 29, 2015 Author Share Posted January 29, 2015 I was thinking about other platforms where it can be faster to act based on the existence/absence of something in a collection, I was wondering if in IntyBASIC something similar exists. I didn't have any sample code, just something I was thinking about. Not a big deal and I am even having a hard time thinking through how to phrase the question, actually... No, there doesn't exist these kinds of "higher-level" abstractions. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted January 29, 2015 Author Share Posted January 29, 2015 I am enjoying this a lot. I am looking for a way to make the music volume much lower than the sound effects, how should I set that? Thanks. Only editing the volume levels for instruments in intybasic_epilogue.asm, search for bass_volume, piano_volume, flute_volume and clarinet_volume. Quote Link to comment Share on other sites More sharing options...
First Spear Posted January 29, 2015 Share Posted January 29, 2015 I see the sections, but don't understand how to make the volume lower. ; ; Generates a piano ; R3 = Frequency ; R1 = Waveform position ; ; Output: ; R3 = Frequency. ; R1 = Volume. ; _piano_instrument: PROC ADDI #_piano_volume,R1 MVI@ R1,R1 JR R5 ENDP _piano_volume: PROC DECLE 14,13,13,12,12,11,11,10 DECLE 10,9,9,8,8,7,7,6 DECLE 6,6,7,7,6,6,5,5 ENDP Thanks. Only editing the volume levels for instruments in intybasic_epilogue.asm, search for bass_volume, piano_volume, flute_volume and clarinet_volume. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted January 29, 2015 Author Share Posted January 29, 2015 I see the sections, but don't understand how to make the volume lower. ; ; Generates a piano ; R3 = Frequency ; R1 = Waveform position ; ; Output: ; R3 = Frequency. ; R1 = Volume. ; _piano_instrument: PROC ADDI #_piano_volume,R1 MVI@ R1,R1 JR R5 ENDP _piano_volume: PROC DECLE 14,13,13,12,12,11,11,10 DECLE 10,9,9,8,8,7,7,6 DECLE 6,6,7,7,6,6,5,5 ENDP Thanks. The numbers after DECLE, reduce these, 15 is higher volume and 0 is lower volume. Just reduce these by 2 or 3, it should be enough. 1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted January 30, 2015 Share Posted January 30, 2015 I'd just thought to post this here: I found this in an Ars Technica article, which mentions our very own nanochess, in an article about the smallest chess program ever made, which broke a 32 year-old record. Alas, that wasn't nanochess'. Cool, mate, you're famous! -dZ. 5 Quote Link to comment Share on other sites More sharing options...
catsfolly Posted January 30, 2015 Share Posted January 30, 2015 I'd just thought to post this here: I found this in an Ars Technica article, which mentions our very own nanochess, in an article about the smallest chess program ever made, which broke a 32 year-old record. Alas, that wasn't nanochess'. Cool, mate, you're famous! -dZ. Somewhere I have a listing of the KIM-1 chess prpgram, which fit into and ran in the 1k ram KIM-1 system. I'm impressed that this new program is half the size. Unlike these tiny programs, I think Nanochess' Chess game actually plays a good game... 2 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted January 30, 2015 Author Share Posted January 30, 2015 I'd just thought to post this here: I found this in an Ars Technica article, which mentions our very own nanochess, in an article about the smallest chess program ever made, which broke a 32 year-old record. Alas, that wasn't nanochess'. Cool, mate, you're famous! -dZ. Thanks! I was busy making a program better and smaller in 481 bytes http://nanochess.org/chess6.html 3 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted January 30, 2015 Share Posted January 30, 2015 Wow! Awesome, Oscar! -dZ. 1 Quote Link to comment Share on other sites More sharing options...
First Spear Posted February 1, 2015 Share Posted February 1, 2015 I am trying to understand the relationship between the music notation and PLAY SIMPLE vs PLAY FULL. In the manual.txt, it shows at line 643 MUSIC F4,A4#,C5 MUSIC S,S,S MUSIC -,-,- This appears to mean that there are 3 voices of music playing. But at line 414 SOUND 0,[VALUE 12 bits],[VOL 0-15] Channel A SOUND 1,[VALUE 12 bits],[VOL 0-15] Channel B SOUND 2,[VALUE 12 bits],[VOL 0-15] Channel C SOUND 3,[VALUE 16 bits],[TYPE 0-15] Volume envolvent (frequency/shape) SOUND 4,[NOISE 6 bits],[MIX] Noise and mix register ($38 value by default) I want to have background music as well as sound effects. If PLAY SIMPLE is running the song with 3 voices playing, doesn't that use SOUND channels 0 and 1 and 2, making sound effects impossible? If I have a game with sound effects and background music, should my notation only have two notes on every line? Thanks. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted February 1, 2015 Author Share Posted February 1, 2015 I am trying to understand the relationship between the music notation and PLAY SIMPLE vs PLAY FULL. In the manual.txt, it shows at line 643 MUSIC F4,A4#,C5 MUSIC S,S,S MUSIC -,-,-This appears to mean that there are 3 voices of music playing. But at line 414 SOUND 0,[VALUE 12 bits],[VOL 0-15] Channel A SOUND 1,[VALUE 12 bits],[VOL 0-15] Channel B SOUND 2,[VALUE 12 bits],[VOL 0-15] Channel C SOUND 3,[VALUE 16 bits],[TYPE 0-15] Volume envolvent (frequency/shape) SOUND 4,[NOISE 6 bits],[MIX] Noise and mix register ($38 value by default) I want to have background music as well as sound effects. If PLAY SIMPLE is running the song with 3 voices playing, doesn't that use SOUND channels 0 and 1 and 2, making sound effects impossible? If I have a game with sound effects and background music, should my notation only have two notes on every line? Thanks. The MUSIC statement always allows for three notes and one drum indicator, this doesn't change if you use PLAY SIMPLE or FULL. The tracker will still process the three notes BUT for PLAY SIMPLE it will not update the channel C, this means you can put out your sound effects using SOUND 2, also you can mix an volume envolvent using SOUND 3. Another advantage is that you can switch to PLAY FULL if you're not going to use sound effects. 1 Quote Link to comment Share on other sites More sharing options...
First Spear Posted February 1, 2015 Share Posted February 1, 2015 Can you explain a bit more about, or show an example using SOUND 3 and music and sound effects? Thanks. [snip] also you can mix an volume envolvent using SOUND 3.[snip] Quote Link to comment Share on other sites More sharing options...
+nanochess Posted February 1, 2015 Author Share Posted February 1, 2015 Can you explain a bit more about, or show an example using SOUND 3 and music and sound effects? Thanks. Try this: SOUND 2,1000,48 SOUND 3,500,9 loop: GOTO loop And change the 500 in SOUND 3 for different volume frequencies, note how low volumes appear to create instruments. The number 9 can be checked in PSG manual. Check the links in IntyBASIC manual. 1 Quote Link to comment Share on other sites More sharing options...
freewheel Posted February 4, 2015 Share Posted February 4, 2015 Can you explain a bit more about, or show an example using SOUND 3 and music and sound effects? Thanks. http://spatula-city.org/~im14u2c/intv/jzintv-1.0-beta3/doc/programming/psg.txt The very bottom section explains the envelope generator and how it works. It's one of those things you just kinda have to experiment with (A LOT), to get a feel for it. In simple terms, it allows you to easily make repeating/oscillating/vibrating sounds (one good example is the beat of a helicopter's blades), or rapidly climbing/descending notes. Keep changing the values in SOUND 3,X,Y and you'll see what I mean. X controls period and Y controls shape. This is one of the big reasons I made a button-controllable sound program - so that I could quickly change these values and see what effect they had on the final sound output. The ASCII waveform diagrams at the bottom really helped nail it for me. Basically it's all variations on 2 basic waveforms. 2 Quote Link to comment Share on other sites More sharing options...
First Spear Posted February 5, 2015 Share Posted February 5, 2015 How does SCREEN work? I have this (CS mode) background defined in my program, created and copy+pasted from IntyMapper. These are shapes from GROM. myscreen1: data $02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9 data $02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9 data $02F9,$02F9,$02FC,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9 data $02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$22F9,$02F9 data $02F9,$02FC,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02F9,$02FD,$02FD,$02FD,$02F9,$02F9,$02F9,$02F9,$02F9,$22F9 data $02F9,$02F9,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02F9,$02F9,$02FD,$02FD,$02FD,$02F9,$02F9,$02F9,$02F9,$22F9 data $0000,$0000,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02FD,$02F9,$02F9,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000 data $0000,$0000,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000 data $02FC,$02FC,$02FC,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000 data $02FC,$02FC,$02FC,$02FC,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000 data $0000,$0000,$02FD,$02FD,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000,$0000 data $0000,$0000,$0000,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000,$0000,$0000 data $0000,$0000,$0000,$0000,$0000,$0000,$0000,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$0000,$0000,$0000,$0000,$0000,$0000,$0000 data $0000,$0000,$0000,$0000,$0000,$0000,$0000,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000,$0000,$0000 As far as I can tell, there are 240 tiles defined there. The SCREEN command takes an "origin_offset" from 0-199 and a "target_offset" of 0-199. I don't understand how the offsets are used, and what the difference is between origin and target. Can someone share examples/clues? Thanks. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted February 5, 2015 Author Share Posted February 5, 2015 How does SCREEN work? I have this (CS mode) background defined in my program, created and copy+pasted from IntyMapper. These are shapes from GROM. myscreen1: data $02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9 data $02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9 data $02F9,$02F9,$02FC,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9 data $02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$02F9,$22F9,$02F9 data $02F9,$02FC,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02F9,$02FD,$02FD,$02FD,$02F9,$02F9,$02F9,$02F9,$02F9,$22F9 data $02F9,$02F9,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02F9,$02F9,$02FD,$02FD,$02FD,$02F9,$02F9,$02F9,$02F9,$22F9 data $0000,$0000,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02FD,$02F9,$02F9,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000 data $0000,$0000,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000 data $02FC,$02FC,$02FC,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000 data $02FC,$02FC,$02FC,$02FC,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000 data $0000,$0000,$02FD,$02FD,$02FC,$02FC,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000,$0000 data $0000,$0000,$0000,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000,$0000,$0000 data $0000,$0000,$0000,$0000,$0000,$0000,$0000,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$0000,$0000,$0000,$0000,$0000,$0000,$0000 data $0000,$0000,$0000,$0000,$0000,$0000,$0000,$02FD,$02FD,$02FD data $02FD,$02FD,$02FD,$02FD,$0000,$0000,$0000,$0000,$0000,$0000 As far as I can tell, there are 240 tiles defined there. The SCREEN command takes an "origin_offset" from 0-199 and a "target_offset" of 0-199. I don't understand how the offsets are used, and what the difference is between origin and target. Can someone share examples/clues? Thanks. Let us see SCREEN as a copy of one rectangle for the source (or origin) to the target (the screen) From the start SCREEN was designed to copy a full screen saved in your program to the real screen in order to save countless PRINT statements. Then I added the origin offset, target offset and size in rows/cols. Technically when you use SCREEN without arguments: SCREEN my_screenYou're doing really this: SCREEN my_screen,0,0,20,12Now if you want to copy only the center 10x6 rectangle of your origin screen into the bottom right of screen. SCREEN my_screen,65,130,10,6The rectangle 10x6 starts at row 3, column 5, then (3*20)+5=65 The destination starts at row 6, column 10, then (6*20)+10=130 The 10 and 6 are the size of the rectangle. I hope this clear matters up 1 Quote Link to comment Share on other sites More sharing options...
First Spear Posted February 8, 2015 Share Posted February 8, 2015 I tried printing variable values to the screen to quickly (some hex, some not) to monitor some variables but they did not display properly. What is the correct syntax for doing that? Thanks. Quote Link to comment Share on other sites More sharing options...
Kiwi Posted February 8, 2015 Share Posted February 8, 2015 (edited) If it is like the score routine I used for Applecatcher, I used mod10 to display 4 numbers.writescore: procedureprint at 220,(#score/1000%10+16)*8+6print at 221,(#score/100%10+16)*8+6print at 222,(#score/10%10+16)*8+6print at 223,(#score%10+16)*8+6For to get hex value with 16-bit variables, I would try writescore: procedureprint at 220,(#score/1000%16+16)*8+6print at 221,(#score/100%16+16)*8+6print at 222,(#score/10%16+16)*8+6print at 223,(#score%16+16)*8+6 If that doesn't work. 8-bit variable a=variable/16 b=variable%16print at 220,a+6print at 221,b+6 Edited February 8, 2015 by Kiwi Quote Link to comment Share on other sites More sharing options...
+nanochess Posted February 8, 2015 Author Share Posted February 8, 2015 Since IntyBASIC v0.9 (I think) you can get out decimal numbers using: print at 220,#score ' without alignment print at 220,<4>#score ' right aligned with zeroes print at 220,<.4>#score ' right aligned with spaces Quote Link to comment Share on other sites More sharing options...
First Spear Posted February 10, 2015 Share Posted February 10, 2015 (edited) I am trying to run intycolor in a CMD script but am unable to trap the ERRORLEVEL. I have several screens and i am trying to get them all converted in a batch. All ideas appreciated. for /f %%G in ('dir /b mypic*.bmp') do ( cls intycolor -b -s145a %%G %%G.bas %%G if errorlevel 0 pause if errorlevel 1 exit ) Thanks. Edited February 10, 2015 by First Spear Quote Link to comment Share on other sites More sharing options...
+nanochess Posted February 10, 2015 Author Share Posted February 10, 2015 I am trying to run intycolor in a CMD script but am unable to trap the ERRORLEVEL. I have several screens and i am trying to get them all converted in a batch. All ideas appreciated. for /f %%G in ('dir /b mypic*.bmp') do ( cls intycolor -b -s145a %%G %%G.bas %%G if errorlevel 0 pause if errorlevel 1 exit ) Thanks. There is no errorlevel support in IntyColor Quote Link to comment Share on other sites More sharing options...
intvnut Posted February 11, 2015 Share Posted February 11, 2015 So here's a fun one I ran into earlier today, as I was trying to work up an example: . PRINT AT 0 COLOR 7 <5> #A . This wouldn't print the value of #A, and I couldn't figure out why. I was all set to send an error report to nanochess, even! When I looked at the generated code, it was computing some crazy boolean logical expression involving 7, 5 and #A, and then writing that to the current color, all without printing anything. And that's when it hit me: I realized I was missing a comma: . PRINT AT 0 COLOR 7, <5> #A . Without the comma, IntyBASIC parsed that as COLOR ( (7 < 5) > #A ), which is pretty much never what anybody wants. Given the language grammar definition, I don't know how you might go about warning for this sort of error, other than detecting that the < and > operators were used in an "AT" or "COLOR" expression outside of parentheses. This particular error seems to be an unfortunate consequence of using <> to delimit the field size for printing decimal values. Anyway... back to work on LTO Flash! for me. 3 Quote Link to comment Share on other sites More sharing options...
intvnut Posted February 16, 2015 Share Posted February 16, 2015 Just cross posting here. I wrote up a possibly useful pair of batch files over here that may be useful to Windows users writing games with IntyBASIC. I know I've posted batch files in the past. But, lo and behold, I actually tested them! 2 Quote Link to comment Share on other sites More sharing options...
First Spear Posted February 17, 2015 Share Posted February 17, 2015 Washing a BMP through IntyColor, I got two errors: More than two colors in block 56,0 Background color not aligned with color stack in block 24,8 I do not understand the block numbering scheme. Is a "block" a "pixel", or is there a block sequence or numbering pattern I am missing? Thanks. Quote Link to comment Share on other sites More sharing options...
freewheel Posted February 17, 2015 Share Posted February 17, 2015 Washing a BMP through IntyColor, I got two errors: More than two colors in block 56,0 Background color not aligned with color stack in block 24,8 I do not understand the block numbering scheme. Is a "block" a "pixel", or is there a block sequence or numbering pattern I am missing? Thanks. It's pixel measurements measured in x,y co-ordinates - you'll notice that all numbers posted are multiples of 8. 0,0 is the top left of the screen. 56,0 is the 57th pixel in the first row - so your error is in the 8th card (cards 0-6 use pixels 0-7, 8-15, 16-23, 24-31, 32-39, 40-47, 48-55). 24,8 is the second row, 4th card from the left. And yeah, it's a bit unintuitive at first but I personally prefer it - because my image editing software shows me the exact same x,y co-ordinates when I hover over any given pixel. Someone correct me if I'm wrong here. It's been a few weeks since I've debugged Intycolor images. 1 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.