<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Development - World of Spectrum</title>
      <link>https://worldofspectrum.org/forums/categories/development/p30/feed.rss</link>
      <pubDate>Mon, 22 Apr 2024 11:37:46 +0000</pubDate>
         <description>Development - World of Spectrum</description>
   <language>en-CA</language>
   <atom:link href="https://worldofspectrum.org/forums/categories/development/p30/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Game loop</title>
      <link>https://worldofspectrum.org/forums/discussion/46186/game-loop</link>
      <pubDate>Mon, 13 Jan 2014 20:57:56 +0000</pubDate>
      <dc:creator>feynman</dc:creator>
      <guid isPermaLink="false">46186@/forums/discussions</guid>
      <description><![CDATA[Just working on my first ever Spectrum game, and am struggling to work out what the game-loop should look like.<br />
<br />
I've got interrupts enabled (mode 2) - although I'm not doing anything in the interrupt routine at the moment.<br />
<br />
From what I understand, interrupts occur when the TV beam hits the end of the bottom line, so I thought a basic game-loop could be this (pseudo code):<br />
<br />
loop: halt                      ; wait for interrupt to occur<br />
clear_sprites<br />
update_stuff<br />
draw_sprites<br />
jr loop<br />
<br />
Does this look right? I've decided to XOR my sprites onto the screen, so the first problem I've hit is the very first 'clear_sprites' routine actually draws them on the screen, and then the draw_sprites routine clears them off (unless they've moved a bit).<br />
<br />
I could set a flag to say if first time in the loop don't clear them - but thats already getting a bit messy, and I wondered if there was a simpler / nicer approach.<br />
<br />
I did think about padding the sprites with blanks around all edges, then I wouldn't actually need a clear_sprites step, but that seemed like a bit of a faff too.<br />
<br />
When I was thinking about the halt instruction I then thought it might be better to do something like this:<br />
<br />
loop: update_stuff<br />
halt<br />
clear_sprites (from old position)<br />
draw_sprites (at new position)<br />
jr loop<br />
<br />
Which seems to give me a bit more time in the vblank, but adds the additional step of remembering everythings old position.<br />
<br />
The game itself is going to be a space invaders clone (so a few sprites on screen, though not all necessarily moving every frame).<br />
<br />
Any help / ideas are welcome.]]></description>
   </item>
   <item>
      <title>Pseudo-3D map rendering</title>
      <link>https://worldofspectrum.org/forums/discussion/46104/pseudo-3d-map-rendering</link>
      <pubDate>Mon, 06 Jan 2014 22:58:29 +0000</pubDate>
      <dc:creator>Morkin</dc:creator>
      <guid isPermaLink="false">46104@/forums/discussions</guid>
      <description><![CDATA[Have been mulling this over for a while, until that isometric thread prompted me to ask. I'm not sure if this is officially classed as 2D, 2.5D, or 3D...<br />
<br />
<img src="http://i1016.photobucket.com/albums/af288/Thirdharmoniser/pseudo_3d_zps96fc7395.png" alt="pseudo_3d_zps96fc7395.png" /><br />
<br />
Can anyone suggest a way of (a) storing tiles and (b) subsequently rendering, a map/screen like the above mock-up...?<br />
<br />
The main questions I had were:<br />
<br />
How do you indicate where part of the sprite shouldn't be printed, and where the walls are 'solid'?<br />
<br />
For example, you can see that part of the sprite is currently obscured behind a low wall. If the sprite in the pic moved up from where he is he'd hit a wall, but moving up slightly to his right, through the doorway, would start to obscure bits of him as he disappeared in the building.<br />
<br />
How do you represent tiles that are obscured by other tiles? There could be an back exit to the house (or one in the back wall), or it could be solid wall, for example.<br />
<br />
The only way I could think of is to have one map in memory indicating the individual tiles to be printed on the screen, and a second to indicate which spaces were either 'solid' or 'obscuring' tiles, but it seems a bit cumbersome. And as it's trying to effectively store what is 3D in 2D it seemed a bit messy.]]></description>
   </item>
   <item>
      <title>Reaxxion and Joe Gunn, what happened to these?</title>
      <link>https://worldofspectrum.org/forums/discussion/46167/reaxxion-and-joe-gunn-what-happened-to-these</link>
      <pubDate>Sun, 12 Jan 2014 01:49:04 +0000</pubDate>
      <dc:creator>Ivanzx</dc:creator>
      <guid isPermaLink="false">46167@/forums/discussions</guid>
      <description><![CDATA[These 2 games which were coming from the C-64 were announced in development or almost finished some time ago, but we never got any other update in the last maybe years, anybody knows if they are going to be converted finally to the Spectrum? :)]]></description>
   </item>
   <item>
      <title>How were game loading screens composed back in the day?</title>
      <link>https://worldofspectrum.org/forums/discussion/46174/how-were-game-loading-screens-composed-back-in-the-day</link>
      <pubDate>Sun, 12 Jan 2014 21:43:41 +0000</pubDate>
      <dc:creator>namtip</dc:creator>
      <guid isPermaLink="false">46174@/forums/discussions</guid>
      <description><![CDATA[I've often wondered while waiting for loading screen to materialise line by line how these were actually made prior to saving them as code or screen$.  For example, I can create and run a BASIC program to draw lines and plot points to make a simple drawing and then hit SAVE "something" SCREEN$.  But some of the loading screens I see are far too complex for that and just wondered how they were designed and coded back in the 80s.]]></description>
   </item>
   <item>
      <title>What Spectrum projects (Software/Games/Utility)(Hardware)(Others) are you working on?</title>
      <link>https://worldofspectrum.org/forums/discussion/41044/what-spectrum-projects-software-games-utility-hardware-others-are-you-working-on</link>
      <pubDate>Sun, 07 Oct 2012 14:34:51 +0000</pubDate>
      <dc:creator>Ivanzx</dc:creator>
      <guid isPermaLink="false">41044@/forums/discussions</guid>
      <description><![CDATA[So, basically that :)<br />
You dont have to give names or more clues if you dont want to ;)<br />
Also, if you are working on more than one, you can tell all of them!<br />
Even if you are doing beta testing for a game, thats considered as a Spectrum "job" ;)]]></description>
   </item>
   <item>
      <title>Calculating screen address to alternative ATTR area?</title>
      <link>https://worldofspectrum.org/forums/discussion/46114/calculating-screen-address-to-alternative-attr-area</link>
      <pubDate>Tue, 07 Jan 2014 13:04:23 +0000</pubDate>
      <dc:creator>Sokurah</dc:creator>
      <guid isPermaLink="false">46114@/forums/discussions</guid>
      <description><![CDATA[I'm using this small snippet of code to convert a screen address to an attribute cell address...<br />

<pre>AttrDE: ld a, d                 ; get the high byte of screen address
        rra                     ; divide h by 8
        rra                     ;
        rra                     ;
        and 3                   ; keep lower 3 bits,  these mimick the lower 4 bits of the attribute address
        or 0x58                 ; set the high order byte to the start of the attribute block
        ld d, a                 ; load the result into d
        ret                     ; de now contains the attribute address
</pre>
<br />
I could just be tired (which I am...<i>a lot</i>, but I was hoping I could just change the <b>OR 0x58</b> to (eg.) <b>OR 0xFD</b> to get me the address of an ATTR cell placed somewhere else (like a copy used for collision checks)...but I can't seem to make it work. Do I need to do something else...or just try again? ;)<br />
...and for some reason it works even though it doesn't actually use the E register.<br />
<br />
Oh, bonus question;<br />
I also have this bit of code that should do the same (this one does use the E register though), but it uses RRCA instead of RRA. Does it make any difference?<br />

<pre>DFtoATTR    LD    A,H
           RRCA
           RRCA
           RRCA
           AND   3
           OR    58H
           LD    D,A
           LD    E,L
           RET
</pre>
]]></description>
   </item>
   <item>
      <title>New oneliners for 2008</title>
      <link>https://worldofspectrum.org/forums/discussion/19216/new-oneliners-for-2008</link>
      <pubDate>Thu, 31 Jan 2008 21:09:18 +0000</pubDate>
      <dc:creator>bigjon</dc:creator>
      <guid isPermaLink="false">19216@/forums/discussions</guid>
      <description><![CDATA[
<div>

<div>

<div>
Here's my attempt at a first-person-perspective 3d game in one line of BASIC. It's called 'wormhole', and you've got to get through to the end of the wormhole without being slowed down by the tears in the fabric of space-time. T-Y is for left-right, and M to speed up.
</div>

<div>
I've taken lots of inspiration from the Dr Beep / DP / ES monster thread, but I've used nothing I don't myself understand, so no Pokes, also no graphics characters, and I'm sure the final LET t statement could be eliminated, but I couldn't get the brackets to work when I tried to combine it with the ATTR reads. It's comfortably under one screen as a listing.
</div>

<div>
Newbie apology: I don't know how to present the game on this forum in the easiest format for folks to use (I've checked all the FAQs but couldn't find any guidance), so here it is as copied from BASin into a text file. There should be 5 spaces in between the two exponent signs in line 1:10
</div>

<div>

<pre>1 BORDER 0:\
PAPER 0:\
INK 5:\
CLS :\
READ o$,n,a,c,m:\
FOR t=1 TO 20:\
LET o=INT (RND*3-1):\
INK 7: PRINT AT 10,0,,: INK 5:\
FOR d=0 TO 4:\
PRINT AT 11,c-1;&quot; ^ ^ &quot;;AT m,0,,AT 21,0;&quot;t&quot;;t,:\
LET m=m+d:\
PRINT AT m,15+m*o;o$(1 TO d+(d=0)):\
LET c=c-(IN 64510&lt;n)*(c&gt;2)+(IN 57342&lt;n)*(c&lt;23):\
LET a=a-(a&gt;-1)+2*(IN 32766&lt;n)-(a&gt;8):\
FOR q=1 TO 9-a: NEXT q:\
NEXT d:\
LET m=0:\
LET t=INT (t+a/5-1-3*((ATTR (10,c)&lt;6)+(ATTR (10,c+3)&lt;6)+(ATTR (10,c+6)&lt;6))):\
LET t=t*(t&gt;0):\
NEXT t:\
PAPER 7: INK 0: BORDER 7: CLS :PRINT &quot;You made it!&quot;:\
DATA &quot;____&quot;,191,0,11,0
</pre>

</div>
<br />

<div>
edited to show code, thanks Einar.
</div>

</div>

</div>
]]></description>
   </item>
   <item>
      <title>Sierra AGI</title>
      <link>https://worldofspectrum.org/forums/discussion/46041/sierra-agi</link>
      <pubDate>Thu, 02 Jan 2014 23:02:58 +0000</pubDate>
      <dc:creator>manonfire</dc:creator>
      <guid isPermaLink="false">46041@/forums/discussions</guid>
      <description><![CDATA[I've been thinking recently about starting a project to port Sierra's AGI engine to the ZX Spectrum 128.<br />
<br />
I've been reading the AGI specs and to me it looks possible and something that could be quite interesting.  I've done a search and can see that this has been discussed before, specifically regarding a Space Quest 1 port, but I thought it would be interesting to try and port the engine instead to open up more possibilities.<br />
<br />
Did anything come of the Space Quest port?  All I can find on the forum is a short discussion about it from a couple of years ago.]]></description>
   </item>
   <item>
      <title>Head Over Heels sprite data</title>
      <link>https://worldofspectrum.org/forums/discussion/45878/head-over-heels-sprite-data</link>
      <pubDate>Wed, 18 Dec 2013 12:17:07 +0000</pubDate>
      <dc:creator>JonB</dc:creator>
      <guid isPermaLink="false">45878@/forums/discussions</guid>
      <description><![CDATA[Hi<br />
<br />
Does anyone know how I can get the sprite data out of HoH? I'm programming an iso engine and I need some interesting sprites to animate... unfortunately I'm not terribly good as a graphic artist!<br />
<br />
Thanks<br />
<br />
JonB]]></description>
   </item>
   <item>
      <title>Z80: ABS(HL) function</title>
      <link>https://worldofspectrum.org/forums/discussion/46043/z80-abs-hl-function</link>
      <pubDate>Fri, 03 Jan 2014 01:11:09 +0000</pubDate>
      <dc:creator>BloodBaz</dc:creator>
      <guid isPermaLink="false">46043@/forums/discussions</guid>
      <description><![CDATA[I must be very tired but I cannot get my head around whether this function provides a correct implementation of a ABS function for a signed 16-bit value in HL.  Can somebody check by working out:<br />

<pre>; Input: HL contains a signed 16-bit value
; Output: HL = ABS(HL)
ABSFunc:
    BIT 7, H
    RET Z ; Already positive
    LD A, H
    CPL
    LD H, A
    LD A, L
    NEG
    LD L, A
    RET
</pre>
<br />
I know I can perform a SBC HL, DE with HL containing 0 and DE the input value, however I need to preserve registers and therefore this would require a PUSH, POP, two EX DE, HL and something (OR A) to reset the carry flag.  Therefore I think the above will be quicker - IF IT WORKS!<br />
<br />
Cheers,<br />
BloodBaz]]></description>
   </item>
   <item>
      <title>About how z88dk generates code and makes room for variables.</title>
      <link>https://worldofspectrum.org/forums/discussion/46065/about-how-z88dk-generates-code-and-makes-room-for-variables</link>
      <pubDate>Sat, 04 Jan 2014 14:36:47 +0000</pubDate>
      <dc:creator>na_th_an</dc:creator>
      <guid isPermaLink="false">46065@/forums/discussions</guid>
      <description><![CDATA[When you attempt to code games for the 128K models using z88dk in C you need to somewhat control where variables are stored in memory.<br />
<br />
I thought that z88dk created space for variables as they were found in the code, but I've found that, for some reason, when a variable is of a 16 bits type it is created elsewhere.<br />
<br />
For example, at the beginning of my code I have this snippet:<br />

<pre>unsigned char script_result = 0;
unsigned char script_something_done = 0;
unsigned int main_script_offset;
unsigned char *script;
</pre>
<br />
If I try to assign values to each variable, this is, for example:<br />

<pre>script_result = 6;
    script_something_done = 7;
    main_script_offset = 8;
    script = 9;
</pre>
<br />
I can see int he debugger where those values are written looking at the generated code:<br />

<pre>ld A, $06
ld ($5EF1), A
ld A, $07
ld ($5EF2), A
ld HL, $0008
ld ($C729), HL
ld HL, $0009
ld ($C77D), HL
</pre>
<br />
Values 6 and 7 (assigned to unsigned char, 8 bits variables) are stored in $5EF1 and $5EF2, which I find logical as they are defined one next to the other at the beginning of my code. But values 8 and 9 are written to locations $C729 and $C77D.<br />
<br />
I used to declare my global variables at the beginning of my binary so I could still use them when I was paging in different ram pages, but as they are created above $C000 I'm in trouble.<br />
<br />
Why is this happenning? How can I prevent this from happenning? Is there any way I can force my variables to be created where they are declared?]]></description>
   </item>
   <item>
      <title>Whats this Churrera thingy?</title>
      <link>https://worldofspectrum.org/forums/discussion/46055/whats-this-churrera-thingy</link>
      <pubDate>Fri, 03 Jan 2014 20:17:28 +0000</pubDate>
      <dc:creator>daveysludge</dc:creator>
      <guid isPermaLink="false">46055@/forums/discussions</guid>
      <description><![CDATA[Whats this 'Churrera' I keep hearing about?<br />
<br />
Is it easy to use and where can I get hold of it?]]></description>
   </item>
   <item>
      <title>array offset (z88dk)</title>
      <link>https://worldofspectrum.org/forums/discussion/45924/array-offset-z88dk</link>
      <pubDate>Sun, 22 Dec 2013 23:48:02 +0000</pubDate>
      <dc:creator>slenkar</dc:creator>
      <guid isPermaLink="false">45924@/forums/discussions</guid>
      <description><![CDATA[Im trying to simulate a 2 dimensional array by using an offset<br />

<pre>#include &lt;fzx.h&gt;

char scr[768];

int arrayoffset(char x,char y)
{
	return (x*23+y);
}
void main()
{
	char x,y;
fzx.font = ff_Swiss;

for (x=0;x&lt;32;x++)
{
for (y=0;y&lt;24;y++)
{
scr[arrayoffset(x,y)]=x;
}
}

for (x=0;x&lt;32;x++)
{
for (y=0;y&lt;24;y++)
{
fzx_setat(y*8,x*8);
fzx_puts(scr[arrayoffset(x,y)]);
}
}
	
}
</pre>
<br />
it prints crazy stuff to the screen so I must be doing something wrong<br />
768 =24*32 enough to print things to every 8*8 square on the screen]]></description>
   </item>
   <item>
      <title>Macros and Pasmo</title>
      <link>https://worldofspectrum.org/forums/discussion/46037/macros-and-pasmo</link>
      <pubDate>Thu, 02 Jan 2014 17:57:39 +0000</pubDate>
      <dc:creator>The_Bert</dc:creator>
      <guid isPermaLink="false">46037@/forums/discussions</guid>
      <description><![CDATA[Hi guys.<br />
<br />
I'm starting out with Pasmo for writing some stuff for the +3, and i'd like to use Macros for the calls to the BASIC ROM, where' you'd otherwise write something like:
<pre>RST $28
DEFW RoutineAddress
</pre>
<br />
Instead of the above, i'd prefer to define a macro, something like this:
<pre>MACRO CBAS RoutineAddress
      RST  $28
      DEFW RoutineAddress
      ENDM
</pre>
<br />
and then, in the actual program i would simply write stuff like
<pre>CBAS 1655 ; MAKE-ROOM
</pre>
and so on. I hope i am making my point come across.<br />
<br />
However, i am not entirely sure if the example i've given here is the correct way to define the Macro, so i could use some help with this one.<br />
<br />
Thanks in advance,<br />
Berty.<br />
<br />
Edit: P.S. The only other assembler i've ever used is HiSoft GenP3, but from the discussions i've read, it seems clear that it's much better to write and assemble the code on the PC, and then test it in an emulator (I'm using FUSE for Windows). Oh and my code editor is the free KomodoEdit, an excellent piece of software :D (<a href="http://www.activestate.com/komodo-edit" rel="nofollow">http://www.activestate.com/komodo-edit</a>)]]></description>
   </item>
   <item>
      <title>life meaning</title>
      <link>https://worldofspectrum.org/forums/discussion/45897/life-meaning</link>
      <pubDate>Thu, 19 Dec 2013 18:30:02 +0000</pubDate>
      <dc:creator>XelotX</dc:creator>
      <guid isPermaLink="false">45897@/forums/discussions</guid>
      <description><![CDATA[Yeah, so, I was thinking of doing a game for a while now (20-23 years now). Overcoming some hp issues these past years I made my decision to do one. The prob is that I'm null to 0 at the gfx department. Also would love to know if anyone would at least try it (given the fact that would be free, not any Cronosoft  stuff etc, nothing intended). I would prob. do it for myself anyway but though of asking if any gfx designers have any time and will. Sinclair entered my life in a  critical  moment so I hold it very dearly and I have the most respect for it.<br />
<br />
Need to edit this it seems:<br />
<br />
I would do the coding - asm - need a gfx man if any avail ofc.]]></description>
   </item>
   <item>
      <title>Border Tron vector table</title>
      <link>https://worldofspectrum.org/forums/discussion/45809/border-tron-vector-table</link>
      <pubDate>Thu, 12 Dec 2013 18:44:39 +0000</pubDate>
      <dc:creator>daveysludge</dc:creator>
      <guid isPermaLink="false">45809@/forums/discussions</guid>
      <description><![CDATA[I've been trying to use the Border Tron border creator, but the vector table is created where code to my game is at (FE00 I think), how would I go about relocating the vector table to say 30000 as I don't understand hex very well!]]></description>
   </item>
   <item>
      <title>Using the lightgun...</title>
      <link>https://worldofspectrum.org/forums/discussion/45930/using-the-lightgun</link>
      <pubDate>Mon, 23 Dec 2013 16:51:40 +0000</pubDate>
      <dc:creator>daveysludge</dc:creator>
      <guid isPermaLink="false">45930@/forums/discussions</guid>
      <description><![CDATA[I am thinking of developing a game for the Sinclair/Cheetah lightguns, how do I go about reading the data from it (Basic and MC)?<br />
<br />
I am under the impression that it will only input screen position data when fire is pressed, is that correct?<br />
<br />
The same routine to read the data only work on 128K models and require separate routines for 48K?]]></description>
   </item>
   <item>
      <title>Changing the font in z88dk</title>
      <link>https://worldofspectrum.org/forums/discussion/45925/changing-the-font-in-z88dk</link>
      <pubDate>Sun, 22 Dec 2013 23:55:45 +0000</pubDate>
      <dc:creator>szeliga</dc:creator>
      <guid isPermaLink="false">45925@/forums/discussions</guid>
      <description><![CDATA[Either I've got this backwards or the documentation is incorrect... :smile:<br />
<br />
"<a href="http://www.z88dk.org/wiki/doku.php?id=platform:zx" rel="nofollow">The standard ZX Spectrum console driver</a>" section states that to set the 32 column font you need to send data in the order "2,ll,hh" where ll is the low byte and hh the high byte of the font address.<br />
<br />
Well, I've scratched my head for a while here before swapping them over which gave the following result:<br />
<br />
<img src="http://i1119.photobucket.com/albums/k622/Mark_Szolkowski/Capture-3.png?t=1387756295" alt="Capture-3.png?t=1387756295" />]]></description>
   </item>
   <item>
      <title>Encyclopaedia Galactica</title>
      <link>https://worldofspectrum.org/forums/discussion/39968/encyclopaedia-galactica</link>
      <pubDate>Sat, 30 Jun 2012 17:54:04 +0000</pubDate>
      <dc:creator>jonathan</dc:creator>
      <guid isPermaLink="false">39968@/forums/discussions</guid>
      <description><![CDATA[This is the development thread for Encyclopaedia Galactica, the game upon which I'm currently working, along with a few others.<br />
<br />
The idea is that the player is a freelance researcher for the encyclopaedia, travelling across the galaxy and visiting different star systems and dozens of planets in search of alien flora and fauna.  He has to trap and research anything he can find, then submit his articles for payment.  This enables him to buy fuel, traps, repair his ship etc.  More distant star systems require more fuel and more money to reach, so the player will have to play the game to open those up for exploration.  If there's time I may include planets with other things to do, perhaps ancient tombs to rob and alien civilisations with ways of spending money.  Who knows, there's plenty of scope there.<br />
<br />
This is obviously going to be a big game, but it won't drag on like More Tea, Vicar? as we have three months to write it.  Aside from coding, much of my time is going to be spent designing dozens of planets and hundreds of screens.  Just call me Slartibartfast.<br />
<br />
I've approached a few top Spectrum graphics artists as this is a project where the greater the variety of different styles, the better.  We'll need lots of weird and wonderful animals and plants to populate the planets that are not lifeless so if there are any artists out there who can produce some decent 16x16 sprites or background graphics and have a few hours to contribute something, please get in touch.  Just imagine seeing your name listed in a game written for a thirty year-old computer... fame at last!  Or something.<br />
<br />
Spanner is working on the writing for this - yes, unlike most of my games there will be a sensible plot to this one - and generally helping out with other ideas.  However, if any other member of the Spectrum community wants to suggest something or help out in some way, I'm all ears.]]></description>
   </item>
   <item>
      <title>Convert WAV to TAP</title>
      <link>https://worldofspectrum.org/forums/discussion/45920/convert-wav-to-tap</link>
      <pubDate>Sun, 22 Dec 2013 09:12:27 +0000</pubDate>
      <dc:creator>daveysludge</dc:creator>
      <guid isPermaLink="false">45920@/forums/discussions</guid>
      <description><![CDATA[Is there any way to convert a WAV sound file to insert in a TAP file?]]></description>
   </item>
   <item>
      <title>Z80Asm</title>
      <link>https://worldofspectrum.org/forums/discussion/45884/z80asm</link>
      <pubDate>Wed, 18 Dec 2013 21:50:22 +0000</pubDate>
      <dc:creator>rune</dc:creator>
      <guid isPermaLink="false">45884@/forums/discussions</guid>
      <description><![CDATA[I've been using the Z80 PC Assembler 1.2 by Peter Hanratty and found that the RST 8 instruction assembles to 200. It should be 207.<br />
<br />
Ret Z is 200 which assembles correctly to 200.<br />
<br />
Are there any patches or working versions?]]></description>
   </item>
   <item>
      <title>Assembly code auto optimiser</title>
      <link>https://worldofspectrum.org/forums/discussion/45827/assembly-code-auto-optimiser</link>
      <pubDate>Sat, 14 Dec 2013 11:25:58 +0000</pubDate>
      <dc:creator>David Jones</dc:creator>
      <guid isPermaLink="false">45827@/forums/discussions</guid>
      <description><![CDATA[For my Finders Keepers Plus project I'm considering writing an Assembly code auto optimiser. Way back when I wrote the original FK I considered optimisations like this<br />

<pre>  call    SomeSub
  ret
</pre>
<br />
could be automatically turned into<br />

<pre>  jp      SomeSub
</pre>
<br />
or even<br />

<pre>  jr      SomeSub
</pre>
<br />
I didn't want to write the code like that though as it would have been harder to maintain and it just felt 'wrong'. But a pre-processor to do this would have saved a byte every time and sometimes two.<br />
<br />
A pre-processor could also search for jp instructions and turn them into jr instructions wherever possible. I'd want to be able override this for some jps though as I like putting self modified 16 bit vectors directly into jp instructions :)<br />
<br />
Example
<pre>; My source
;
; hash hash OPT sets the optimisations to be used
; ##OPT jp-&gt;jr, callret-&gt;jp, &lt;other optimisations if anybody can think of any&gt;

  jp    function1

SomeData:
  db   0, 0, 0, 0

function1:
  cp  20
  jp   z,found20
  cp  30
  jp   z,found30   ; ##OPT-

  call not20or30
  ret
</pre>
<br />
Would optimise as
<pre>; My source
;
; hash hash OPT sets the optimisations to be used
; ##OPT jp-&gt;jr, callret-&gt;jp, &lt;other optimisations if anybody can think of any&gt;

  jr    function1

SomeData:
  db   0, 0, 0, 0

function1:
  cp  20
  jr   z,found20
  cp  30
  jp   z,found30   ; ##OPT-

  jp   not20or30
</pre>
Saving 3 bytes and avoiding optimising the jp  z,found30 line<br />
<br />
I was also going to add the ability to do code inlining, but as Zeus supports macros I don't need to do that now.<br />
<br />
Anyway, I think there's scope for this sort of tool, but it may be a case of loads of work for a very minimal saving. And these days we have 128K machines so it's not as necessary. After all, who could ever fill that much memory with a game!? :)<br />
<br />
Can any of you identify enough other simple optimisations to justify this sort of tool?]]></description>
   </item>
   <item>
      <title>Throwing this up for anyone who wants to finish it</title>
      <link>https://worldofspectrum.org/forums/discussion/45552/throwing-this-up-for-anyone-who-wants-to-finish-it</link>
      <pubDate>Thu, 14 Nov 2013 09:04:34 +0000</pubDate>
      <dc:creator>dmsmith</dc:creator>
      <guid isPermaLink="false">45552@/forums/discussions</guid>
      <description><![CDATA[There's a thread somewhere, about my little side-scroller, that never got very far into development.  It got some kind and enthusiastic feedback such as: "Hell, Yeah!" haha - anyway thats beside the point.:-) But someone else was also very kind and gave it a little mention in MicroMart, which I was very surprised and grateful for. But sadly there is little likelihood of me actually finishing this...as I am in the process of getting out of clinical depression, and need time and space to just get caught up with basics like cooking and cleaning... so I am throwing it up for anyone who wants to continue with and make it into something.<br />
<br />
Before anyone gets too excited...<br />
<br />
If someone does pick it up and continue it, I <b>cannot</b> offer any assistance at all, but it will be your game and not mine, and I only ask for a little mention in regard to development, if you sell it, or make something of it...<br />
So there it is.<br />
<br />
You can take whatever bits of it you want, or can figure out...<br />
<br />
As far as what the game was going to be at the end: Something of Scramble / Chronos clone.  It would have had simple re-fueling by flying over fuel depots... as in Scramble, but it wasn't going to have power-ups and such. Maybe bonuses, anyway.<br />
<br />
I take no responsibility for what it becomes beyond this point...haha<br />
<br />
I'll say a little more about it if there is interest...]]></description>
   </item>
   <item>
      <title>Self modifying code ??</title>
      <link>https://worldofspectrum.org/forums/discussion/45746/self-modifying-code</link>
      <pubDate>Fri, 06 Dec 2013 22:51:40 +0000</pubDate>
      <dc:creator>slenkar</dc:creator>
      <guid isPermaLink="false">45746@/forums/discussions</guid>
      <description><![CDATA[I made a game in C that was mostly accessing arrays and using FOR NEXT loops,<br />
I ran out of memory, so I was thinking<br />
<br />
would it be possible to use self-modifying code so that say 20 FOR NEXT loops use the same code?<br />
or 20 array look ups can use the same code?<br />
<br />
When using C the interpreters always write out all the machine code necessary to do loops and arrays every time they are needed, its faster though I guess.]]></description>
   </item>
   <item>
      <title>Downloading code to physical hardware</title>
      <link>https://worldofspectrum.org/forums/discussion/45715/downloading-code-to-physical-hardware</link>
      <pubDate>Tue, 03 Dec 2013 16:05:41 +0000</pubDate>
      <dc:creator>David Jones</dc:creator>
      <guid isPermaLink="false">45715@/forums/discussions</guid>
      <description><![CDATA[Hi folks,<br />
<br />
Back in the day, my devkit was a TRS-80 and I had a simple connector device from the TRS-80 parallel (printer) port to the expansion bus of the ZX-Spectrum.<br />
<br />
So, what I'd like to know is, what are the best ways to get PC developed code over to a physical Spectrum?<br />
<br />
I know I could output a sna file as a wav file and load it like a tape, but that's too slow. My TRS-80 downloaded a whole game in seconds so I'm sure there must be ways to do things at that sort of speed.<br />
<br />
I've seen mention of SpectraNet (I think that's what it was called). Is that what I'm looking for?<br />
<br />
Or are there better ways?<br />
<br />
Mostly I'll be developing via emulator, but I want to be able to test on actual hardware as I go along.]]></description>
   </item>
   <item>
      <title>Collision Detection in SP1</title>
      <link>https://worldofspectrum.org/forums/discussion/19926/collision-detection-in-sp1</link>
      <pubDate>Sun, 16 Mar 2008 17:05:33 +0000</pubDate>
      <dc:creator>SnakeOilSteve</dc:creator>
      <guid isPermaLink="false">19926@/forums/discussions</guid>
      <description><![CDATA[Hi,<br />
<br />
Does anyone have a well-documented example of using collision detection in spritelib. I've search WoS and Z88DK forums but no joy.<br />
<br />
Something with just two sprites and a collision check would be ideal. Unfortunately my code is like spaghetti (having been a bastardised version of some of the z88dk tutorial code) and I have no idea how the relationship between sp_Int_Rect and sprites works.<br />
<br />
Any ideas?]]></description>
   </item>
   <item>
      <title>Maths problem</title>
      <link>https://worldofspectrum.org/forums/discussion/45749/maths-problem</link>
      <pubDate>Sat, 07 Dec 2013 17:33:00 +0000</pubDate>
      <dc:creator>Old_Speccer</dc:creator>
      <guid isPermaLink="false">45749@/forums/discussions</guid>
      <description><![CDATA[Hi guys!<br />
<br />
I'm having a bit of trouble with a small section of code in Basic. I am spinning a wheel around with numbers 0-9 on it (think of the code wheels on a suitcase). If I start at 5 and do 22 spins then the wheel will stop back at 7. If I then spin it another 13 times it will stop on number 0 ... etc<br />
I am currently doing it something like this ..<br />

<pre>for n=1 to spins
 num=num+1
 if num&gt;maxnum then num=0
next 
</pre>
<br />
That way it goes through every single spin one at a time. I am terrible at maths, but I am sure there is a quicker way/equation of doing it.<br />
Notice also that I used "maxnum" because the wheel might not always be 0-9, it could be 0-25 or 0-50. It will always start at 0 though.<br />
<br />
Any help would be appreciated. Thanks :)]]></description>
   </item>
   <item>
      <title>Multicolor chess?</title>
      <link>https://worldofspectrum.org/forums/discussion/44755/multicolor-chess</link>
      <pubDate>Sun, 25 Aug 2013 03:00:52 +0000</pubDate>
      <dc:creator>Einar Saukas</dc:creator>
      <guid isPermaLink="false">44755@/forums/discussions</guid>
      <description><![CDATA[I thought multicolor chess pieces would be a good idea, since it's easy to fit a 8x8 chessboard within the 9x9 tile area of BIFROST*. However this turned out to be harder than I expected...<br />
<br />
Here's the design I got for the tower:<br />
<br />
<img src="http://i44.tinypic.com/3167oe1.png" alt="3167oe1.png" /><br />
<br />
However I couldn't find out a reasonable design for other pieces, that would really take advantage of multiple colors. Perhaps the problem is that chess pieces are supposed to have a certain overall shape, thus there's not enough flexibility for tricks like I described in the "BACKGROUND" section of <a href="http://www.worldofspectrum.org/forums/showthread.php?t=44748" rel="nofollow">this tutorial</a>. Or perhaps it's just my lack of artistic talent again? :)<br />
<br />
Does anybody have any suggestions, or other designs to propose?]]></description>
   </item>
   <item>
      <title>IX register - using/problems</title>
      <link>https://worldofspectrum.org/forums/discussion/45760/ix-register-using-problems</link>
      <pubDate>Sun, 08 Dec 2013 19:08:00 +0000</pubDate>
      <dc:creator>MatGubbins</dc:creator>
      <guid isPermaLink="false">45760@/forums/discussions</guid>
      <description><![CDATA[Are there any rules on using the IX register? Are there any restrictions on the memory<br />
locations that it can access? Yes, I know it's slower than using HL, DE and BC but at the<br />
moment I have a need to use it for a few routines.<br />
Thanks for all help, Mat]]></description>
   </item>
   <item>
      <title>Manually embedding a .TAP file in a .SZX file</title>
      <link>https://worldofspectrum.org/forums/discussion/45771/manually-embedding-a-tap-file-in-a-szx-file</link>
      <pubDate>Mon, 09 Dec 2013 12:14:19 +0000</pubDate>
      <dc:creator>chev</dc:creator>
      <guid isPermaLink="false">45771@/forums/discussions</guid>
      <description><![CDATA[Annoyingly, Fuse doesn't seem to give me the option to embed a .tap file in a .szx file. I've looked at the specs:<a href="http://www.spectaculator.com/docs/zx-state/cassette_recorder.shtml" rel="nofollow">http://www.spectaculator.com/docs/zx-state/cassette_recorder.shtml</a> and I'm clearly doing something wrong. Does anyone have an example file I could look at?]]></description>
   </item>
   </channel>
</rss>