Foenix IDE

Description of your first forum.
User avatar
grenouye
Posts: 24
Joined: Sat Apr 13, 2019 1:57 pm
Location: Halifax, NS
Contact:

Re: Foenix IDE

Post by grenouye » 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:

frenchguy
Posts: 32
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Sat Oct 26, 2019 9:52 pm

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.
frenchguy
Posts: 32
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Sat Oct 26, 2019 9:57 pm

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;
frenchguy
Posts: 32
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Sun Oct 27, 2019 9:08 pm

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... :?
User avatar
grenouye
Posts: 24
Joined: Sat Apr 13, 2019 1:57 pm
Location: Halifax, NS
Contact:

Re: Foenix IDE

Post by grenouye » Mon Oct 28, 2019 1:35 am

You're correct... Load Hex w/o Zeroing is broken...
I've updated the code in Git. Release 0.2.5.1.
User avatar
grenouye
Posts: 24
Joined: Sat Apr 13, 2019 1:57 pm
Location: Halifax, NS
Contact:

Re: Foenix IDE

Post by grenouye » 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.
User avatar
chibiakumas
Posts: 3
Joined: Fri Oct 11, 2019 8:52 pm

Re: Foenix IDE

Post by chibiakumas » Mon Oct 28, 2019 11:03 am

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?
Want to learn to make games in Assembly? Check out my Text+Videos Tutorials for Z80, 6502, 68000
frenchguy
Posts: 32
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Tue Oct 29, 2019 4:02 pm

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. ;)
frenchguy
Posts: 32
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Tue Oct 29, 2019 4:37 pm

Update of my tests of the IDE and C programming :
User avatar
grenouye
Posts: 24
Joined: Sat Apr 13, 2019 1:57 pm
Location: Halifax, NS
Contact:

Re: Foenix IDE

Post by grenouye » Tue Oct 29, 2019 11:40 pm

Very nice indeed! Pretty fast too, I think.
Post Reply