Page 7 of 10

Re: Foenix IDE

Posted: Sat Oct 26, 2019 7:41 pm
by grenouye
@frenchguy Did you use the bitmap mode? Or did you generate a fontset? Just curious.

frenchguy wrote:
Fri Oct 25, 2019 2:33 pm
As promised, here is a video of a basic 2D drawing test written in C with WDC Tools and running in the IDE:


Re: Foenix IDE

Posted: Sat Oct 26, 2019 9:52 pm
by frenchguy
grenouye wrote:
Sat Oct 26, 2019 7:39 pm
Released Foenix IDE 0.2.5.0 in Git. This version now supports command-line arguments:
-h, --hex: load an Intel-hex program
-r, --run: auto-run
-i, --irq: disable "break on interrupts"
Let me know if you have any problems.
Ctrl-C in the console (to kill the program) is not supported yet. I'm looking into it.
I don't understand how my program, which is not a kernel, could write its starts adress when it's not yet running? (and the code adress is only provided as linking time)
Something is not clear to me, lol.

Re: Foenix IDE

Posted: Sat Oct 26, 2019 9:57 pm
by frenchguy
grenouye wrote:
Sat Oct 26, 2019 7:41 pm
@frenchguy Did you use the bitmap mode? Or did you generate a fontset? Just curious.

frenchguy wrote:
Fri Oct 25, 2019 2:33 pm
As promised, here is a video of a basic 2D drawing test written in C with WDC Tools and running in the IDE:

I am using the bitmap mode. it's pure 2D drawings (lines,rectangles, so far).
By the way I noticed something weird : when I load my program, erasing the kernel, everything looks fine. But when I load it without zeroing, the graphics seems completly shifted. I did some test and it give the feeleing that the resolution would be only 608x448...

I set the bitmap start at 0xB00000 and the resolution at 640x480 in a init function like that (C code, but pretty close to asm):
// enable bitmap, and LUT 0
*BM_CONTROL_REG = 0x01;

// screen start, will be offset by 0xB00000 (screen start address)
*BM_START_ADDY_L = 0x00;
*BM_START_ADDY_M = 0x00;
*BM_START_ADDY_H = 0x00;

// set screen size: SCREEN_WIDTHxSCREEN_HEIGHT
*BM_X_SIZE_L = 0x80;
*BM_X_SIZE_H = 0x02;
*BM_Y_SIZE_L = 0xE0;
*BM_Y_SIZE_H = 0x01;

// bitmap and graphic modes enabled
*MASTER_CTRL_REG_L = 0x0C;

Re: Foenix IDE

Posted: Sun Oct 27, 2019 9:08 pm
by frenchguy
grenouye wrote:
Sat Oct 26, 2019 7:39 pm
Released Foenix IDE 0.2.5.0 in Git. This version now supports command-line arguments:
-h, --hex: load an Intel-hex program
-r, --run: auto-run
-i, --irq: disable "break on interrupts"
Let me know if you have any problems.
Ctrl-C in the console (to kill the program) is not supported yet. I'm looking into it.
Hi @grenouye ,

Could you check that that loading an hex w/o zeroing, from the menu, is not broken? When I use that, I see nothing in the memory at my code starting address... :?

Re: Foenix IDE

Posted: Mon Oct 28, 2019 1:35 am
by grenouye
You're correct... Load Hex w/o Zeroing is broken...
I've updated the code in Git. Release 0.2.5.1.

Re: Foenix IDE

Posted: Mon Oct 28, 2019 2:25 am
by grenouye
frenchguy wrote:
Sat Oct 26, 2019 9:52 pm
I don't understand how my program, which is not a kernel, could write its starts adress when it's not yet running? (and the code adress is only provided as linking time)
Something is not clear to me, lol.
The hex file loads bytes at various addresses in memory. If your code runs in memory bank $18, and address $18:FFEC is specified, then this bank is copied into bank 0. The effect is the Reset Vector (at address $FFEC) is set and the processor will look there when it first starts.

If you load without zeroing, the Reset Vector is probably not being rewritten. So I'm not sure why the resolution would be off.

So, what address is your code compiled to? You can inspect your hex file.

Re: Foenix IDE

Posted: Mon Oct 28, 2019 11:03 am
by chibiakumas
Hi, I think I may have found another processor bug in V 0.2.5.1

In 8 bit mode, INC ing a direct page value never sets the Carry flag, It's my understanding that is should.. EG

Code: Select all

	lda #1
	sta z_B
infloop:	
	lda #255
	adc z_B
	sta z_C
	jmp infloop
when z_b (a zero page address: eg $20) rolls over from $FF to $00 The zero flag is set, but carry is not... Am I correct in saying this is a bug?

Re: Foenix IDE

Posted: Tue Oct 29, 2019 4:02 pm
by frenchguy
grenouye wrote:
Mon Oct 28, 2019 2:25 am
frenchguy wrote:
Sat Oct 26, 2019 9:52 pm
I don't understand how my program, which is not a kernel, could write its starts adress when it's not yet running? (and the code adress is only provided as linking time)
Something is not clear to me, lol.
The hex file loads bytes at various addresses in memory. If your code runs in memory bank $18, and address $18:FFEC is specified, then this bank is copied into bank 0. The effect is the Reset Vector (at address $FFEC) is set and the processor will look there when it first starts.

If you load without zeroing, the Reset Vector is probably not being rewritten. So I'm not sure why the resolution would be off.

So, what address is your code compiled to? You can inspect your hex file.
@grenouye (stand for french "grenouille" ? lol)

I have added an in-line assembly code in my C source, like
*=18FFE0
jml READY

and defined a READY label in another inlined assembly section that init some stuff at the beginning of the program. It works fine!
With the new command line options of the IDE , the program starts immediatly when loaded. Better devolopment experience now : compile, link, run/debug in the IDE. ;)

Re: Foenix IDE

Posted: Tue Oct 29, 2019 4:37 pm
by frenchguy
Update of my tests of the IDE and C programming :

Re: Foenix IDE

Posted: Tue Oct 29, 2019 11:40 pm
by grenouye
Very nice indeed! Pretty fast too, I think.