Problem with SDCC compiler, dd.exe and makefile.exe

Page 9/9
2 | 3 | 4 | 5 | 6 | 7 | 8 |

By sp4

Master (214)

sp4's picture

25-01-2015, 21:20

How can I make the pset() for other SCREEN MODE.
I want make the screen() for MODE 0, MODE 1, MODE 2 ........ MODE 8
and I want nake the pset() for MODE 0, MODE 1, MODE 2 ........ MODE 8
Help me please Crazy

By hit9918

Prophet (2927)

hit9918's picture

25-01-2015, 23:18

ok looks like you finally got the compiler going Smile
and it looks like your whole dream is "C like BASIC" Wink
and with all the subrom calls, it is slow like BASIC Tongue
subrom only works for screen 5 and screen 8.

use this app.c

#include "z80.c"

void pset(int x, int y, char c) __naked { //requires screen 8 flipped by bios, bios variable set to 8. or 5.
	x; y; c;
	
	__asm
	pop hl
	pop bc
	pop de
	dec sp
	pop af
	push af
	inc sp
	push de
	push bc
	push hl
	
	push af	
	ld ix,#0x91 ;MAPXYC
	call 0x15F ;EXTROM
	pop af

	ld ix,#0x99 ;SETATR
	call 0x15F ;EXTROM
	
	ld ix,#0x9D ;SETC
	call 0x15F ;EXTROM
	ret
	__endasm;
}

void screen(char scr) __naked {
	scr;
	__asm
	pop hl
	pop bc
	push bc
	push hl
	ld a,c
	call 0x5f
	ret
	__endasm;
}

void (*beep)() = (void (*)())0xc0;

void main() {
	int i;
	
	for (i = 0; i < 10; i++) {
		beep();
	}
	
	screen(5);
	
	for (i = 0; i < 212 ; i++) {
		pset(i*1,i*1,i);
	}
	
	di(); halt();
}

By sp4

Master (214)

sp4's picture

26-01-2015, 09:24

Thank you very much hit9918: it work now ! Big smile
And now I have to make the SCREEN1, 2, 9, 10, 11 and 12 without bioscall.

By sp4

Master (214)

sp4's picture

26-01-2015, 09:53

How can I do for make SCREEN 1, 2, 9, 10, 11 and 12 ?
Can you tell me how to make that ?

By mars2000you

Enlighted (6428)

mars2000you's picture

26-01-2015, 12:24

Are you serious ? Screen 9 is only for Korean machines and is actually a build-in program that uses screens 5 and/or 6 in text mode.

By sp4

Master (214)

sp4's picture

26-01-2015, 13:06

OK I need to implement SCREEN 1, 2 and I know than SCREEN 10, 11 and 12 is for MSX2+ or I wrong ?

By Manuel

Ascended (19270)

Manuel's picture

26-01-2015, 14:56

Setting a single pixel in screen 1? Really?

Do you already have an application that will use it? Smile

By sp4

Master (214)

sp4's picture

26-01-2015, 15:45

Manuel wrote:

Setting a single pixel in screen 1? Really?

Do you already have an application that will use it? Smile

It work for screen(2) but not for screen(1).
Can you help me for SCREEN 1, 10, 11 and 12 ?

Page 9/9
2 | 3 | 4 | 5 | 6 | 7 | 8 |