Jump to content

Photo

RAPTOR Basic+ updates

raptor basic+ updates

77 replies to this topic

#26 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Thu Mar 26, 2015 2:38 PM

Oops, sorry, meant to write:

- BUILD.bat <projectname> new will create a new project folder from "template".

#27 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Sat Apr 4, 2015 9:05 AM

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

#28 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Sat Apr 4, 2015 10:31 AM

Shootbang is the current work in progress, a little side-step from the changer project. It's not commented or finished off yet.

 

psemu is... well, there's nothing of value there at all :0)



#29 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Mon Apr 13, 2015 6:04 AM

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, Mon Apr 13, 2015 6:07 AM.


#30 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Sun May 3, 2015 12:43 AM

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.



#31 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Thu Jul 23, 2015 4:26 AM

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!



#32 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Jul 23, 2015 5:38 AM

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


  • ggn likes this

#33 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Sun Jul 26, 2015 6:31 AM

Just a quick note: github and bitbucket have an updated installer with recent changes, for those who might be starting from scratch!



#34 Fredifredo OFFLINE  

Fredifredo

    Moonsweeper

  • 480 posts
  • Location:France , 85

Posted Thu Jul 30, 2015 4:17 PM

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 )



#35 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Jul 30, 2015 4:42 PM

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



#36 Fredifredo OFFLINE  

Fredifredo

    Moonsweeper

  • 480 posts
  • Location:France , 85

Posted Thu Jul 30, 2015 11:40 PM

Lolvalamp works fine...



#37 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Fri Jul 31, 2015 12:05 AM

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, Fri Jul 31, 2015 12:13 AM.


#38 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Sat Aug 1, 2015 11:54 AM

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!

#39 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Sat Aug 1, 2015 12:18 PM

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, Sat Aug 1, 2015 12:21 PM.


#40 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Sat Aug 1, 2015 1:05 PM

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, Sat Aug 1, 2015 1:05 PM.


#41 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Sun Aug 23, 2015 1:37 PM

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, Sun Aug 23, 2015 1:48 PM.


#42 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Sun Aug 23, 2015 1:50 PM

Amazing update! Loads of new toys to play with :)

 

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.

 

Thanks



#43 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Sun Aug 23, 2015 1:55 PM

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



#44 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Mon Aug 24, 2015 6:10 AM

 

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 :)



#45 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Mon Aug 24, 2015 6:38 AM

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!

#46 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Mon Aug 24, 2015 9:22 AM

Sounds like a lot of effort but it's done in 60 seconds.

Think there's tons of commands to add to the site and probably even more little fixes to the existing pages - all good though, keep the updates coming! :D

#47 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Fri Aug 28, 2015 2:47 PM

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!



#48 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Fri Aug 28, 2015 3:47 PM

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



#49 ggn OFFLINE  

ggn

    Stargunner

  • Topic Starter
  • 1,340 posts
  • Location:Athens, Greece

Posted Sat Aug 29, 2015 12:02 AM

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.



#50 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Sat Aug 29, 2015 3:29 AM

10/10 A+++++++ would download and install a stab at porting BCX-Basic to the Atari Jaguar again.





Reply to this topic



  



Also tagged with one or more of these keywords: raptor, basic+, updates

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users