Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chessboard Attack + Source code
#3
boriel Wrote:Awesome! :o
I MUST do a game too! :oops:

You should give a tutorial on how to include sound (perhaps even a library). Many people are asking for this (remember the sound thread). Or even a library.

In the BorIDE the Interruptmaker is included now, but I'm not decided how to link the code with compiled program.
I think about two methods:
1). Make a binary and inject it into TAP after compilation. This is the easiest way for me, but disadvantages are that the source will not contain these code, and it will work only for TAP and TZX output, and the user must modify the loader by hand.
2). Create ASM code in Clipboard, so the user will be able to put it into the source. This is much harder to do because the Interrupt vectors will not work from any address, so I must ALIGN them (not automaticaly because Interrupt vector must not be set below 128). Maybe a mix of ORG and ALIGN? This must be placed at the end of code.
3). Library: Very hard to do because of the adressing limitations of interrupts.
I think, the second solution is better, but I must also make a TAP 2 ASM decoder to put the music from TAP into source code.
My interruptmaker 1.2+ (available now from WOS) is also able to switch to a different memory bank of Spectrum 128 to play music stored at this place, and also keeps track which screen is displayed. Until the Interruptmaker is fully integrated into BorIDE, anyone can use Interruptmaker.
It produces multiple chunks of code that must be hand-saved:
Vectortable: 256 Byte boundary in memory, has 257 bytes of same value (due to the problem with "floating Bus", two bytes combile the H/L bytes of address to interrupt controll routine.
Vectorjump address (257 bytes boundary): This is the start of intterrupt handling routine which save all important registers (AF, BC, DE, HL and IX + IY to be compatible with some disc drives) and restore them again (never change Stack pointer while interrupts are running).
On/Off code: Code to switch interrupts on and off.
Interrupt call address defines which address will be used in vectorjump routine to be called 50 times per second. In soundtracker this is Startaddress of compiled song with player plus 6 bytes (This info will be displayed at compilation time).
All you need is now to init the song and switch interrupts on using RANDOMIZE USR InterruptsOn.

I'm really curious what kind of game you would write with this tool, Boriel.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)