Jump to content
IGNORED

Millfork


zbyti

Recommended Posts

How to play MPT music:

const word ADDRMUS = $a000
const word ADDRPLA = $b000

byte stop @ ADDRPLA + $62d

asm void comm(byte register(a) a, byte register(x) x, byte register(y) y) @ ADDRPLA extern
asm void takt() @ ADDRPLA+3 extern

void main(){
  comm(0,ADDRMUS.hi,ADDRMUS.lo)
  comm(4,0,0)
  while os_CH == $ff {
    if antic_vcount == $10 {
      antic_wsync = $e
      gtia_colbk = $e
      takt()
      gtia_colbk = 0
    }
  }
  stop = 0
}

const array player @ ADDRPLA = file("data/mpt_player.obj", 6)
// Music by Adam Bienias (SoTe): Bitter Reality - Partyland 1
const array music @ ADDRMUS = file("data/bitter_reality_4.mpt", 6)

 

mptplayer.xex

Edited by zbyti
refactor
Link to comment
Share on other sites

How to play CMC music:

const word ADDRMUS = $a000
const word ADDRPLA = $b000

asm void comm(byte register(a) a, byte register(x) x, byte register(y) y) @ ADDRPLA+3 extern
asm void takt() @ ADDRPLA+6 extern

void main(){
  comm($70,ADDRMUS.lo,ADDRMUS.hi)
  comm(0,0,0)
  while os_CH == $ff {
    if antic_vcount == $10 {
      antic_wsync = $e
      gtia_colbk = $e
      takt()
      gtia_colbk = 0
    }
  }
  comm($40,0,0)
}

const array player @ ADDRPLA = file("data/cmc_player.rep", 6)
// Music by Michal Brzezicki (Caruso) - Echo
const array music @ ADDRMUS = file("data/echo.cmc", 6)

 

cmcplayer.xex

Edited by zbyti
refactor
Link to comment
Share on other sites

  • 1 month later...

0.3.24 (2020-12-02)

  • Preliminary support for TRS-80 Model 1 and 3 running TRS-DOS.

  • Preliminary support for Robotron Z1013.

  • Allowed defining entry points other than the start of the segment for Atari, ZX Spectrum, CoCo, Z1013 and TRS-80. (#78)

  • Allowed the : operator in const-pure functions.

  • Added pointer.interrupt and pointer.kernal_interrupt types.

  • Implemented readline and readword for VIC-20.

  • init_rand_seed uses the POKEY on Atari.

  • Useless labels are no longer emitted into the label file.

  • VIC-20: added readline and readword.

  • Atari: use POKEY for randomness source.

  • New output format elements: ASCII string, program name.

  • Fix: Pointers to functions with parameters (#86)/

  • Fix: more instances of memset loops should be detected and optimized (#59).

  • Fix: things mentioned in the segment layout should not be deleted even if unused.

  • Fix: endaddr+N output format.

  • 65816: some code generation fixes.

  • 8080: word negation now works.

  • Various optimization improvements.

  • Various other fixes.

  • Improved some error messages.

  • Even more new Atari examples (thanks to @zbyti).

  • Build process slightly changed.

https://github.com/KarolS/millfork/releases

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

New release 0.3.26

  • Array fields in structs

  • Various Apple II-related improvements, including ProDOS support (thanks to @retrac0)

  • Successful compilation now prints result program size

  • Self-modifying assembly code is now supported (#101)

  • Improved warnings and error messages

  • Many bug fixes and optimizations

See changelog for more details.

Edited by zbyti
  • Like 1
Link to comment
Share on other sites

  • 4 months later...
3 hours ago, zbyti said:

Yup. Millfork seems to be one of a very few true 8bit languages. Integer promotion to 16bit for arithmetic in other languages and has huge performance impact and is very hard to control either manually or by optimizer. Millfork's manual type conversion looks great, but can be confusing for users of other languages

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...