Foenix IDE

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

Re: Foenix IDE

Post by grenouye » Thu Sep 19, 2019 10:21 pm

The joystick ports in the IDE now return $9f only. This means the joystick is in the idle position. Adding USB support is probably pretty easy. I can look into it. It may be a fun weekend project.
frenchguy
Posts: 3
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Tue Oct 01, 2019 11:51 am

bzuidgeest wrote:
Sun Sep 08, 2019 3:54 pm
In answer to sduensin. I have used the wdctool with the foenixIDE and it works... I only did some very crude tests to see if I could read register and respond to interrupts. (all without the kernel loaded)

For the foenix ide I used:
wdc816cc -ML simple.c
wdcln -HI -V -T -P00 simple.obj c0l.obj -LCL -O simple.hex

for the simulator included in wdctools I used:
wdc816cc -ML simple.c -bs
wdcln -HZ -G -V -T -P00 simple.obj c0l.obj -LCL -O simple.bin

I used both the IDE and simulator. The simulator of course does not have the foenix hardware, but I could not get my code working on the ide and I used wdc simulator to trace the bug by comparing the results of stepping thru the code. The wdc simulator is crude but its effective and doe support stepping thru the C code.

When we get a little further along and I have had a chance to finish adding sdcard support and sound support (at least that what I am attempting now) I plan to use the compiler to do some actual projects on the IDE.
Hi bzuidgeest,

I am trying to get into C256 development with the WDC C compiler, as you mentioned above. I wrote a very, very very very, simple program (basically and endless loop incrementing an int) and it compiles fine using the arguments you also used (expect c0l.obj that I removed from the linker args). But I don't understand how to load and run the hex file with FoenixIDE. I tried to open with, and without zeroing but the FoenixIDE crashes.
Do you have some information to share, or maybe some opensource code where I could have a look ?
User avatar
chibiakumas
Posts: 2
Joined: Fri Oct 11, 2019 8:52 pm

Re: Foenix IDE

Post by chibiakumas » Sat Oct 12, 2019 9:39 pm

Hi there, I've been doing some early work learning about the C256 foenix with the fantastic IDE, but I think maybe I found a little bug in the 65816 emulation.

I'm trying to use the command "INC <DP>" (Where <DP> is a direct page byte.
It's part of a routine as follows:

Code: Select all

IncHLU:
	INC z_L
	BNE	IncHL_Done
	INC	z_H
	BNE	IncHL_Done
	INC	z_HLU
IncHL_Done:
	rts
Now, the code is supposed to increment a 24 bit long in the direct page, but on the Foenix IDE only the first byte ever changes - then it rolls over to zero - from what i see the Z flag is not being set when z_L reaches zero, and from my reading of the 65816 manual this seems to be incorrect (The code works as expected on a SNES emulator)
Want to learn to make games in Assembly? Check out my Text+Videos Tutorials for Z80, 6502, 68000
User avatar
grenouye
Posts: 10
Joined: Sat Apr 13, 2019 1:57 pm
Location: Halifax, NS
Contact:

Re: Foenix IDE

Post by grenouye » Mon Oct 14, 2019 1:34 am

Thanks for filing this bug. This will make the IDE better over time.
I have indeed found a bug, which is fixed in the new release of Foenix IDE (version 0.2.4.10). This release is available in the Foenix IDE Git repository.

I've assumed that you were using the accumulator in 8-bit.

I've tested with this code (64tass assembly, not WDC). The problem file is named "problem-inc-dp-8bit.asm" in the Tests folder of the IDE.
I've also tested the code with a 16-bit accumulator.

Code: Select all

.cpu "65816"
.include "macros_inc.asm"
z_L   = $001416
z_H   = $001417
z_HLU = $001418

* = 0
            clc
            xce
            
            setaxl
            LDA #$1400
            TCD
            .dpage $1400
            
            setas
            LDY #$FF
            LDX #$FFFF
LOOP
            JSR IncHLU
            DEX
            BNE LOOP
            DEY
            BNE LOOP
            
            WAI
            
IncHLU
            INC z_L
            BNE IncHL_Done
            INC z_H
            BNE IncHL_Done
            INC z_HLU
IncHL_Done
            RTS
User avatar
chibiakumas
Posts: 2
Joined: Fri Oct 11, 2019 8:52 pm

Re: Foenix IDE

Post by chibiakumas » Mon Oct 14, 2019 6:05 am

Yes, I was using the accumulator as 8 bit... I can confirm the bug is fixed
Thanks for such speedy work!
Want to learn to make games in Assembly? Check out my Text+Videos Tutorials for Z80, 6502, 68000
frenchguy
Posts: 3
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Wed Oct 16, 2019 2:24 pm

Has anybody succeeded in producing a hex/bin program with the WDC compiler and linker that runs in the IDE ?
I am struggling to do that. I can compile and link my test program, but when I try to load it (without zeroing mem) in the IDE, depending on the linking options, it either doesnot load (System.NotImplementedException: Record type not implemented: 02) , or it's not an intel hex. When I finally get something loading, when I jump to the CODE section I have define in the linker options, I see no assembly code, and when I run from this location the IDE freeze and crashes.

I am eager to program something for the C256 in C (please do not answer me to do asm because it is the way to do... lol )

Any help, and working example, is welcomed :-)
User avatar
stef
Posts: 75
Joined: Thu Jan 01, 1970 12:00 am
Location: Somewhere in the Universe
Contact:

Re: Foenix IDE

Post by stef » Wed Oct 16, 2019 9:50 pm

frenchguy wrote:
Wed Oct 16, 2019 2:24 pm
Has anybody succeeded in producing a hex/bin program with the WDC compiler and linker that runs in the IDE ?
I am struggling to do that. I can compile and link my test program, but when I try to load it (without zeroing mem) in the IDE, depending on the linking options, it either doesnot load (System.NotImplementedException: Record type not implemented: 02) , or it's not an intel hex. When I finally get something loading, when I jump to the CODE section I have define in the linker options, I see no assembly code, and when I run from this location the IDE freeze and crashes.

I am eager to program something for the C256 in C (please do not answer me to do asm because it is the way to do... lol )

Any help, and working example, is welcomed :-)
Mike Bush is the probably the best person to answer your question, since he is the person who is creating the FX/OS. He has been using the WDC compiler since day 1.

https://www.youtube.com/user/miketbushUT

The other thing you could do is maybe try to create a binary file out of the linker and load it directly, that way you could go around the Hex record type 2 problem. Or maybe find out why the WDC creates a "Extended Segment Address" with record 2.

These are only suggestions that I am not sure that are really meaningful since I have no experience whatsoever with WDC. Just the thought of having to use is a good enough reason to learn Assembly! ;)

Anyway, hope my 2 cents helped.

Stefany
Mistress of All Villainy
frenchguy
Posts: 3
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Thu Oct 17, 2019 10:02 am

stef wrote:
Wed Oct 16, 2019 9:50 pm
frenchguy wrote:
Wed Oct 16, 2019 2:24 pm
Has anybody succeeded in producing a hex/bin program with the WDC compiler and linker that runs in the IDE ?
I am struggling to do that. I can compile and link my test program, but when I try to load it (without zeroing mem) in the IDE, depending on the linking options, it either doesnot load (System.NotImplementedException: Record type not implemented: 02) , or it's not an intel hex. When I finally get something loading, when I jump to the CODE section I have define in the linker options, I see no assembly code, and when I run from this location the IDE freeze and crashes.

I am eager to program something for the C256 in C (please do not answer me to do asm because it is the way to do... lol )

Any help, and working example, is welcomed :-)
Mike Bush is the probably the best person to answer your question, since he is the person who is creating the FX/OS. He has been using the WDC compiler since day 1.

https://www.youtube.com/user/miketbushUT

The other thing you could do is maybe try to create a binary file out of the linker and load it directly, that way you could go around the Hex record type 2 problem. Or maybe find out why the WDC creates a "Extended Segment Address" with record 2.

These are only suggestions that I am not sure that are really meaningful since I have no experience whatsoever with WDC. Just the thought of having to use is a good enough reason to learn Assembly! ;)

Anyway, hope my 2 cents helped.

Stefany
Thank you Stefany. I have already had some chat with Mike on Youtube, he helped me. But as I still facing issues I wondered if someone else in the forums here had hints . :-)
User avatar
stef
Posts: 75
Joined: Thu Jan 01, 1970 12:00 am
Location: Somewhere in the Universe
Contact:

Re: Foenix IDE

Post by stef » Thu Oct 17, 2019 5:57 pm

frenchguy wrote:
Thu Oct 17, 2019 10:02 am
stef wrote:
Wed Oct 16, 2019 9:50 pm
frenchguy wrote:
Wed Oct 16, 2019 2:24 pm
Has anybody succeeded in producing a hex/bin program with the WDC compiler and linker that runs in the IDE ?
I am struggling to do that. I can compile and link my test program, but when I try to load it (without zeroing mem) in the IDE, depending on the linking options, it either doesnot load (System.NotImplementedException: Record type not implemented: 02) , or it's not an intel hex. When I finally get something loading, when I jump to the CODE section I have define in the linker options, I see no assembly code, and when I run from this location the IDE freeze and crashes.

I am eager to program something for the C256 in C (please do not answer me to do asm because it is the way to do... lol )

Any help, and working example, is welcomed :-)
Mike Bush is the probably the best person to answer your question, since he is the person who is creating the FX/OS. He has been using the WDC compiler since day 1.

https://www.youtube.com/user/miketbushUT

The other thing you could do is maybe try to create a binary file out of the linker and load it directly, that way you could go around the Hex record type 2 problem. Or maybe find out why the WDC creates a "Extended Segment Address" with record 2.

These are only suggestions that I am not sure that are really meaningful since I have no experience whatsoever with WDC. Just the thought of having to use is a good enough reason to learn Assembly! ;)

Anyway, hope my 2 cents helped.

Stefany
Thank you Stefany. I have already had some chat with Mike on Youtube, he helped me. But as I still facing issues I wondered if someone else in the forums here had hints . :-)
Well, maybe you should post more detail about what you are trying to achieve and then it might be a bit easier to help on the different issues you might have.

Again, just a suggestion.
S
Mistress of All Villainy
Post Reply