项目作者: Zigazou

项目描述 :
Multimode in Amstrad CPC Basic via RSX commands
高级语言: Visual Basic
项目地址: git://github.com/Zigazou/rsxmode.git
创建时间: 2017-09-29T06:42:05Z
项目社区:https://github.com/Zigazou/rsxmode

开源协议:

下载


RSXmode

This program offers RSX commands for the Amstrad CPC computers family.

It allows the CPC to display more than one fixed resolution on a screen.
Everything is usable in Basic and does not require Z80 assembly language nor
hardware knowledge.

It is based on the work of Brian Cadge published in Popular Computing Weekly.
See https://cpcrulez.fr/coding_src-list-RSX-mix_your_modes_POPU.htm

It has been reverse engineered and patched to allow 664, 6128 and the plus
family to run it. It is also able to change border color for each section.

DEMORSX

In the example above:

  • section 0 uses mode 2, 640 pixels wide, 2 colors
  • section 1 and 2 uses mode 0, 160 pixels wide, 16 colors
  • section 3 uses mode 1, 320 pixels wide, 4 colors

Requirements

In order to compile this program, you need:

If you want to generate a DSK file that you can use with a CPC emulator, you
need:

Note: the rsxmode.dsk included in this repository only works with Caprice32.
You will need to regenerate another one if you want to use it in other emulators.

Compile

  1. make

or

  1. make run

Demo

To run the demo:

  1. cap32 rsxmode.dsk

Once the emulator has launched:

  1. run"loadrsx
  2. run"demorsx

The RSX commands

The sections are in this order: 5, 0, 1, 2, 3, 4.

Sections 4 and 5 are not usable but you can still change the border for them.
They aren’t usable because they are outside of the standard drawing zone.

SETM

Set the mode for each section. This RSX requires and even number of
arguments.

  1. |SETM,section,mode,section,mode...

BORD

Set the border color for each section. This RSX requires and even number of
arguments.

  1. |BORD,section,color,section,color...

MODE

Tells the Amstrad CPC in which mode the Basic commands must work. Patching
Basic to detect in which mode it should operate is beyond my knowledges :-)

  1. |MODE,mode

NORM

Disable the multi-modes mode and return to a standard mode.

  1. |NORM,mode

How it works

It uses the fast interrupt of the CPC which occurs every 1/300th second. This
interrupt is synchronised on the CRTC refresh rate. Since the refresh rate is
of 50 Hz, the interrupt is generated 6 times per screen refresh. Using this
interrupt, we can not define arbitrary sections but it makes it possible to use
Basic and firmware at the same time.