DGRPAINT V1.01 Released


I know, I know. It’s been more than a year since this space was last updated already. I decided to dig up something that I had stuck together a few years ago and polish it up to a state that it could be released, so I now present to you DGRPAINT, a primitive paint programme that works on the double low-res mode of 128kb Apple //e. Some information: The double low-res mode features a resolution of 80×48 and can display a total of 16 colours. While it does look incapable, it is actually not that bad. At least it doubles the resolution of the original low-res mode (40×48) and its pixels are more “square”. Unfortunately this mode was heavily under-utilised as people generally focused on high-res or double hi-res modes at that time. But why? Even the original low-res mode enjoyed some use, especially in some early commercial games. As mentioned above the resolution of double low-res mode isn’t all that bad and its relatively low memory usage (less than 2kb for one whole screen) enables us to create some fast-paced games (remember: the 6502 in an Apple II is clocked at a wonderful 1MHz!) and we don’t need to deal with the “multiple of 7” non-sense like in the high-res modes (though you still need to deal with memory access alternating between main and aux memory lke the double high-res mode), so I look forward to seeing more vintage homebrewers taking advantage of this graphics mode. Anyway, I am just too lazy to write any proper documents at the moment, so upon booting the disk image in an Apple II emulator (or on the real thing, if you can), press the ‘H’ key for the help screen. The programme itself should be quite self-explanatory and you may just experiment. There are also a few sample images that you may load up and see. This tool is mainly written in Applesoft BASIC (so blame Bill Gates for its slowness), with some assembly routines to speed stuff up (sources are also included; you may assemble them with Merlin Assembler). Note that the flood fill function is a last-minute addition and so its codes are far from optimal (as reflected by how the codes were appended after the original routines I wrote 3 years ago and how sloppy the help screen was edited, as the ‘F’ key was originally used to clear the screen). At least it works, and still A LOT faster than the prototype codes I wrote in BASIC a few hours before.
P.S. As a last-last-minute addition, you can press the number keys ‘0’ thru ‘9’, and shift-‘0’ thru shift-‘5’ to change the foreground colour quickly and this is not even mentioned in the help screen (there isn’t any space anyway).
Updated on 1-11-2012:
Relocated a zero-page variable in the fill routine for safety’s sake. No functionality difference.

上一次發帖已是一年多之前的事了,所以我決定把幾年前編寫的一套小工具更新至「見得人」的狀態。DGRPAINT 是一套支援 128kb Apple //e 電腦,於雙低解像模式運作的簡單繪圖軟件。在這裏提供一些資料:雙低解像模式的解像度為 80×48,共可顯示 16 色,這規格看來不太好,但實在也不算太差,最少它的解像度是原來低解像模式 (40×48) 的兩倍,而各像素也較接近正方形,可惜的是這個模式的應用率極低,原因是當時的人多使用高解像或雙高解像模式了。為甚麼會這樣?其實一些較早期的遊戲也有使用原來的低解像模式的。上面已說過了, 雙低解像模式的解像度其實不算低,佔用的記憶體也少 (整個畫面也用不了 2kb),所以適合用來製作一些反應較快的遊戲 (注意 Apple II 的 6502 處理器的運作時脈只有 1MHz!),也不用應付如高解像和雙高解像模式中所謂「7 的倍數」的問題 (雖然還是要如雙高解像模式般交互讀寫主和副兩種記憶體),所以我樂見更多人可以應用這圖像模式。怎也好,我暫時沒有動力去為這套工具寫出詳細的說明文件,但各位可在 Apple II 模擬器 (如能用真實硬件更好) 中啟動磁碟鏡像後,按「H」鍵閱讀說明畫面。只要多試試,一般的操作應不難上手。碟內還有幾幅範例圖檔可以開啟看看。這套工具主要用 Applesoft BASIC 寫成 (覺得太慢的,問蓋茲吧!),也用上了一些用組合語言編寫的程序 (碟內還提供源代碼,可用 Merlin Assembler 組譯)。注意其中的塗色功能是最後臨時決定加上的,所以它的程式碼也寫得很急很馬虎 (由其加在我 3 年前編寫的原來的程序之後、說明畫面中突兀的修改 (原來「F」鍵是用作清除畫面的) 中可以看到),但最少可以正常運作,也比我在數小時前用 BASIC 寫成的試版快很多很多。
P.S. 其實你也可按「0」至「9」的數字鍵,以及「shift-0」至「shift-5」直接設定繪圖顏色,但因這是最最後才加入的功能,故即使在說明畫面中也沒有提及到的 (也沒有空位加上了)。
於 2012 年 11 月 1 日更新:
把在塗色程序中的一個零頁變數移到安全位置,在功能上沒有任何改變。

Download Version 1.01, released on 1-11-2012:
下載 2012 年 11 月 1 日發布的 1.01 版:
DGRPAINT_V1.01.zip

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s