Jump to content
IGNORED

RAPTOR Basic+ updates


ggn

Recommended Posts

  • 2 weeks later...

Minor tinkerings, plus new projects!

 

- build.bat will now automatically switch to ROM building if there is even one ROM asset in assets.txt. You can still use build PROJECT ROM though.

- Build system stops at the exact spot an error occurs and displays the log instead of waiting for something to blow up randomly. makes spotting errors easier

- New demo project: shootbang, demoing bullets and hitpoints.

- New demo project: psx emu ;).

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Ok, deep breath...

 

Gloves...

Glasses...

Mustache...

Handkerchief...

 

I'M GOING TO MAKE A NEW RELEEEEEASEE!

 

surgery_team.png

 

- Fixed ROM sending to skunkboard via build.bat.
- Build system decoupled from projects directories. User needs to set environment variable RBTOOLS to point to the directory build.bat lies.
- Added support for Rmotion - can be enabled with RSETOBJ and Rmotion scripts can now be added to assets.txt for parsing. Rmotion is Matmook/Jagware's add on animation-and-much-more scripting language that makes moving sprites in a pattern child's play! Hopefully Matmook will wake up from his slumber and provide more detailed info soon!
- Buildlink now parses Rmotion script files and exposes variables as required.
- Missing assets.txt files from print and tilemap projects added.
- New project: invaders which demonstates Rmotion.
- Added new function fadesingle(index_to_fade,desired_colour_in_16_bit_RBG).
- New feature: Installer (using NSIS) that installs everything and registers .rbplus extension. Right click on a .rplus file will give you 4 options for project compilation (abs/ROM/abs-send to skunk/ROM-send to skunk). jcp not included.
- Added docs folder.
- Notepad++ build scripts so the user doesn't have to use the console to build a script, see docs\Notepad++ NPPExec presets\HOWTO.txt for info.

 

Anyway, the major new thing to keep here is that we now offer a shiny new installer so people hopefully will have less hassles while trying to set this thing up! You can find the self-contained installer on our website or Bitbucket or Github. Right clicking on .rbplus files makes compiling a project much easier. Or you can use Notepad++ with our instructions in the docs folder (or hardlink here).

 

Phew, a lot to digest for one post, just grab the installer and have fun (or bitch at us!)

Edited by ggn
  • Like 6
Link to comment
Share on other sites

  • 3 weeks later...

New version with a couple of minor fixes, but mostly with the code that goes with this article.

- Fixed buildlink problem when converting 16-bit images.
- New RAPTOR.O which exposes two new variables: raptor_used_particles and raptor_free_particles, which do pretty much what they say.
- New project "scroller" that has the code that goes with the tutorial of the same name.

  • Like 2
Link to comment
Share on other sites

  • 2 months later...

New stuff, new stuff!

 

Raptor variable exposed: raptor_mt_present is negative if no Memory Track is present
Raptor variable exposed: raptor_highscores_hex points to the highscore table (10 entries, one longword each)
Raptor variable exposed: raptor_highscores_nam points to the highscore names table (10 entries, 8 characters each, not null terminated)
New RB+ function hiscore_check(score,name) checks if score is a high score. name, like above, is 8 characters.
Raptor function exposed: RAPTOR_resort_score_table re-sorts the highscores as well as the names.
Raptor function exposed: RAPTOR_mt_save saves the highscore table. Use it in combination with present.

New project added: scores which demonstrates all the above. Enjoy!

  • Like 6
Link to comment
Share on other sites

New stuff, new stuff!

 

Raptor variable exposed: raptor_mt_present is negative if no Memory Track is present

Raptor variable exposed: raptor_highscores_hex points to the highscore table (10 entries, one longword each)

Raptor variable exposed: raptor_highscores_nam points to the highscore names table (10 entries, 8 characters each, not null terminated)

New RB+ function hiscore_check(score,name) checks if score is a high score. name, like above, is 8 characters.

Raptor function exposed: RAPTOR_resort_score_table re-sorts the highscores as well as the names.

Raptor function exposed: RAPTOR_mt_save saves the highscore table. Use it in combination with present.

 

New project added: scores which demonstrates all the above. Enjoy!

 

AWESOME!!

 

I'll try this out as soon as I can.

 

Thanks for creating more work for me ;)

 

Cheers

  • Like 1
Link to comment
Share on other sites

First test of "scores" : build error ;

 

Last line : 'RAPTOR_mt_save' was not declared in this scope

 

( I didn't use installer, only put RB+ directory on my desktop )

 

I tried the "scores" example and it worked fine for me.

 

I just downloaded the git-master, unzipped to a new folder, jumped into CMD, went into the basic folder and ran "build scores" from there.

 

I didn't try building via notepad++.

Link to comment
Share on other sites

Sounds like you didn't update your include\rbasic.h.

 

Line 83 of that file currently says:

 

 

 

extern void RAPTOR_mt_save() asm("RAPTOR_mt_save");

 

If it doesn't, it's a good indication you didn't fully update :).

 

[EDIT] Yes I know, git is a PITA if you're not into source version control programs - in this case just grab a zip of the latest version from bitbucket and unzip it on your existing installation[/EDIT]

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

Okay, something weird is happening... TWO, yes TWO people are actually using rb+ and actually exchange hints out in the open. How did that happen???

 

Anyway, people make stuff, upload stuff, ask features and it all comes back to poor old me :). So here's the latest changes uploaded:

 

- Makelink: CRY conversion for 16 bit images added. assets.txt now accepts "gfx_cry"

- Project crytest added that demonstrates the above.

- Project starfield added.

 

Grab from the usual places and enjoy!

  • Like 5
Link to comment
Share on other sites

Okay, something weird is happening... TWO, yes TWO people are actually using rb+ and actually exchange hints out in the open. How did that happen???

 

Anyway, people make stuff, upload stuff, ask features and it all comes back to poor old me :). So here's the latest changes uploaded:

 

- Makelink: CRY conversion for 16 bit images added. assets.txt now accepts "gfx_cry"

- Project crytest added that demonstrates the above.

- Project starfield added.

 

Grab from the usual places and enjoy!

It looks like the assets.txt is missing from the crytest project. I downloaded the GitHub master.zip

Edited by Sporadic
Link to comment
Share on other sites

You're absolutely right - just committed it. Sorry!

 

(Off topic: if people want to keep up with github/updates there are a few things like subscribing to the RSS feed of the project, or making a github/bitbucket account and following the project, then the site can send you emails on updates.)

Edited by ggn
  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Maybe I should have called this version v.μfly because most of the changes were in order to help sh3 work on his game ;). Anyway, v1.2 is live and available from the usual place and here's the change log:

 

 

v1.2 changes (please read carefully as it might break current projects):

- Small fix for peek/dpeek/lpeek
- Small fix for BUILD.bat
- Added our own version of jcp.exe
- New option for build.bat: build <project> sendy bjl will upload built binary using bjl transfer (note: you might need to edit the upload settings)

- Added Zerosquare's version of bjl uploader
- Small fix in build.bat that would create a folder for a non existing project
- Small fix in build.bat when building .abs files
- New file externs.inc added instead of having to .extern all new needed exposed functions. All existing rapapp.s files need some modifying!
- New function: bin2asc(number, digits, string$) will convert number with (digits+1) digits very fast and render it to string$. Note that the number has to be an integer. Quick example: bin2asc(987,2,out$) will convert number 987 to string using 3 digits and place it into out$. If we used 3 instead of 2 we'd get "0987"
- Added a new audio player by Zerosquare/CVSD. This change CAN break your builds if you don't add a few changes to your rapapp.s - see what's changed to include\template\rapapp.s for more info). You can still use the u-235 sound engine instead of this (enabled by default), but you have to change the first equate at the top of your rapapp.s (again, look at the template for more info).
- New command added: ZEROPAD will read both pad ports and sends results back to variables zero_left_pad, zero_right_pad, zero_mousex_delta, zero_mousey_delta and zero_rotary_delta. By default the engine is configured to assume 2 joypads connected.
- New command added: Input_SetNormalPadMode will set up the engine to read two pads (enabled by default). zero_left_pad and zero_right_pad can be read using these constants: Input_Pad_Pause, Input_Pad_A, Input_Pad_Up, Input_Pad_Down, Input_Pad_Left, Input_Pad_Right,Input_Pad_C1,Input_Pad_B,Input_Pad_Star,Input_Pad_7,Input_Pad_4,Input_Pad_1,Input_Pad_C2,Input_Pad_C,Input_Pad_0,Input_Pad_8,Input_Pad_5, Input_Pad_2, Input_Pad_C3, Input_Pad_Option, Input_Pad_Sharp, Input_Pad_9, Input_Pad_6,Input_Pad_3. (example: if zero_left_pad band Input_Pad_Star will check left pad for star button press).
- New command added: Input_SetJoyPort1 selects the joypad port 1 to use for rotary/mouse input. This doesn't enable rotary/mouse mode if it isn't already. zero_rotary_delta will give the number of rotary ticks since the last read command.
- New command added: Input_SetJoyPort2 selects the joypad port 2 to use for rotary/mouse input. This doesn't enable rotary/mouse mode if it isn't already.
- New command added: Input_SetRotaryMode selects the rotary mode.
- New command added: Input_SetAtariMouseMode selects the Atari mouse mode. Input_Mouse_Left and Input_Mouse_Right are the masks to check for button presses and zero_mousex_delta, zero_mousey_delta the number of mouse ticks in x and y axis since the last read command.
- New command added: Input_SetAmigaMouseMode selects the Amiga mouse mode.
- New command added: SNDZEROPLAY chan, start_address, len, frequency, params will play a sample starting from start_address with length len to channel chan with speed frequency and with flags params. chan should be from 1 to 4. start_address should be aligned to 4 bytes. len should be a multiple of 4. frequency should be an integer that divides the base frequency of 46168Hz. So for example if it's set to 1, it'll play a sample at 46168Hz, a 2 will play a sample at 23084Hz etc. Available flags are Zero_Audio_8bit_Signed (plays an 8-bit signed sample), Zero_Audio_8bit_Unsigned (plays an 8-bit unsigned sample), Zero_Audio_8bit_muLaw (plays a 8-bit compressed μLaw sample) and Zero_Audio_Looping (enables sample loop).
- New assets.txt functionality: sfx_mlawFREQ will convert a sample to μlaw and reample it to frequency FREQ (example: sfx_mlaw15389 will convert a sample to 15389Hz and compress it to μLaw ready for the player)
- New assets.txt functionality: sfx_rawFREQ will convert a sample to raw and reample it to frequency FREQ (example: sfx_raw15389 will convert a sample to 15389Hz and compress it to μLaw ready for the player)
- New raptor.o that adds extra functionality:
- New variable exposed: raptor_ntsc_flag is non-zero if machine is ntsc.
- New variable exposed: raptor_user_savedata points to 512 bytes for user data which will be appended to the MT save
- Slight improvement: you can now use binary bitfields in basic! Just use B8(binary byte) for bytes, B16(binary byte,binary byte) words and B32(binary byte,binary byte,binary byte,binary byte) for longwords!

 

 

I probably forgot a ton of other stuff here. If something isn't clear just ask me about it and I'll do my best to clarify!

 

Finally a huge thanks to Zerosquare for letting me use his audio code and his BJL uploader (don't laugh, it was actually useful - MT testing!). Finally I'll mention again that this update can potentially break your older projects! By which I mean you'll get some build errors. You have to do some manual editing to your rapapp.s files but it's not too difficult really. Shout if you're in panic!

Edited by ggn
  • Like 3
Link to comment
Share on other sites

Bin2asc is going to allow me to cut out a chunk of nasty code I used to work out highscore digits.

 

Ntsc detection will be handy too for sure.

 

bin2asc was needed to avoid really, really slow PRINTs that were making my game drop frames. Switched to that, RPRINTed them, problem solved!

 

And the NTSC flag is much better than the half arsed check I was doing (that zero pointed out was all kinds of iffy hehe).

Link to comment
Share on other sites

 

v1.2 changes (please read carefully as it might break current projects):

 

Hi,

 

I've just tried 1.2 and master branches and a couple of the example projects error on build.

 

For example, I tried starfield and got the following error;

Assembling raptor skeleton... 
 
Translating .bas file to C... 
 
Compiling C code... 
 
Linking things... 
UNRESOLVED SYMBOLS
	Audio_Play (basic_functions.o)
	Input_Read (basic_functions.o)
Build error! 

It looks like the same error for each one that fails.

 

The ones that don't compile for me are;

2lists

crytest

starfield

 

Hope that helps :)

  • Like 1
Link to comment
Share on other sites

Crap, I thought I fixed them all - thanks for the report! The proper versions are now on latest revision :)

 

And, to help people transition their existing projects to v1.2, here's a quick how to: (sorry I didn't write this with the release, I was too tired!)

 

1. Zoom to the top of the file and remove all the lines that have .extern in them. Replace with

			include				"externs.inc"
2. Add the following at the top of the file (depending on your aesthetics):

; THE NEXT LINE CONTROLS WHICH PLAYER WILL BE USED
 
player equ 1      ;0=Zerosquare's player, 1=U-235 player
Like the comments say, this selects the audio player. This will also affect pad/rotary/mouse reading so take care!

 

3. Find the line that has

move.l	#RAPTOR_samplebank,raptor_samplebank_ptr
and replace with this block

                if player=1
			move.l	#RAPTOR_samplebank,raptor_samplebank_ptr                ;linko player
                endif
4. Find the line that has

jsr		RAPTOR_U235init
and replace with this block

                if player=1
 			jsr		RAPTOR_U235init														; init the U235 Sound Engine
.extern Audio_Play
.extern Input_Read
Audio_Play:
Input_Read:
                        
                else
			bsr             Audio_Init
                endif
5. Find the line that has

jmp __Z9basicmainv
and add this below it:

                    if player=0
                        include "zero_audio.s"
                    endif
6. Find the line that has

include 	"RAPU235.S"	
and replace with this block

                                                    if player=1
 							include 	"RAPU235.S"									; RAPTOR u235se user data
                                                    endif
7. This step is really important and you should do it regardless if you're updating or not! (i.e. it's a bug!): Find the line that has

RAPTOR_MTtrash:				.ds.b	16384
and add this directly above it:

							.dphrase
otherwise you can and will have problems with Memory Track - you ask sh3 how many coasters he wasted till this was figured out!

 

 

 

And that's it, your project will be "magically" upgraded to v1.2!

  • Like 4
Link to comment
Share on other sites

The cesspool that is basic_functions.c keeps growing...

-New command powazap(spr_index, offset, no_of_times, value) will write value no_of_times times in offset offset, starting with index spr_index.
-New RAPTOR.O fixes a small bug with object wrapping.
-New project maprunner generates a random maze and lets you scroll through it. Thanks to sporadic for this one!

  • Like 5
Link to comment
Share on other sites

In Github you have a tagline of "A stab a porting BCX-Basic to the Atari Jaguar".

 

You should change that to "Totally fucking ported BCX-Basic to the Atari Jaguar".

 

:D

 

Really? I can modify that? So much POWA! Ah, I don't pay attention to the social bit and you shouldn't either - just focus on the code ;)

 

P.S. don't forget to follow my repo and star it!!111111oneeoneoneone.

  • Like 6
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...