David Brant | 30 Oct 17:51
Picon

{Spam?} interrupts

Hi All
 
I've been doing a bit coding lately and found something a bit strange. I'm using mode 2 interrupts when I use sim coupe's debugger I get the normal frame interrupt and then a interrupt at line 0 point 52 (real line not SAM coupe line) anyone know whats producing it? The status register(249) holds &FF.
 
Dave
Colin Piggot | 12 Oct 22:28

I've been a bit quiet...

Hi folks,

Apologies for being so quiet recently. Having started a new job a couple of
months ago I saw a rather drastic decrease in the time I had for the SAM,
but as things get straightened out I'm back busy with SAM stuff and playing
catchup! I spent yesterday slaving over a hot soldering iron so if you had
ordered hardware over the last couple of weeks then you'll be reassured to
know that it'll be winging it's way to you in the post tommorrow.

SAM Revival issue 22 has been rather delayed with all this, I've one article
to finish off for it before it's ready for printing and that shouldn't take
too long. The coverdisk with 22 features the full commercial game 'Burglar
Bob' from Jupiter Software and a 3D wireframe demo from Thomas Harte. The
magazine itself has a roundup of a lot of SAM news, while the feature
articles include a look at what happened to the proposed sequel of Manic
Miner on the SAM - 'The Lower Caverns' was to have new graphics, new levels
and new music. The Developer Diary features a second article from Thomas
Harte about his work on a 3D engine for the SAM. The magazine is available
to preorder - PayPal 'Buy It Now' buttons are now up on my website.

All the best,

Colin
=====
Quazar : Hardware, Software, Spares and Repairs for the SAM Coupe
1995-2008 - Celebrating 14 Years of developing for the SAM Coupe
Website: http://www.samcoupe.com/

Thomas Harte | 7 Oct 23:39
Picon

Tiny sound programming query

Roughly how much code (in kilobytes) is the part of an average end-of- 
display interrupt driven music player that actually resides in the  
interrupt handler?

Calvin Allett | 24 Sep 18:34
Picon

Speed issue's with POINT (x,y)

Firstly would like to apologize to Thomas and Geoff for not getting back to this, ended up going out on p*ss other day and completely forgot I'd posted on here, hehe (been gonna ask so many times over past year :) )...

anyways, Yahoo won't let me reply to your emails for some reason, so I'll just have to post here.

Yeah Thomas, as Geoff said about calculating the value's of pixels myself, and as you've found out, way to slow, I actually tried the same thing last year with variables, i.e. just storing values in RAM myself and updating and seeking them from their locations instead of using variables, thinking it would cut out looking up the variables, but that too ended up slower :( Really am trying every trick I can to make Basic be capable of the things I want, and must say that the amount of months I spend polishing and speeding things up with tricks It'd be quicker to learn MC, but as I've said I honestly wouldn't enjoy coding then ;)

The thing you said about keeping a copy of the screen and having pixels to check for what happens to the ball is a very good idea, already doing that with a Screen 3 (as 1 and 2 are used for screen flipping), so that when there are sprites on screen, I can still check for background colour and have movement correct...

Did think about using a 4th say, as you suggest to perhaps make finding of the pills a bit easier, but that would mean doing yet more more POINT test, and I really need to be doing all the others anyway (L,R,T,B,B2,B3,B0,BR and C) as basically the game is one big collision detection engine, everything from the movement, background, enemy collision and pill finding is done using those 9 variables, and they all need to be done every frame :( , which leads me on to what
geoff discussed.

Geoff, it's a crying shame that SAM or Masterbasic hadn't offered integers, being a lamer, hehe, I wouldn't know how much time it would save, but anything counts right :) I made sure with calculations to try and use integer only for this game (apart from Y variable which sometimes isn't)...

Couldn't understand the MC you posted but I get what you mean about only finding address of coordinate and then using offsets to speed up routine, I notice there was very little code, were those few lines all it takes to find the value's and move on to next point to check etc? ... I always imagine that for any 1 command in basic it'll take perhaps 10-30 lines (or more) in MC to accomplish the same thing.

The way it works at moment it can't just always check say the pixels to the left if the ball is heading that way, as the way levels are drawn you might be jumping down a curved passage way, so that each frame the ball is getting projected out and away from anything it comes into contact with, and sometimes that might be from all around the ball. I finally got it so that even though you can get very close, the ball never lets you squeeze into the scenery, so that makes it look nicer.

anyways, I don't really know what to do at the moment, but will try and post a couple of vids up later so it can be seen how much it's slowed down with more point checks... ;)

Thanks again lads, without being able to talk about coding I'd probs still be across the road getting pi**ed EVERYday with 10 pissheads instead of enjoying the SAM, lol  *_+

Cal...


Thomas Harte | 23 Sep 22:39
Picon

New projects & Byte-Back 2009

Through an uninteresting, indirect route, it seems likely that I'll be  
attending and supplying a Sam for the homebrew area of Byte-Back 2009 (http://byte-back.info/ 
), one of those classic gaming convention thingies, which will occur  
in Stoke-on-Trent on March the 7th and 8th next year. Consequential  
questions:

1) Will anybody else be in attendance?
2) Is anybody willing and able to transfer some of my Sam programs to  
actual Sam floppy in preparation for the event? I guess I'll want to  
take all of my current 3d stuff and maybe another thing that I've just  
started messing around with.
3) Does anybody else have anything I can take along? Obviously the tag  
'homebrew' doesn't mean that much in the Sam world, but in the context  
of all the information available I'm interpreting it just to mean new  
stuff for old hardware.

Calvin Allett | 18 Sep 12:31
Picon

Speed issue's with POINT (x,y)

Hey there, been a while... hope everybody's doing good :)

Some of you may remember me starting work on a new game engine last year, "Slip 'n Slide", well it only got to the stage of a couple of weeks work, but picked it up again 3 months ago and have been working on it daily since then.

It's progressed a lot, with relation to how 'nice' the engine is, and I'm rather pleased with it so far, however since the levels are drawn and there is no map data everything is done using the POINT command (collisions with scenery, enemies and power pills(well there's an array for pills, but fiding them is handled with point initially)), and whilst this allows for rather sweet level designs and movement (You can get squashed vertically or horizontally now :) ) the engine has slowed about 50 % even in the last 4 weeks :(

Is there nothing to be done, is the Point command as fast as it could be or is
there another way forward? I'm always shy/awkward over asking for help, but could anybody see themselves helping with a little machine code prog that would do the following:-

take the x and y values from the Basic variable list, check about 9 pixel colour values around it the main 9*9 sprite (L,R,B,B2,B3,T,C,BR,B0) and put the values into those variables, could this in theory be done easily, or would there be no speed benefit... POINT does seem to be really slow, it's the complexity of the game engine too slowing it down (a lot of code for uncompiled 8 bit basic at least, every iteration) and I've used every trick I learned from Tomato Antics, so no more I can do :(

I'm really sad over this, this is for the 20 Mhz SAM and I know I should
be using MC but I just haven't got the head for learning it at the moment still, and
honestly don't think I would enjoy programming in anything else than Basic... I
really like this engine too, but have took the enemies out, so I'm only drawing 1 (yes ONE) masked sprite... I'm stupid for attempting this in Basic, but it would just be another flat level mapped platformer without the POINT command...

anyways, I've had my moan ;)

Hope all your own projects are coming along, and I'm not really expecting anyone to be able to find the time, but I'd be a fool not to mention it :)

Cal...

Andrew Collier | 29 Aug 02:08
Picon

wos outage

Hi,

Apologies for the recent loss of service from worldofsam.org - while I  
was on holiday one of the other server admins seems to have updated  
PHP from version 4 to version 5, which is a good thing in general but  
it appears one of the modules in the content management system I'm  
using wasn't compatible. I've updated that file and, fingers crossed,  
everything is back to normal again.

Cheers,
Andrew

--

-- 
  ---       Andrew Collier         ----
   ---- http://www.intensity.org.uk/ ---
                                       --

James R Curry | 28 Aug 19:40

Random Sam BASIC question.

Okay, utterly random question...

How does one determine the start address of the screen in Sam BASIC?

I forget.

It has been years.

--
James R Curry
james-g2GopB7o33A@public.gmane.org
Thomas Harte | 25 Aug 15:09
Picon

Thinking aloud on polygon filling

I've not actually done any coding on my Sam 3d experiments in a while,  
but I have been thinking a lot about the best way to implement polygon  
filling. I had a polygon filler working in a much earlier version of  
my code (see, e.g. http://uk.youtube.com/watch?v=kr_Lz98qVjE from  
about 0:39) but it only did triangles, didn't clip and generally  
wasn't really up to snuff in several ways that hit the frame rate.

Anyway, I've been playing around with a few ideas and was wondering if  
someone with a more instinctive grasp for this sort of thing might  
help out.

I previously tried using a span buffer. Each pixel span (i.e. a  
horizontal line of pixels) was inserted into a linear list of existing  
spans for that scan line, by clipping it against the spans that were  
already there then shuffling things around in memory. So there was a  
binary search and then often a small LDIR. The entire frame was drawn  
at the end. I even tried a system whereby each span list was compared  
with the previous span list and only the differences were plotted.  
That was much faster than just dumbly drawing the whole list, but  
slower than just plotting the spans to the screen and not doing the  
list search and insert. Furthermore, as you add more polygons to the  
scene, the insert gets more expensive very quickly.

Idea 1 is to divide the screen into 8×8 blocks, keep an overview that  
tags each as either block filled with a certain colour or messy. The  
polygon filler tags as many blocks as possible as completely filled,  
and consults & modifies a 1 bit mask for each run of 8 pixels in a  
messy block. So searching the existing structures for each individual  
container is faster because it's O(1), and you're doing exactly as  
much searching as you were for a 64×64 rectangle, then maybe less or  
maybe more depending on the relative dimensions. As there are only 256  
possible masks for each 8 pixel messy area, you can easily write 256  
separate functions for that part of the insert (or have a program  
generate them). But you need to do some extra work to figure out how  
the polygon maps to each 8×8 block, whereas you need to know where it  
starts and ends in each scan line regardless. You're potentially  
keeping a 1 bit version of the entire display as well as the real  
screen, but that neatly fits onto the end of each screen's 32 kb page,  
conveniently ending exactly before the start position of my  
multiplication tables. Of course, messy areas are directly plotted to  
the display as they are drawn, solid colour blocks are drawn in a  
separate pass at the end, and not redrawn if they were the same colour  
in the preceding frame.

Idea 2 is a closer modification of what I had. During the normal draw  
phase, spans are stored to a buffer, but this time in no particular  
order. At the end of frame, the spans are sorted and mutually clipped  
through the creation of a binary tree. Possibly the tree is serialised  
and compared to the previous span list at the end, to reduce overall  
drawing. So searching costs the same as it did, but inserts are  
cheaper and their costs grow much less quickly. Building the tree scan  
line by scan line at the end means I can throw 32 kb or whatever at  
the tree for each separate scan line (since the contents aren't  
interesting after it has either been drawn or serialised).

Idea 3 is a brute-force memory bashing version of the original. Each  
scan line is now represented by 512 bytes of memory. That amounts to  
two bytes associated with each screen pixel. If a span starts in that  
pixel then its end location and colour are stored. So searching is  
linear, but inserting is as cheap as can be. Some sort of bucket  
system could be implemented, e.g. not allowing any scan line to pass  
the next 32 pixel boundary — so writing new spans to the intermediate  
buffer might require up to 8 writes, but searching is much faster.  
Serialising can be done at the end of frame to compare to the previous  
display if necessary.

Anyway, I really can't decide which way to go. And there are probably  
other, better ideas. Is there any expertise on this list on this sort  
of thing?
David Brant | 22 Aug 11:46
Picon

New Version of Jam Assembler

Hi all
 
 
I have uploaded a new version of Jam Assembler v1.12 to my new web domain http://www.stoneddesign.co.uk
 
Lots of new functions to it, download it and see.
 
Dave
Leszek Chmielewski | 20 Jul 22:16
Picon

SAM Games and Retro-X

Hi there!

There are some Perfect condition SAM Coupé games available on austrian eBay:

http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&item=250273008908

http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&item=250273010072

http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&item=250273011162

And now: Did someone of you download my Retro-X from World of Spectrum homepage?
Does anyone use the SAM ordered dither conversion modes for writing new SAM software?
I never got a feedback from SAM Users (except Wolfgang Haller) about the usage of BMP2SCR EXP and Retro-X SAM
Conversion modes.

Greetings...

LCD


Gmane