Foenix IDE

Description of your first forum.
frenchguy
Posts: 32
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Thu Oct 24, 2019 10:42 am

Suggestion for the IDE :
It would be useful, imho, to have some options to start the IDE from the commande line and load an hex file, in order to bypass the menu. For example :
-h <hexfile_name>
-z for zeroing
-j <address> to directly jump at <address> at startup, without running the code yet

my 2 cents :)
User avatar
gadget
Posts: 9
Joined: Tue May 28, 2019 8:55 pm

Re: Foenix IDE

Post by gadget » Thu Oct 24, 2019 4:22 pm

Oh goodness yes! I don't use the Windows IDE (I don't have a Windows machine), but the ability to type 'make' and have your project built and running in an emulator a second later makes a huge difference in development speed!

Several folks recently tried to get my kernel running in the Windows IDE after I had it running in the C++ emulator. They ran into a variety of issues, including incorrectly implemented opcodes, and what appeared to be dependencies on values that Stef's kernel writes to RAM. My code isn't an extension of her kernel, so, of course, it doesn't use the zero page in the same way. If you are building binaries that don't extend Stef's kernel, you may want to use Ryan's emulator for now; I'll try to chase down a link. It, too, has some bugs, but it appears to be much closer to the current hardware specification.

This leads me to believe that Mike is testing on hardware for his Workbench software (built with WDC's C compiler) and very few people are presently using the emulators.

I've mostly been testing my code in a "dumb" emulator that just includes a simulated 65816, 2MB of RAM, and a few magic I/O addresses. While it now runs in Ryan's emulator, it didn't boot on the hardware when Stef tried it, so there's still some magic missing.
User avatar
gadget
Posts: 9
Joined: Tue May 28, 2019 8:55 pm

Re: Foenix IDE

Post by gadget » Thu Oct 24, 2019 5:02 pm

Ryan's emulator is here: https://github.com/rdaum/c256emu

I found odd behavior with color and gamma correction. I think I ended up doing a pure linear gamma (0..255) and had to keep all of my RGB values under 247 or they would turn to black. Let me know if/when you get here, and I'll dig through my code to see what I did.

I also found that BCD was not implemented in the CPU emulator. I stubbed in a really ugly BCD 'adc' to make my debug code work. It isn't something I would want to push back, but I'm happy to share it.
frenchguy
Posts: 32
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

Post by frenchguy » Fri Oct 25, 2019 12:47 pm

For "gadget":
I use a virtual Windows machine under VMWare on MacOS, with the IDE and WDC tools; it works fine, so far for my test.
Indeed Mike is working with the hardware.

For IDE expert: I guess that the Vicky VDMA is not (yet) implemented in the IDE simulator, right ?
frenchguy
Posts: 32
Joined: Tue Oct 01, 2019 11:45 am

Re: Foenix IDE

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

User avatar
gadget
Posts: 9
Joined: Tue May 28, 2019 8:55 pm

Re: Foenix IDE

Post by gadget » Fri Oct 25, 2019 5:41 pm

Woot!!! Way cool!!!
User avatar
grenouye
Posts: 29
Joined: Sat Apr 13, 2019 1:57 pm
Location: Halifax, NS
Contact:

Re: Foenix IDE

Post by grenouye » Sat Oct 26, 2019 2:53 am

Very nice indeed!
User avatar
grenouye
Posts: 29
Joined: Sat Apr 13, 2019 1:57 pm
Location: Halifax, NS
Contact:

Re: Foenix IDE

Post by grenouye » Sat Oct 26, 2019 2:55 am

I love your ideas. Probably not too hard to implement. Let me have a look.
frenchguy wrote:
Thu Oct 24, 2019 10:42 am
Suggestion for the IDE :
It would be useful, imho, to have some options to start the IDE from the commande line and load an hex file, in order to bypass the menu. For example :
-h <hexfile_name>
-z for zeroing
-j <address> to directly jump at <address> at startup, without running the code yet

my 2 cents :)
User avatar
grenouye
Posts: 29
Joined: Sat Apr 13, 2019 1:57 pm
Location: Halifax, NS
Contact:

Re: Foenix IDE

Post by grenouye » Sat Oct 26, 2019 5:52 pm

By the way, the correct way to specify a start address is to specify it in the Reset vector.
VECTORS_BEGIN = $18FFE0

The C256 Foenix (Gavin FPGA) copies the content of bank $18 to bank $0 on start. So the reset vector of the 65816 at address $FFE0 gets written then.
All the addresses written in the vectors must be 16 bits. The processor jumps to the bank 0 addresses specified in the vectors.

The FoenixIDE simulates this by checking address $18:FFE0 and $18:FFFC in your hex file. If address $FFE0 is zero and $18:FFE0 is non-zero or address $FFFC is zero and $18:FFFC is non-zero, bank $18 is copied into bank $0 completely.

Code: Select all

* = VECTORS_BEGIN
JUMP_READY      JML TRACKER    ; Kernel READY routine. Rewrite this address to jump to a custom kernel.
RVECTOR_COP     .addr HCOP     ; FFE4
RVECTOR_BRK     .addr HBRK     ; FFE6
RVECTOR_ABORT   .addr HABORT   ; FFE8
RVECTOR_NMI     .addr HNMI     ; FFEA
                .word $0000    ; FFEC
RVECTOR_IRQ     .addr HIRQ     ; FFEE

RRETURN         JML TRACKER

RVECTOR_ECOP    .addr HCOP     ; FFF4
RVECTOR_EBRK    .addr HBRK     ; FFF6
RVECTOR_EABORT  .addr HABORT   ; FFF8
RVECTOR_ENMI    .addr HNMI     ; FFFA
RVECTOR_ERESET  .addr HRESET   ; FFFC
RVECTOR_EIRQ    .addr HIRQ     ; FFFE
User avatar
grenouye
Posts: 29
Joined: Sat Apr 13, 2019 1:57 pm
Location: Halifax, NS
Contact:

Re: Foenix IDE

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