News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Recent posts

#21
avatar_Jean-Marie
Programming / Re: How do I restrict number o...
Last post by Jean-Marie - Yesterday at 01:23
You want the points to be vertically aligned, regardless of the length of the strings.
In that case, you can use the TAB(x) instruction, where x will be the coordinate of the points.

10 MODE 2
20 A$="THIS IS A LONG STRING"
30 B$="SHORT"
40 A=123
50 B=99
60 A$=LEFT$(A$,12)  'TRUNCATE LONG STRING
70 REM DISPLAY STRINGS & points
80 LOCATE 63,1:PRINT A$;TAB(76);A
90 LOCATE 63,2:PRINT B$;TAB(76);B

#22
D
Programming / Re: How do I restrict number o...
Last post by DRobert - 23:41, 02 October 24
Sorry but I was a bit premature with my celebrations regarding my troublesome league table.   

The above suggestion worked well by restricting the length of a team name to just 12 characters / letters and therefore when it came to printing the teams AND number of points the 'points' were not nudged a few spaces to the right due to excess length of team name which had been a problem previously.

In my trial run I had only tried team names with 12 chatacters or more which was fine.

However when I came to INPUT a shorter team name (ie Chelsea which has just 7 characters) the team prints fine but drags the 'points' total for that one team 5 spaces to the left of the other teams' points.   Ive tried pressing the space bar an extra 5 times but when it comes to the display / Print of the table the space bar taps are not recognized.   Ive INPUT the 'full stop' key 5 times which then works fine but of course it makes an otherwise professional looking table look unsightly. 

Ive tried creating separate windows to dispaly the teams and the points but the line of code that generates the league table (ie team names and points are directly correslated) cannot be split unless someone can suggest a way of simple re-coding.

The appropriate line of code for printing the league table is as follows - if it makes any sense to anyone?

LOCATE 63,p%+3;PRINT tn$(p%); "   "; pts%(p%)

As I am a rank amateur at this there is probably a simple way forward but Im struggling to see it at the moment. 

As always any help is appreciated.
#23
@Prodatron yes, I'm still around. If you could provide me with the updated image to test, that would be awesome. Looking good! ;D
#24
A
Games / Re: Which Spectrum ports or ot...
Last post by Anthony Flack - 20:25, 02 October 24
Quote from: Shaun M. Neary on 14:52, 02 October 24This is what made me question it. Budget labels never got arcade licenses to my knowledge. :)

It wasn't the only Namco arcade game to have a port published by Mastertronic - there was also Motos. 
#25
avatar_roudoudou
Emulators / Re: ACE for Linux,Mac, Windows...
Last post by roudoudou - 19:59, 02 October 24
- LibSDL upgraded to 2.30.7
- updated UNIDOS+packs to v1.51
- try to create .config directory for settings if it does not exists (Linux/Mac)
- Breakpoint activation when click ON the instruction (no more half screen or something...)
- Memory explorer can see/edit Dandanator ROM
- Memory explorer can see/edit Play2CPC Cartridge
- new debug module for Dandanator (with internal registers)
- new command line option for delaying autotype
- added brightness to saved settings
- bugfix SenseInterrupt breakpoint
- bugfix register display in AY debug
- bugfix memory overflow with AY audio display
- bugfix SYMBiFACE Mouse plugin not initialized at startup
- bugfix FDC default timings when loading snapshot from another emulator
- bugfix Emulator Mapping in Memory Explorer with ROM extension (do not use this for edition!)

http://www.roudoudou.com/ACE-DL/
#26
avatar_dodogildo
Games / Re: Which Spectrum ports or ot...
Last post by dodogildo - 18:54, 02 October 24
Quote from: trocoloco on 05:29, 02 October 24Myth has to be one of those, even tho it could have been so much better in mode 0 IMO, still it is a great game
It's impossible to make a great game out of Myth, just by adding colors.  :laugh:
IMHO, Myth's CPC version deserves a full remake, which would follow in the footsteps of the awesome C64 original.
#27
P
Programming / Re: SymbOS C Compiler (v1.0 re...
Last post by prevtenet - 18:24, 02 October 24
The documentation on mixing asm/C is here; I think this probably has most of the examples you need.

The only difference with a two-parameter routine is that there will be two 16-bit values on the stack on entry to the routine instead of one, with the first parameter being on the top of the stack (after the return address, of course). The example gets these parameters with POP, but another good approach (that doesn't require cleaning up the stack afterwards) is set IX to the initial stack pointer, like:

.export _asmfunc
_asmfunc:
    ld ix,#0x00
    add ix,sp
    ld l,(ix+2) ; HL = first parameter
    ld h,(ix+3)
    ld e,(ix+4) ; DE = second parameter
    ld d,(ix+5)
    ; do something with HL, DE...
    ret

As you can see one major syntax difference from SDCC is using the (ix+2) format for index registers rather than 2(ix). SDCC's syntax is kind of weird, the syntax used by SCC is more standard (it seems pretty close to the Maxam-style syntax used by WinApe, without some of the more advanced features).
#28
avatar_abalore
News & Events / Re: AMSTEAM: WIP game streamin...
Last post by abalore - 17:58, 02 October 24
Quote from: HAL6128 on 17:29, 02 October 24Do you have an actual Amsteam library available? Is the one in the first post?

That one is very obsolete now. Sadly I can't edit the first post (). Currently there are around 200 direct loading games, around 20 cartridge games (need the cartridge emulator) and 7 approved Telnet sites. The target for the collection is around 700 games, which are the games I like plus other user's requests.

You can find a rough, incomplete list of the target game list attached to this post.

P.D.: I just enabled the option to choose the part in multi-part games, like Game Over.

#29
avatar_teopl
Programming / Re: SymbOS C Compiler (v1.0 re...
Last post by teopl - 17:38, 02 October 24
First, thanks again, this is great tool !!!

Now, I would like to try to port some of my C code used with sdcc compiler where I used inline asm.

I understood that there is no support for inline asm but that linking with .asm (or .s) should work.

Can someone write me the smallest possible example where I would have a function with 2 variables (each 2 bytes) written in assembler - which could be called from a C program as a C function?

(previously this was easy with inline asm and some push/pop for arguments)

btw, what is asm syntax used in scc?
#30
avatar_HAL6128
News & Events / Re: AMSTEAM: WIP game streamin...
Last post by HAL6128 - 17:29, 02 October 24
Do you have an actual Amsteam library available? Is the one in the first post?
Powered by SMFPacks Menu Editor Mod