Fixed Jekyll rendering of pages with PC8080 machines
This commit is contained in:
parent
55b99c8a08
commit
31d1b5c7e5
8 changed files with 190 additions and 11 deletions
27
_config.yml
27
_config.yml
|
|
@ -98,3 +98,30 @@ pcjs:
|
|||
- /modules/c1pjs/lib/debugger.js
|
||||
- /modules/c1pjs/lib/computer.js
|
||||
- /modules/shared/lib/embed.js
|
||||
pc8080_scripts:
|
||||
- /modules/shared/lib/defines.js
|
||||
- /modules/shared/lib/dumpapi.js
|
||||
- /modules/shared/lib/reportapi.js
|
||||
- /modules/shared/lib/userapi.js
|
||||
- /modules/shared/lib/strlib.js
|
||||
- /modules/shared/lib/usrlib.js
|
||||
- /modules/shared/lib/weblib.js
|
||||
- /modules/shared/lib/component.js
|
||||
- /modules/pc8080/lib/defines.js
|
||||
- /modules/pc8080/lib/cpudef.js
|
||||
- /modules/pc8080/lib/messages.js
|
||||
- /modules/pc8080/lib/panel.js
|
||||
- /modules/pc8080/lib/bus.js
|
||||
- /modules/pc8080/lib/memory.js
|
||||
- /modules/pc8080/lib/cpu.js
|
||||
- /modules/pc8080/lib/cpusim.js
|
||||
- /modules/pc8080/lib/cpuops.js
|
||||
- /modules/pc8080/lib/rom.js
|
||||
- /modules/pc8080/lib/ram.js
|
||||
- /modules/pc8080/lib/keyboard.js
|
||||
- /modules/pc8080/lib/video.js
|
||||
- /modules/pc8080/lib/debugger.js
|
||||
- /modules/pc8080/lib/state.js
|
||||
- /modules/pc8080/lib/computer.js
|
||||
- /modules/shared/lib/embed.js
|
||||
- /modules/shared/lib/save.js
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ in the Front Matter of our Markdown documents, for compatibility with the Jekyll
|
|||
|
||||
'id' (eg, "ibm5150")
|
||||
'name' (eg, "IBM PC (Model 5150) with Monochrome Display")
|
||||
'type' ("pc" or "c1p")
|
||||
'type' (eg. "pc", "c1p", etc)
|
||||
'debugger' (default is false)
|
||||
'config' (default is "machine.xml")
|
||||
'template' (default is "machine.xsl")
|
||||
|
|
@ -97,8 +97,9 @@ of our Markdown or XML documents. Examples: 'automount' becomes 'autoMount', 'a
|
|||
{% capture machine_template %}{{ site.baseurl }}/versions/{{ machine_type }}js/{{ site.pcjs.version }}/components.xsl{% endcapture %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if machine_type == "pc" %}{% assign array_scripts = site.pcjs.pc_scripts %}{% endif %}
|
||||
{% if machine_type == "c1p" %}{% assign array_scripts = site.pcjs.c1p_scripts %}{% endif %}
|
||||
{% if machine_type == "pc" %}{% assign array_scripts = site.pcjs.pc_scripts %}{% endif %}
|
||||
{% if machine_type == "pc8080" %}{% assign array_scripts = site.pcjs.pc8080_scripts %}{% endif %}
|
||||
{% for script in array_scripts %}
|
||||
{% if script != "/modules/shared/lib/nodebug.js" or machine.debug != true %}
|
||||
{% capture machine_script %}<script type="text/javascript" src="{{ site.baseurl }}{{ script }}"></script>{% endcapture %}
|
||||
|
|
@ -118,8 +119,12 @@ of our Markdown or XML documents. Examples: 'automount' becomes 'autoMount', 'a
|
|||
{% capture machine_scripts %}{{ machine_scripts }}{{ machine_script }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if machine_template == "" %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/modules/{{ machine_type }}js/templates/components.xsl{% endcapture %}
|
||||
{% if machine_template == "" %}
|
||||
{% if machine_type != "c1p" %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/modules/shared/templates/components.xsl{% endcapture %}
|
||||
{% else %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/modules/{{ machine_type }}js/templates/components.xsl{% endcapture %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<script type="text/javascript">{{ machine_embed }}('{{ machine.id }}','{{ machine_config }}','{{ machine_template }}','{{ machine_parms }}');</script>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
{% for machine in page.machines %}
|
||||
{% capture machine_type %}{{ machine.type | remove:"-dbg" }}{% endcapture %}
|
||||
{% unless site.pcjs.compiled == true and machine.uncompiled != true %}
|
||||
{% capture machine_style %}{{ site.baseurl }}/modules/{{ machine.type | remove:'-dbg' }}js/templates/components.css{% endcapture %}
|
||||
{% if machine_type != "c1p" %}
|
||||
{% capture machine_style %}{{ site.baseurl }}/modules/shared/templates/components.css{% endcapture %}
|
||||
{% else %}
|
||||
{% capture machine_style %}{{ site.baseurl }}/modules/{{ machine_type }}js/templates/components.css{% endcapture %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% capture machine_style %}{{ site.baseurl }}/versions/{{ machine.type | remove:'-dbg' }}js/{{ site.pcjs.version }}/components.css{% endcapture %}
|
||||
{% capture machine_style %}{{ site.baseurl }}/versions/{{ machine_type }}js/{{ site.pcjs.version }}/components.css{% endcapture %}
|
||||
{% endunless %}
|
||||
{% unless machine_styles contains machine_style %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ machine_style }}">
|
||||
|
|
|
|||
137
devices/pc8080/machine/invaders/README.md
Normal file
137
devices/pc8080/machine/invaders/README.md
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
---
|
||||
layout: page
|
||||
title: Space Invaders (Prototype)
|
||||
permalink: /devices/pc8080/machine/invaders/
|
||||
machines:
|
||||
- type: pc8080
|
||||
id: invaders
|
||||
---
|
||||
|
||||
Space Invaders (Prototype)
|
||||
---
|
||||
|
||||
This is a work-in-progress, with [Development Notes](#development-notes) below.
|
||||
|
||||
{% include machine.html id="invaders" %}
|
||||
|
||||
Development Notes
|
||||
---
|
||||
|
||||
From [emutalk.net](http://www.emutalk.net/threads/38177-Space-Invaders):
|
||||
|
||||
Space Invaders, (C) Taito 1978, Midway 1979
|
||||
|
||||
CPU: Intel 8080 @ 2MHz (CPU similar to the (newer) Zilog Z80)
|
||||
|
||||
Interrupts: $cf (RST 8) at the start of vblank, $d7 (RST $10) at the end of vblank.
|
||||
|
||||
Video: 256(x)*224(y) @ 60Hz, vertical monitor. Colours are simulated with a
|
||||
plastic transparent overlay and a background picture.
|
||||
Video hardware is very simple: 7168 bytes 1bpp bitmap (32 bytes per scanline).
|
||||
|
||||
Sound: SN76477 and samples.
|
||||
|
||||
Memory map:
|
||||
ROM
|
||||
$0000-$07ff: invaders.h
|
||||
$0800-$0fff: invaders.g
|
||||
$1000-$17ff: invaders.f
|
||||
$1800-$1fff: invaders.e
|
||||
|
||||
RAM
|
||||
$2000-$23ff: work RAM
|
||||
$2400-$3fff: video RAM
|
||||
|
||||
$4000-: RAM mirror
|
||||
|
||||
Ports:
|
||||
Read 1
|
||||
BIT 0 coin (0 when active)
|
||||
1 P2 start button
|
||||
2 P1 start button
|
||||
3 ?
|
||||
4 P1 shoot button
|
||||
5 P1 joystick left
|
||||
6 P1 joystick right
|
||||
7 ?
|
||||
|
||||
Read 2
|
||||
BIT 0,1 dipswitch number of lives (0:3,1:4,2:5,3:6)
|
||||
2 tilt 'button'
|
||||
3 dipswitch bonus life at 1:1000,0:1500
|
||||
4 P2 shoot button
|
||||
5 P2 joystick left
|
||||
6 P2 joystick right
|
||||
7 dipswitch coin info 1:off,0:on
|
||||
|
||||
Read 3 shift register result
|
||||
|
||||
Write 2 shift register result offset (bits 0,1,2)
|
||||
Write 3 sound related
|
||||
Write 4 fill shift register
|
||||
Write 5 sound related
|
||||
Write 6 strange 'debug' port? eg. it writes to this port when
|
||||
it writes text to the screen (0=a,1=b,2=c, etc)
|
||||
|
||||
(write ports 3,5,6 can be left unemulated, read port 1=$01 and 2=$00
|
||||
will make the game run, but but only in attract mode)
|
||||
|
||||
I haven't looked into sound details.
|
||||
|
||||
16 bit shift register:
|
||||
f 0 bit
|
||||
xxxxxxxxyyyyyyyy
|
||||
|
||||
Writing to port 4 shifts x into y, and the new value into x, eg.
|
||||
$0000,
|
||||
write $aa -> $aa00,
|
||||
write $ff -> $ffaa,
|
||||
write $12 -> $12ff, ..
|
||||
|
||||
Writing to port 2 (bits 0,1,2) sets the offset for the 8 bit result, eg.
|
||||
offset 0:
|
||||
rrrrrrrr result=xxxxxxxx
|
||||
xxxxxxxxyyyyyyyy
|
||||
|
||||
offset 2:
|
||||
rrrrrrrr result=xxxxxxyy
|
||||
xxxxxxxxyyyyyyyy
|
||||
|
||||
offset 7:
|
||||
rrrrrrrr result=xyyyyyyy
|
||||
xxxxxxxxyyyyyyyy
|
||||
|
||||
Reading from port 3 returns said result.
|
||||
|
||||
Overlay dimensions (screen rotated 90 degrees anti-clockwise):
|
||||
,_______________________________.
|
||||
|WHITE ^ |
|
||||
| 32 |
|
||||
| v |
|
||||
|-------------------------------|
|
||||
|RED ^ |
|
||||
| 32 |
|
||||
| v |
|
||||
|-------------------------------|
|
||||
|WHITE |
|
||||
| < 224 > |
|
||||
| |
|
||||
| ^ |
|
||||
| 120 |
|
||||
| v |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
|-------------------------------|
|
||||
|GREEN |
|
||||
| ^ ^ |
|
||||
|56 ^ 56 |
|
||||
| v 72 v |
|
||||
|____ v ______________|
|
||||
| ^ | | ^ |
|
||||
|<16> | < 118 > |16 < 122 > |
|
||||
| v | | v |
|
||||
|WHITE| | WHITE|
|
||||
`-------------------------------'
|
||||
|
||||
Way of out of proportion :P
|
||||
|
|
@ -14,6 +14,7 @@ The project includes these emulation modules:
|
|||
|
||||
* C1Pjs, the 6502-based C1P Emulation Module
|
||||
* [PCjs](pcjs/), the x86-based IBM PC Emulation Module
|
||||
* PC8080, an 8080 CPU Emulation Module (work-in-progress)
|
||||
|
||||
along with variety of Node support modules, such as:
|
||||
|
||||
|
|
|
|||
|
|
@ -2473,11 +2473,11 @@ if (DEBUGGER) {
|
|||
}
|
||||
|
||||
sLine += str.pad(sBytes, 11);
|
||||
sLine += str.pad(sOpcode, 8);
|
||||
sLine += str.pad(sOpcode, 7);
|
||||
if (sOperands) sLine += ' ' + sOperands;
|
||||
|
||||
if (sComment) {
|
||||
sLine = str.pad(sLine, 56) + ';' + sComment;
|
||||
sLine = str.pad(sLine, 40) + ';' + sComment;
|
||||
if (!this.cpu.flags.fChecksum) {
|
||||
sLine += (nSequence != null? '=' + nSequence.toString() : "");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -106,13 +106,13 @@
|
|||
line-height: 19px;
|
||||
background-color: #000000;
|
||||
}
|
||||
.pcjs-video-object {
|
||||
.pcjs-screen {
|
||||
clear: both;
|
||||
height: auto;
|
||||
position: relative;
|
||||
line-height: 0;
|
||||
}
|
||||
.pcjs-video-object textarea {
|
||||
.pcjs-screen textarea {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@
|
|||
<xsl:when test="@width">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$left != '' or $top != ''">width:<xsl:value-of select="@width"/>;</xsl:when>
|
||||
<xsl:when test="@pos = 'left' or @pos = 'right'">width:<xsl:value-of select="@width"/>;max-width:<xsl:value-of select="@width"/>;</xsl:when>
|
||||
<xsl:otherwise>width:auto;max-width:<xsl:value-of select="@width"/>;</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
|
@ -217,8 +218,11 @@
|
|||
<xsl:if test="$component != 'machine'">
|
||||
<xsl:apply-templates select="menu" mode="component"/>
|
||||
</xsl:if>
|
||||
<xsl:variable name="objectClass">
|
||||
<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$class"/><xsl:text>-object</xsl:text><xsl:if test="$class = 'video'"><xsl:text> </xsl:text><xsl:value-of select="$CSSCLASS"/><xsl:text>-screen</xsl:text></xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$class != '' and $component != 'machine'">
|
||||
<div class="{$APPCLASS}-{$class}-object" data-value="{{id:'{$id}',name:'{$name}'{$comment}{$parms}}}"> </div>
|
||||
<div class="{$objectClass}" data-value="{{id:'{$id}',name:'{$name}'{$comment}{$parms}}}"> </div>
|
||||
</xsl:if>
|
||||
<xsl:if test="control">
|
||||
<div class="{$CSSCLASS}-controls">
|
||||
|
|
|
|||
Loading…
Reference in a new issue