No Problem by IRIS

Want to discuss about Demos on the Oric, here you are !
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: No Problem by IRIS

Post by Xeron »

I just like using C as the preprocessor to spit out the code and data. Its more powerful than a typical assembler preprocessor.
User avatar
Dbug
Site Admin
Posts: 4464
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: No Problem by IRIS

Post by Dbug »

I can see how having C to generate table data is practical, but the assembler code syntax becomes quite muddled I think, with all the " and \n

Code: Select all

    assemble("scrwipe:\n"
             "    LDA #40\n"
             "    STA ZPTMP\n"
             "    LDX #27\n"
             "scrwipe_copyloop:\n"
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: No Problem by IRIS

Post by Xeron »

Yeah it's not perfect but I didn't mind.
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: No Problem by IRIS

Post by Xeron »

You'd be surprised how quickly that stopped being annoying.

The other thing it was nice for was spitting out tables of code for the wobbler and rotator.
User avatar
Dbug
Site Admin
Posts: 4464
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: No Problem by IRIS

Post by Dbug »

I guess technically something similar could be achieved with an assembler accepting sections of C code which could be compiled into a simple executable taking inputs and merging the C program output to the "tape" stream, or pushing the system, have sections of arbitrary language (C, Python, Lua, ...) interleaved with the assembler code.
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: No Problem by IRIS

Post by Xeron »

Yeah, that sounds like more work than my system, though.
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: No Problem by IRIS

Post by Xeron »

Another nice thing is when you want to rejig the memory map, you just call the functions that generate the code and data in a different order.
User avatar
Dbug
Site Admin
Posts: 4464
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: No Problem by IRIS

Post by Dbug »

How does the error reporting work, when there's an error in the assembler code?

If "assemble" was a macro instead of a function, you could have it pass __FILE__ and __LINE__ to output the possible location of a syntax error.
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: No Problem by IRIS

Post by Xeron »

I think it prints the snippet of code where it found the error. That's also a good idea with the macro.
User avatar
Dbug
Site Admin
Posts: 4464
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: No Problem by IRIS

Post by Dbug »

Regarding the music player, is it one you wrote/improved, or is it an existing one you ported to your assembler?

I was considering using the Arkhos tracker for Encounter, but I've not really followed the "state of the art" on how to get a music made, exported, compiled and play on the Oric, is there any tutorial/how to around?
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: No Problem by IRIS

Post by Xeron »

I just converted the official player to my C assembler environment.

It's pretty straightforward, the tracker can directly export assembler code, and the player then parses the binary that it assembles to.
User avatar
Dbug
Site Admin
Posts: 4464
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: No Problem by IRIS

Post by Dbug »

Is the AKS file available anywhere?
I'd like to put it in the OSDK AKY music-disk demo if that's not a problem!
Post Reply