6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 3:58 am

All times are UTC




Post new topic Reply to topic  [ 138 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10  Next
Author Message
PostPosted: Sun Feb 28, 2021 7:14 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
This is the classic Marilyn Monroe resized to 128x128 pixels and saved as a .bmp file. it is then converted to Intel Hex and uploaded to CRC65 which format it to display on the OLED grey level display. 16 grey levels can produce fairly decent pictures.
Bill


Attachments:
DSC_64810227.jpg
DSC_64810227.jpg [ 1.36 MiB | Viewed 12526 times ]
Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 03, 2021 2:35 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
This is short 20 seconds video clip of animated GIF running on CRC65.
https://youtu.be/mDH89I5S3LY

I started out with a random animated GIF from the Web, resize it to 128x128, extracted into individual files and stored them as collection of 4-bit .bmp files. Each .bmp file contains 8K of graphic data. The BMP animation program in CRC65 receives each file, reformat, displays, and stores it in memory up to six 8K files. It then display these files continuously in a loop. The frame rate is around 6 frames/sec.

The display loop is limited by the size of CRC65 RAM memory; a better program is storing the data in the CF for playback.
Bill


Attachments:
DSC_64930303.jpg
DSC_64930303.jpg [ 1.38 MiB | Viewed 12481 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 26, 2022 6:04 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Since everyone is doing 65816 I might as well join the party and show rev2 of CRC65 which is dual W65C02/W65C816 design. Selection of 6502 or 65816 is via few jumper changes and a different CPLD firmware. The 128K (CY7C109) RAM provides 58K of RAM when configured to W65C02 or 116K of RAM while configured to W65C816. The nominal CPU clock for both 6502 and 65816 is 14.7MHz. Pictures show CRC65 with W65C02 and with W65C816. Documentation is work-in-progress at here:
https://www.retrobrewcomputers.org/doku ... rc65r2home
Bill


Attachments:
File comment: CRC65 rev2 configured to W65C816
DSC_67410119.jpg
DSC_67410119.jpg [ 1.24 MiB | Viewed 11644 times ]
File comment: CRC65 rev2 configured to W65C02
DSC_67420119.jpg
DSC_67420119.jpg [ 1.28 MiB | Viewed 11644 times ]
Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 28, 2022 12:03 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
This is 25 second of BadApple!! on CRC65's I2C interface driving a 128x64 OLED. The original full length video is 155 seconds animated GIF at resolution of 360x270 playing.at 20 frames/sec. The original video is down sampled to 85x64 GIF then splited into 3100 frames of images and converted into format suitable for displaying on 128x64 OLED display. The resulting data file is 3.1meg and stored as a contiguous binary file on CRC65's CF disk. A BadApple player written in 6502 assembly retrieves data from CF disk and writes it to the 128x64 OLED display via I2C. It can write a frame in 31mS so 19mS software delay is inserted to produce 20 frames/sec video.
Bill
Attachment:
BadApple_25sec_128x64OLED_CRC65.gif
BadApple_25sec_128x64OLED_CRC65.gif [ 5.85 MiB | Viewed 11617 times ]


Attachments:
BadApple_on_CRC65_128x64OLED.jpg
BadApple_on_CRC65_128x64OLED.jpg [ 1.24 MiB | Viewed 11617 times ]
Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 21, 2022 2:36 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Porting DOS/65 to CRC65 is high on the list of my winter projects. I have made some progress and post it here, but to stay on topic I want to post further progress here.

I designed the DOS/65 disk format to be compatible with my CP/M disk format on Z80 so I can exchange files and debug problems. That particular disk format has 1 track (128KB) set aside for system files. So that is where I stored DOS/65 system files (CCM,PEM,SIM) along with CRC65 monitor. The auto-start code located in CF's master boot record is modified to copy 27 sectors of CF data on the system track to RAM from $b200 to $e7ff and then jump to start DOS/65, this way DOS/65 will boot directly after a power cycle. I still can access CRC65's hardware monitor by execute a "go $b400" in DOS/65 prompt. Since CCM and PEM are stored in system track of the CF, DOS/65's warm boot routine can simply copy CCM and PEM from CF's system track to memory.

I want to assemble DOS/65 programs natively on CRC65 but it is a chicken-egg situation where I need 6502 executable assembler installed first. Executable ASM.COM is not available since all the files on DOS/65 ver2 distribution are in assembly source text. So I assembled ASM212.ASM using CA65 assembler then transfer the executable over to DOS/65 and save as ASM.COM. It seems to assemble other source files correctly but it only generates KIM-1 compatible binary. The provided KIM-to-COM conversion program (MKCOM) does not seem to work at the moment. This is where I am stuck right now.

The attached screen capture shows CRC65 auto boot into DOS/65 after reset. Drive D are DOS/65 ver 2 distribution files and drive A are files assembled used ASM.COM. I'm making progress.
Bill


Attachments:
autoboot_DOS65.jpg
autoboot_DOS65.jpg [ 76.84 KiB | Viewed 11391 times ]
Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 21, 2022 4:01 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Hi Bill,

Congrats on getting DOS/65 running! Great progress and very quick ;-)

I have makecom running. I ended up using WDC Tools and making some basic changes to the source. I use a TEA of $0800 however. In any case, I've attached my files here.

Attachment:
MAKECOM.zip [19.26 KiB]
Downloaded 57 times


Let me know if this works for you.

Also, I managed to get the assembler working, basic compiler, basic runtime, alloc, Xmodem, compare, etc. working as well.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 21, 2022 3:30 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Thanks for the makecom file. I think I made mistakes last night getting assembled mkcom.hex transferred to CRC65 and save as DOS/65 executable. Once I have the assembler and mkcom working on CRC65, I am able to assemble and run the remaining utility files (except xmodem) natively. xmodem interfaces directly with the specific serial device, so I need to work out the interface to CRC65's serial I/O which is rather unusual, to say the least.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 24, 2022 2:13 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
DOS/65 is now running on 29.5MHz CRC65. It uses exactly the same files as 14.7MHz CRC65, except the serial port is running at 230400 baud. Other than checking overclocked CRC65 has no unexpected software issues, the real motivation was to run Dan Werner's screen editor, sedit, which uses serial port to update the screen that can be somewhat slow even at 115200. sedit does work better with 230400 baud, but has the same bugs as 115200 baud. I did encountered a strangeness at 29.5MHz; that XMODEM receives file perfectly at 230400 baud at 12KByte/s, but with 14.7MHz and 115200 baud XMODEM is struggling with numerous retries.

Attached is CF image of DOS/65 rev0.2. Unzip and copy to a new CF disk (32MB or bigger) using disk imaging tool such as Win32DiskImager. It should autoboot into DOS65 and you should see the same files as the screen capture below. Works are in progress for the 3 programs below:
DBASIC.COM is EhBASIC ported to DOS65 but LOAD and SAVE do not work
SEDIT.COM is Dan Werner's screen editor
XMODEM.COM is flaky at 14.7MHz as noted above.
Bill


Attachments:
DOS65_r02_CF_image.zip [1.47 MiB]
Downloaded 55 times
dos65_r02_image_files.jpg
dos65_r02_image_files.jpg [ 108.65 KiB | Viewed 11300 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 24, 2022 2:42 pm 
Offline

Joined: Wed Nov 11, 2020 10:42 pm
Posts: 104
Location: Kelowna Canada
Hi Bill
That's great I'll give it a workout and report anything I encounter.
Larry


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 24, 2022 4:54 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Larry,
I'm very interested in your feedback.

Another strangeness with XMODEM: I can transfer 481K file to DOS/65 OK, but when I try to transfer 1meg file, it stuck at 524288 bytes which is exactly 1/2 meg. When I use the file status program (flst215s.bas) to read the directory info, I see the directory has 32 Extends and 4096 Records. Either DOS/65 has a 32 extends limit or XMODEM can only transfer 512KB of data.
Bill


Attachments:
xmodem_stuck.jpg
xmodem_stuck.jpg [ 69.14 KiB | Viewed 11280 times ]
xmodem_stuck_file.jpg
xmodem_stuck_file.jpg [ 58.08 KiB | Viewed 11280 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 24, 2022 5:19 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
plasmo wrote:
DOS/65 is now running on 29.5MHz CRC65...I did encountered a strangeness at 29.5MHz; that XMODEM receives file perfectly at 230400 baud at 12KByte/s, but with 14.7MHz and 115200 baud XMODEM is struggling with numerous retries.

XMODEM is an inefficient, compute-bound protocol of very questionable value in a hardwired data link that spans only a few meters. Reducing the Ø2 rate by one-half is likely leading to some sort of overrun condition as your host system sends XMODEM packets faster that your client (CRC65 unit) can process them. That would explain the errors and retries.

That your machine can only generate a throughput of 12 KB per second running with a 29.5 MHz Ø2 rate and a 230.4 Kbps serial link rate (note: it is bits-per-second, not baud, when using a hard-wired link) is telling. Using 8N1 data format and accurate UART clocking, 230.4 Kbps results in a transfer rate of exactly 23,400 bytes per second, disregarding the effects of flow-control. An XMODEM packet is uniformly 132 bytes in length, hence it is possible for packets to arrive at 5.64 millisecond intervals (~177 packets per second), assuming your client is checksumming and ACKing packets with alacrity. Of those 132 bytes, 128 of them are payload data, so the effective data throughput on the serial link is ~22 KB per second, best-case, nearly twice the rate at which your client is processing packets.

On my POC units, I transfer data via Motorola S-records. In a hard-wired link, especially one that is only a few feet in length, TIA-232 can be considered 100 percent glitch-free, assuming use of a connection of reasonable quality. Therefore, I limit error-checking to the checksum that is sent as part of each S-record. Since the likelihood of an error is vanishingly small, I simply terminate the transfer session if an error does occur. Hence I avoid the back-and-forth overhead that is part of XMODEM.

On POC V1.3, which runs at 16 MHz, I achieve ~13 KB/sec throughput during a load, with the serial link running at 115.2 Kbps. I/O accesses are wait-stated for one clock cycle, said accesses occurring in the UART interrupt service routine. An S-record is an ASCII hex representation of the data being transferred, which means a lot more bytes have to be moved than in a same-size XMODEM transfer. Considering that and the throughput I am achieving on a slower machine using a slower data link should help you understand why XMODEM is such a poor choice.

Quote:
Either DOS/65 has a 32 extends limit or XMODEM can only transfer 512KB of data.

XMODEM packets are sequentially numbered from 1 to 255. Due to the way in which the packet number is processed, this pattern can repeat as many times as necessary until all data has been transferred. Hence there is no theoretical transfer size limit, since the XMODEM session won’t terminate until the host sends ASCII <EOT> ($04) to the client.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 24, 2022 7:31 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
BDD,
A S-record or Intel hex loader is pretty standard feature in a hardware monitor. CRC65's monitor has an Intel hex loader which can receive ASCII data at 115200 (or 230400 in case of 29.5MHz CRC65) as fast as my workstation can send it without handshake--it's nothing special, pretty much every monitor can do that. Sending Intel hex file serially is how DOS/65 binary is loaded into a new CF initially and how XMODEM is loaded and saved as the very first executable in the new DOS/65 environment in order to bring in rest of files. Like you've said, it is fast and error free over a few feet of wires.

In my Z80 CP/M world, using XMODEM to transfer mega-byte size file and verify it is a part of the test suite, so I have no doubt CP/M and XMODEM can handle mega-byte size file. The overall XMODEM transfer rate is not just moving bytes across wire, but also how fast data can be stored to disk. The XMODEM file transfer rate for 22MHz Z80 is around 9KB/s at 115200. Clock for clock, Z80 is half the performance of 6502, so 29.5MHz 6502 should run circles around 22MHz Z80. This "strangeness" of XMODEM as implemented for DOS/65 on a 29.5MHz 65C02 is an indication of inefficiency and possible bugs in DOS/65 XMODEM program and/or DOS/65 file handling. It is my hope that 6502.org community can help me understand why this particular DOS/65 XMODEM is not performing up to par.

BTW, you are right about kps is the correct unit of measurement. There is no physical modem present in the XMODEM data path.

Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 24, 2022 7:33 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Well, a couple things:

1- The Xmodem utility that is packaged as part of DOS/65 is very inefficient, i.e., very very slow. It's the code itself, not the connection speed. It also uses the older single byte checksum. I have my own Xmodem CRC-16 code that I use with my C02Monitor and it's very quick, runs at full speed and the CPU has enough time to generate the CRC-16 checksum for each packet on the fly (no lookup table). I've considered writing a Xmodem utility for DOS/65 but have yet to really think about it, much less get started.

2- It would appear that DOS/65 has a limit of 512KB for a single file... I found the same thing, albeit with the same Xmodem utility. I'll probably write a small utility to create a disk file and just throw 128-byte records into it until it forces an error. I also want to try creating a larger disk than the 8MB, which I just stuck with when Rich sent me his ROM version.

Just a sideline on Xmodem... yea, it's old, not very efficient for transfers... BUT... so many existing and even newer terminal programs still support it. For myself, this is reason enough to have the implementation inside my Monitor code. I don't need a second serial port and it works flawlessly via the console port in both directions. I also added Motorola S19 support for downloads... as I have WDC Tools outputting S19 records, the download function automagically detects and processes the S19 records with or without a user entered address offset.

Once I have two serial ports working (I sorta do now, but the second port has no wiring to the chip), I'll likely look at doing the same thing the BDD is doing for transfers, but that's a back-burner for now.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 24, 2022 10:33 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
floobydust wrote:
Once I have two serial ports working (I sorta do now, but the second port has no wiring to the chip), I'll likely look at doing the same thing the BDD is doing for transfers, but that's a back-burner for now.

That reminds me that I need to get busy and publish a followup to my driving the 28L91 article. I’ve gone through my virtual QUART driver several times, and have tightened the code to where it easily handles 230.4 Kbps simultaneous CBAT on all four channels. BTW, the driver makes extensive use of the 65C816’s useless (<dp>,X) addressing mode. :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 25, 2022 12:11 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Interested to see your quad serial code for 65816. CRC65 can be reconfigured for 65816 with 2 banks of RAM and I have a quad serial board based on OX16C954 that's compatible with CRC65's bus, so CRC65816 with video/keyboard and quad serial board should make a nice standalone computers.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 138 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: