Jump to content
IGNORED

Beginner help with IntyBasic


dalves

Recommended Posts

Hey all, I thought I had asked this question before but couldn't find any post about it, so maybe I just was thinking about asking it. I had been using MESS as my intellivision emulator, but really want to use jzintv exclusively. Is there a way to configure jzintv to display at a 4:3 aspect ratio instead of stretching to fill the whole screen?

Link to comment
Share on other sites

Do a make.bat file in the directory where your .BAS file is.

If you do not have Intybasic in your path, you need at least those steps:

..\intybasic_path\bin\intybasic.exe basicgame.bas asm\basicgame.asm ..\intybasic_path
pause
..\jzintv_path\bin\as1600.exe -j asm\basicgame.smap -s asm\basicgame.sym -l asm\basicgame.lst -o bin\basicgame.rom asm\basicgame.asm 
pause
..\intybasic_path\intysmap asm\basicgame.smap 
pause 
..\jzintv_path\bin\jzintv.exe --src-map=asm\basicgame.smap  --sym-file=asm\basicgame.sym -s1 -z1  -v1 bin\basicgame.rom
pause

You need also to create the directory ASM and BIN where the BAS file is

Link to comment
Share on other sites

  • 4 weeks later...

How can I print an energy bar using ROM tiles ?

I'm in color stack mode, but I do not know how to revert background/foreground colors with the PRINT command

 

I ws thinking t something like this

 

PRINT AT 11*20+00 COLOR 2,"\95\95\95\165\188\189"
I see that \95 is 8 pixels, \165 is 4 pixels,\188 is 2 pixels
I need to revert colors of \189 to make it 6 pixel using PRINT
BTW is there a nice snippet that given a variable life in 0-31 prints a lifebar in a given position in, let's say, 4 tiles ?
Edited by artrag
Link to comment
Share on other sites

Oh I should have that source code somewhere that's similar what you're trying to do. I do not use the print command.

DrawHP:procedure
if HP>MaxHP then HP=MaxHP
if lives=0 then poke ($200,$0959) 
if lives<>0 then poke ($200,$095f)
c=MaxHP/6
for i=1 to c
poke ($200+i,$3950)
next i
c=HP/6
for i=1 to c
poke ($200+i,$3920)
next i
d=HP%6
if HP<>MaxHP then poke ($201+c,$3950-d*
return
end

MaxHP=48 will draw 8 energy balls. Each balls have 6 segments. You probably want to use a pointer to a table containing the GROM image and color as mine is pointed at the GRAM card that the ball images are in sequence. You can go to http://wiki.intellivision.us/index.php?title=Graphics_ROM&oldid=14925and http://knox.ac.free.fr/inty_workshop/ to help you generate the card's value containing it color and card.

Edited by Kiwi
Link to comment
Share on other sites

Hey all, I thought I had asked this question before but couldn't find any post about it, so maybe I just was thinking about asking it. I had been using MESS as my intellivision emulator, but really want to use jzintv exclusively. Is there a way to configure jzintv to display at a 4:3 aspect ratio instead of stretching to fill the whole screen?

 

jzIntv takes all of its configuration on the command line. You can provide it whatever resolution you'd like to display in with the -z<xdim>,<ydim>,<colordepth> flag. You can also add various amounts of border padding on X and Y with the --gfx-border-x=<pixels> and --gfx-border-y=<pixels> flags.

 

Ordinarily jzIntv launches in a window, so I guess you're having a 4:3 issue when launching full screen?

 

I always launch jzIntv from the command line (or very occasionally from a script). How are you launching jzIntv?

Link to comment
Share on other sites

Oh I should have that source code somewhere that's similar what you're trying to do. I do not use the print command.

DrawHP:procedure
if HP>MaxHP then HP=MaxHP
if lives=0 then poke ($200,$0959) 
if lives<>0 then poke ($200,$095f)
c=MaxHP/6
for i=1 to c
poke ($200+i,$3950)
next i
c=HP/6
for i=1 to c
poke ($200+i,$3920)
next i
d=HP%6
if HP<>MaxHP then poke ($201+c,$3950-d*
return
end

MaxHP=48 will draw 8 energy balls. Each balls have 6 segments. You probably want to use a pointer to a table containing the GROM image and color as mine is pointed at the GRAM card that the ball images are in sequence. You can go to http://wiki.intellivision.us/index.php?title=Graphics_ROM&oldid=14925and http://knox.ac.free.fr/inty_workshop/ to help you generate the card's value containing it color and card.

 

 

This is how I did my enery bar (note that the max vaue of bosslife is 32)

boss_energy: procedure
	#score = #score+100
	PRINT AT 11*20+15	COLOR 5,<5> #score				
	gosub sfxint2
	bosslife = bosslife-1
	if bosslife = 0 then enter_boss_mode = 0
	
	m = bosslife/(32/4) 			' 32 values -> 4 tiles
	n = (bosslife and (32/4-1))		' 8 intermediate tiles
	
	for i=0 to m-1
		#backtab(11*20+0+i) = $5F*8 + 2
	next

	#backtab(11*20+0+m) = #sparebar(n)*8+2
	
	for i=m+1 to 4
		#backtab(11*20+0+i) = 0
	next
	end

#sparebar:
		data $00,$9D,$BC,$9F,$A5,$A1,$A3,$5F

I did a small improvement using 8 intermediate tiles from GROM

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

  • 8 months later...

 

jzIntv takes all of its configuration on the command line. You can provide it whatever resolution you'd like to display in with the -z<xdim>,<ydim>,<colordepth> flag. You can also add various amounts of border padding on X and Y with the --gfx-border-x=<pixels> and --gfx-border-y=<pixels> flags.

 

Ordinarily jzIntv launches in a window, so I guess you're having a 4:3 issue when launching full screen?

 

I always launch jzIntv from the command line (or very occasionally from a script). How are you launching jzIntv?

 

Sorry for the very delayed response. I am still having trouble trying to configure jzintv on my Windows computer. I've tried creating a batch file following the post below. However, when I right click on a ROM and use "Open With" and point to the batch file I made, the command prompt window opens for a second and closes. If I to the same thing with the ROM, but select the jzintv.exe instead, it launches the game but it is in the 320x200 window. I am quite certain this is something stupid that I am missing or doing wrong.

 

For Windows use a text editor like notepad and create a batch script file (e.g. jzintv.bat) with a single line like the following example. Obtain a "keyboard hackfile" or create an empty text file named 'kbdhackfile.kbd' for now, or just remove that part of the command. Use this batch file in the above instructions to start a game.

"path\to\jzintv.exe" -z3 -f1 -v1 "--kbdhackfile=path\to\kbdhackfile.kbd" %1
Link to comment
Share on other sites

You might try adding PAUSE statements to your batch file to see if you're getting an error message trying to launch jzIntv.

 

Once you get your batch file sorted, I think there's a way to modify its properties so it doesn't open the command window. It's been a long time since I used Windows regularly, so I don't remember. I basically just keep a Win7 laptop around for jzIntv builds and programming JLP boards.

Link to comment
Share on other sites

 

 

Sorry for the very delayed response. I am still having trouble trying to configure jzintv on my Windows computer. I've tried creating a batch file following the post below. However, when I right click on a ROM and use "Open With" and point to the batch file I made, the command prompt window opens for a second and closes. If I to the same thing with the ROM, but select the jzintv.exe instead, it launches the game but it is in the 320x200 window. I am quite certain this is something stupid that I am missing or doing wrong.

 

For Windows use a text editor like notepad and create a batch script file (e.g. jzintv.bat) with a single line like the following example. Obtain a "keyboard hackfile" or create an empty text file named 'kbdhackfile.kbd' for now, or just remove that part of the command. Use this batch file in the above instructions to start a game.

"path\to\jzintv.exe" -z3 -f1 -v1 "--kbdhackfile=path\to\kbdhackfile.kbd" %1
Do you have a file kbdhackfile.kbd? Are the paths correct? Like intvnut said, add a pause command on the next line of your batch file and jzintv should tell you what's wrong.
Link to comment
Share on other sites

It appears there is something wrong with the path. I was trying to do this off the desktop of my work computer just to see if I could get it running, but must have screwed something up in the batch file. I was also trying to eliminate the keyboard hack file just in case something was messed up there. I'll try it again from scratch and see what I can do. I'm just hoping to have jzintv run at full screen with the 4:3 ratio.

 

I have just moved my jzintv folder to C:\Program files. I tried doing a new batch file, but having the same results. My current batch file is below.

 

"C:\Program files\jzintv\bin\jzintv.exe" -z3 -f1 -v1 "--kbdhackfile=C:\Program files\jzintv\kbdhackfile.kbd" %1

pause

 

I used a screen capture to record the error as it would show only as the command prompt window was closing. It says...

 

C:\Program Files\jzintv\rom>C:\users\dalves\Desktop\bin\jzintv.exe -z3 -x0 --kbdhackfile=swappable.kbd "C:\Program Files\jzintv\rom\KINGMOUN.ROM"

The system cannot find the path specified.

Edited by dalves
Link to comment
Share on other sites

  • 2 weeks later...

So I erased everything I had and started with a new jzintv install and created a new batch file. I am able to get it running with the batch file, but I still can't get it to have a 4:3 ratio when full screen. Below is the batch file I am using.

 

"C:\Program files\jzintv\bin\jzintv.exe" -z1024x768, -f1 -v1 -b10 %1

Link to comment
Share on other sites

Not sure if it's the issue but the -z switch should have a third parameter for the colour bit depth after the comma e.g. -z1024x768,8 or you can just put -z3 since it's the same thing.

 

Could it be your TV stretching the 4:3 1024x768 picture? HD televisions have various picture/pixel fit settings.

Edited by mr_me
Link to comment
Share on other sites

You can check your graphics adapter software settings. I know the the Nvidia control panel has scaling settings to maintain aspect ratio or stretch to full screen or pass scaling to the display. How do other emulators behave e.g. mame.

Edited by mr_me
Link to comment
Share on other sites

Right now I am using it on a "Test" computer that is an old Dell with a stock video card. I'll try moving it to another computer and see what I can find with the video settings. I know when I use MESS and load an Intellivision game, it will go to full screen, but maintain the 4:3 ratio. The same is true if I use Stella or Nestopia. It seems that JZINTV and Nostalgia 5 are the only ones stretching to 16:9. That is why I was assuming it wasn't a video card setting, but I will try on another computer and see.

Link to comment
Share on other sites

Toggle back to window and check the jzintv command window to see exactly what resolution jzintv had selected for full screen. There should be a list of considering lines following "full screen" and then the "selected" resolution. You'll also see the resolution selected for "windowed". Note that they are not the resolution specified at the command line because jzintv adds pixels for the specified border and searches for a compatible resolution; but it should be a similar aspect ratio. Nostalgia always outputs a 5:3 intellivision aspect ratio padded to a specified resolution. You can check that resolution in nostalgia settings.

Edited by mr_me
Link to comment
Share on other sites

Mame and Stella have settings to maintain the original aspect ratio regardless of the graphics adapter resolution aspect ratio; and those settings are on by default. Jzintv does not do that and always stretches the intellivision pixels to fit the graphics adapter resolution. So to maintain a 4:3 aspect ratio in jzintv, it depends on the monitor and graphics adapter correctly displaying a 4:3 resolution without stretching.

Link to comment
Share on other sites

  • 3 weeks later...

Something else to keep handy is a map of BACKTAB. Whip up one in Excel or other spreadsheet, drag to a corner of your monitor.

 

attachicon.gifbacktabspreadsheet.JPG

 

I'm curious to know how you use that and why it's needed? Wouldn't the macros "SCREENPOS(col, row)" and "SCREENADDR(col, row)" absolve you from having to track the specific BACKTAB addresses in the matrix?

 

-dZ.

  • Like 1
Link to comment
Share on other sites

It definitely helps me for visualization and planning of the play area. Answering self-questions like "I want to shoot that arrow from 'there' to 'there' will that overrun the other thing I placed 'there'?" "yep, I need it to draw that other thing smaller". I have a hard time thinking in Cards sometimes.

 

 

 

I'm curious to know how you use that and why it's needed? Wouldn't the macros "SCREENPOS(col, row)" and "SCREENADDR(col, row)" absolve you from having to track the specific BACKTAB addresses in the matrix?

 

-dZ.

Link to comment
Share on other sites

It definitely helps me for visualization and planning of the play area. Answering self-questions like "I want to shoot that arrow from 'there' to 'there' will that overrun the other thing I placed 'there'?" "yep, I need it to draw that other thing smaller". I have a hard time thinking in Cards sometimes.

 

 

That's fair, but then that can be addressed with just any grid or even grid paper. My point is that you should not need to track the specific index, offset, or address of each cell in the grid since the macros will di that for you via the column and row. :)

 

dZ.

Link to comment
Share on other sites

Agreed, when I'm slinging code. But for thinking about what-goes-where, the spreadsheet helps me, thought it might help others. I definitely need to keep less paper on my desk. :)

 

Thanks.

 

 

That's fair, but then that can be addressed with just any grid or even grid paper. My point is that you should not need to track the specific index, offset, or address of each cell in the grid since the macros will di that for you via the column and row. :)

dZ.

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...